Skip to content

Commit

Permalink
feat(docs): create robots.txt and update sitemap.xml (#4556)
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <rui@chenrui.dev>
  • Loading branch information
chenrui333 authored May 14, 2024
1 parent f011608 commit ee103c3
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"@types/node": "^20.12.10",
"@vueuse/core": "^10.9.0",
"sass": "^1.77.0",
"sitemap-ts": "^1.6.1",
"vitepress": "^1.1.4",
"vue": "^3.4.27"
},
Expand Down
142 changes: 142 additions & 0 deletions pnpm-lock.yaml

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

12 changes: 9 additions & 3 deletions runatlantis.io/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { generateSitemap as sitemap } from "sitemap-ts"
import { defineConfig } from 'vitepress';
import * as navbars from "./navbars";
import * as sidebars from "./sidebars";
Expand Down Expand Up @@ -54,6 +55,14 @@ export default defineConfig({
{ icon: "github", link: "https://github.com/runatlantis/atlantis" },
],
},
// SEO Improvement - sitemap.xml & robots.txt
buildEnd: async ({ outDir }) => {
sitemap({
hostname: "https://www.runatlantis.io/",
outDir: outDir,
generateRobotsTxt: true,
})
},
head: [
['link', { rel: 'icon', type: 'image/png', href: '/favicon-196x196.png', sizes: '196x196' }],
['link', { rel: 'icon', type: 'image/png', href: '/favicon-96x96.png', sizes: '96x96' }],
Expand Down Expand Up @@ -105,9 +114,6 @@ export default defineConfig({
})();`,
]
],
sitemap: {
hostname: 'https://runatlantis.io'
},
vite: {
server: {
fs: {
Expand Down

0 comments on commit ee103c3

Please sign in to comment.