Skip to content

Commit 8a3e253

Browse files
authored
Add blog to sitemap + add robots.txt
1 parent 3f97b89 commit 8a3e253

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/gh-pages.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,25 @@ jobs:
4343
run: npm ci # or pnpm install / yarn install / bun install
4444
- name: Build with VitePress
4545
run: npm run home:build
46+
- name: Convert sitemap to index
47+
run: |
48+
cd home/.vitepress/dist
49+
50+
# rename generated sitemap
51+
mv sitemap.xml sitemap-main.xml
52+
53+
# create sitemap index
54+
cat > sitemap.xml << 'EOF'
55+
<?xml version="1.0" encoding="UTF-8"?>
56+
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
57+
<sitemap>
58+
<loc>https://collapselauncher.com/sitemap-main.xml</loc>
59+
</sitemap>
60+
<sitemap>
61+
<loc>https://blog.collapselauncher.com/sitemap.xml</loc>
62+
</sitemap>
63+
</sitemapindex>
64+
EOF
4665
- name: Upload artifact
4766
uses: actions/upload-pages-artifact@v4
4867
with:

home/public/robots.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
User-agent: *
2+
Allow: /
3+
4+
Sitemap: https://collapselauncher.com/sitemap.xml

0 commit comments

Comments
 (0)