Add sitemap
This commit is contained in:
parent
708dbc8355
commit
b7996e5046
4 changed files with 15 additions and 0 deletions
|
|
@ -28,6 +28,7 @@
|
|||
"type": "module",
|
||||
"dependencies": {
|
||||
"@steeze-ui/svelte-icon": "^1.5.0",
|
||||
"super-sitemap": "^0.14.14",
|
||||
"xmlbuilder2": "^3.1.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
11
packages/website/src/routes/sitemap[[page]].xml/+server.ts
Normal file
11
packages/website/src/routes/sitemap[[page]].xml/+server.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// https://github.com/jasongitmail/super-sitemap/
|
||||
import * as sitemap from 'super-sitemap';
|
||||
import { SITE_URL } from '$lib/metadata';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
|
||||
export const GET: RequestHandler = async ({ params }) => {
|
||||
return await sitemap.response({
|
||||
origin: SITE_URL,
|
||||
page: params.page,
|
||||
});
|
||||
};
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
||||
|
||||
|
||||
Sitemap: https://jade.ellis.link/sitemap.xml
|
||||
Loading…
Add table
Reference in a new issue