Skip to content

Commit 590db1e

Browse files
authored
Add sitemap (#670)
* feat: add sitemap * chore: run formatter
1 parent 5269283 commit 590db1e

File tree

5 files changed

+87
-7
lines changed

5 files changed

+87
-7
lines changed

docs/astro.config.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
// @ts-check
22
import { defineConfig } from "astro/config";
33

4+
import sitemap from "@astrojs/sitemap";
5+
46
// https://astro.build/config
57
export default defineConfig({
68
site: "https://www.rocketsim.app",
9+
/**
10+
* Add the sitemap plugin
11+
*
12+
* Configurations:
13+
* - filter: We're filtering the terms and privacy pages, since we don't want them to be indexed.
14+
* - LATER: Add `lastmod`, `changefreq`, and `priority` to the feature and blog pages.
15+
*/
16+
integrations: [
17+
sitemap({
18+
filter: (page) =>
19+
page !== "https://www.rocketsim.app/terms/" &&
20+
page !== "https://www.rocketsim.app/privacy/",
21+
}),
22+
],
723
});

docs/package-lock.json

Lines changed: 61 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"knip": "knip"
1414
},
1515
"dependencies": {
16+
"@astrojs/sitemap": "^3.3.0",
1617
"astro": "^5.2.5",
1718
"marked": "^15.0.7"
1819
},

docs/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://www.rocketsim.app/sitemap-index.xml

docs/src/layouts/BaseLayout.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,19 @@ const ogImage = `${Astro.site}og-banner-rocketsim.jpg`;
2020
<head>
2121
<meta charset="UTF-8" />
2222
<meta name="viewport" content="width=device-width" />
23-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
23+
2424
<meta name="generator" content={Astro.generator} />
25+
26+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
2527
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
2628
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
2729
<link rel="shortcut icon" href="/favicon.ico" />
2830
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
2931
<meta name="apple-mobile-web-app-title" content="RocketSim" />
3032
<link rel="manifest" href="/site.webmanifest" />
3133

34+
<link rel="sitemap" href="/sitemap-index.xml" />
35+
3236
<title>{pageTitle}</title>
3337
<meta name="description" content={pageDescription} />
3438
<link rel="canonical" href={cannonicalUrl} />

0 commit comments

Comments
 (0)