diff --git a/astro.config.mjs b/astro.config.mjs index fb2c820..8b15e47 100755 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -10,8 +10,8 @@ import config from "./src/config/config.json"; import umami from "@yeskunall/astro-umami"; export default defineConfig({ - site: config.site.base_url ? config.site.base_url : "http://examplesite.com", - base: config.site.base_path ? config.site.base_path : "/", + site: "https://blog.biblys.org/", + base: "/", trailingSlash: config.site.trailing_slash ? "always" : "never", image: {}, integrations: [ @@ -34,7 +34,21 @@ export default defineConfig({ ], }), mdx(), - umami({id :'984d1210-a376-4349-aa2f-83fab030a249' }) + umami({id :'984d1210-a376-4349-aa2f-83fab030a249' }), + sitemap({ + filter: (page) => page !== 'https://blog.biblys.org/preview', + changefreq: 'monthly', + priority: 0.7, + serialize(item) { + if (item.url === 'https://blog.biblys.org/') { + item.changefreq = 'weekly'; + item.lastmod = new Date().toISOString(); + item.priority = 1; + } + return item; + }, + }), + ], markdown: { remarkPlugins: [ diff --git a/public/robots.txt b/public/robots.txt index 9ea0e6f..d67534b 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -1,4 +1,6 @@ User-agent: * Allow: / -Disallow: /api/* \ No newline at end of file +Disallow: /api/* + +Sitemap: https://blog.biblys.org/sitemap-index.xml diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index d3efb4a..38c7c87 100755 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -52,6 +52,8 @@ const pageTitle = titleFromProps ? `${titleFromProps} ยท ${config.site.title}` : + +