diff --git a/src/config.ts b/src/config.ts
index 338190b..c84c012 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -15,6 +15,14 @@ export const siteConfig: SiteConfig = {
enable: false,
src: 'assets/images/demo-banner.png',
},
+ favicon: {
+ enable: false,
+ size: '32x32',
+ src: {
+ light: '/favicon/favicon-light-32.png',
+ dark: '/favicon/favicon-dark-32.png',
+ }
+ },
}
export const navBarConfig: NavBarConfig = {
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 60841bd..63598b1 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -54,6 +54,7 @@ if (!banner || typeof banner !== 'string' || banner.trim() === '') {
banner = siteConfig.banner.src;
const enableBanner = siteConfig.banner.enable;
+const enableFavicon = siteConfig.favicon.enable;
let pageTitle;
if (title) {
@@ -74,6 +75,8 @@ if (title) {
+ {enableFavicon ?
+ :
@@ -81,7 +84,7 @@ if (title) {
-
+ }
diff --git a/src/types/config.ts b/src/types/config.ts
index 965456d..c068600 100644
--- a/src/types/config.ts
+++ b/src/types/config.ts
@@ -9,6 +9,15 @@ export type SiteConfig = {
enable: boolean
src: string
}
+
+ favicon: {
+ enable: boolean
+ size: string
+ src: {
+ light: string
+ dark: string
+ }
+ }
}
export enum LinkPreset {