Skip to content

Commit

Permalink
add astro sitemap integration
Browse files Browse the repository at this point in the history
  • Loading branch information
devmatteini committed Dec 29, 2024
1 parent 6cfbd0c commit 1fc8515
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 3 deletions.
3 changes: 2 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import rehypeSlug from "rehype-slug"
import { prettyCodePlugins } from "./config/pretty-code"
import { isAnalyticsEnabled } from "./config/analytics"
import vercel from "@astrojs/vercel"
import sitemap from "@astrojs/sitemap"

// https://astro.build/config
export default defineConfig({
Expand All @@ -20,7 +21,7 @@ export default defineConfig({
prettyCodePlugins,
],
},
integrations: [tailwind(), icon(), mdx()],
integrations: [tailwind(), icon(), mdx(), sitemap()],
output: "static",
adapter: vercel({
webAnalytics: {
Expand Down
52 changes: 52 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"dependencies": {
"@astrojs/mdx": "4.0.3",
"@astrojs/sitemap": "3.2.1",
"@astrojs/tailwind": "5.1.4",
"@astrojs/vercel": "8.0.1",
"@fontsource-variable/inter": "5.1.0",
Expand All @@ -35,16 +36,16 @@
},
"devDependencies": {
"@astrojs/check": "0.9.4",
"eslint": "9.17.0",
"@eslint/js": "9.17.0",
"@types/eslint__js": "8.42.3",
"typescript-eslint": "8.18.2",
"eslint": "9.17.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-astro": "1.3.1",
"prettier": "3.4.2",
"prettier-plugin-astro": "0.14.1",
"tailwindcss": "3.4.17",
"typescript": "5.7.2",
"typescript-eslint": "8.18.2",
"vercel": "39.2.2"
}
}
3 changes: 3 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
User-agent: *
Allow: /

Sitemap: https://cosimomatteini.com/sitemap-index.xml
1 change: 1 addition & 0 deletions src/layouts/Document.astro
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const keywords = Array.from(metadata.keywords).join(",")
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://hachyderm.io/@cosimomatteini" rel="me" />
<link rel="sitemap" href="/sitemap-index.xml" />

<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png" />
Expand Down

0 comments on commit 1fc8515

Please sign in to comment.