Skip to content

Commit

Permalink
Add @astrojs/sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
vascYT committed Aug 15, 2023
1 parent b3f68a4 commit a0451f6
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 1 deletion.
3 changes: 2 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { defineConfig } from "astro/config";

import tailwind from "@astrojs/tailwind";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";

// https://astro.build/config
export default defineConfig({
site: "https://vasc.dev/",
integrations: [tailwind(), react()],
integrations: [tailwind(), react(), sitemap()],
markdown: {
shikiConfig: {
theme: "dark-plus",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@astrojs/react": "^2.2.1",
"@astrojs/sitemap": "^2.0.1",
"@astrojs/tailwind": "^4.0.0",
"@fontsource-variable/inter": "^5.0.5",
"@fontsource/fira-mono": "^5.0.8",
Expand Down
35 changes: 35 additions & 0 deletions pnpm-lock.yaml

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

4 changes: 4 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /

Sitemap: https://vasc.dev/sitemap-index.xml
1 change: 1 addition & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const { title, description } = Astro.props;
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/png" href="/assets/favicon.png" />
<link rel="sitemap" href="/sitemap-index.xml" />
<meta name="generator" content={Astro.generator} />
<meta property="og:title" content={title} />
<meta property="og:type" content="website" />
Expand Down

0 comments on commit a0451f6

Please sign in to comment.