diff --git a/.gitignore b/.gitignore index 2479ce8c9..0209987c4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ node_modules/ out/ .obsidian/ .markdowndb/ +tsconfig.tsbuildinfo .vscode/ -.idea/ \ No newline at end of file +.idea/ diff --git a/config/siteConfig.ts b/config/siteConfig.ts index c83ca74f7..ceb438dd2 100644 --- a/config/siteConfig.ts +++ b/config/siteConfig.ts @@ -1,8 +1,14 @@ -import { defaultConfig } from "@portaljs/core"; import userConfig from "@/content/config.mjs"; +import { + AnalyticsConfig, + AuthorConfig, + CommentsConfig, + NavConfig, + defaultConfig, +} from "@portaljs/core"; +import { DefaultSeoProps } from "next-seo"; -// TODO types -const siteConfig: any = { +const siteConfig: SiteConfig = { ...defaultConfig, ...userConfig, // prevent theme object overrides for @@ -14,3 +20,22 @@ const siteConfig: any = { }; export default siteConfig; + +export type UserConfig = { + analyticsConfig?: AnalyticsConfig; + comments?: CommentsConfig; + defaultAuthor: string; + editLinkRoot?: string; + logo?: AuthorConfig["logo"]; + navbarTitle?: { + text?: NavConfig["title"]; + logo?: NavConfig["logo"]; + }; + nextSeo?: Partial; + preProcess: (source: any) => any; + showComments?: boolean; + search?: NavConfig["search"]; + social?: NavConfig["social"]; +} & Partial; + +export type SiteConfig = typeof defaultConfig & typeof userConfig; diff --git a/content/config.mjs b/content/config.mjs index ff8b4c563..d8210b210 100644 --- a/content/config.mjs +++ b/content/config.mjs @@ -1 +1,5 @@ + +/** + * @type {import("../config/siteConfig").UserConfig} + */ export default {}; diff --git a/pages/_app.tsx b/pages/_app.tsx index 93a620f13..0f4996a08 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -54,7 +54,7 @@ const MyApp = ({ Component, pageProps }: AppProps) => { logo: siteConfig.logo, }, theme: { - defaultTheme: siteConfig.theme.default, + defaultTheme: siteConfig.theme.default as "light" | "dark", themeToggleIcon: siteConfig.theme.toggleIcon, }, siteMap, diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 000000000..ab9117f83 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,48 @@ + + + + https://homostellaris.io/dev/columns-vs-flex-vs-grid + + + + https://homostellaris.io/marketing/seo + + + + https://homostellaris.io/productivity/effective-macos-task-management + + + + https://homostellaris.io/about + + + + https://homostellaris.io/blog/blog-post-fail + + + + https://homostellaris.io/productivity/productivity-system + + + + https://homostellaris.io/tech/roll-your-own-personal-backups + + + + https://homostellaris.io/blog/schedule-your-social-marketing + + + + https://homostellaris.io// + + + + https://homostellaris.io/dev/how-to-test-web-apps + + + + https://homostellaris.io/dev/instance-type + +