Quickly creating sitemaps for your Deno Fresh project.
Import the plugin freshSEOPlugin in your Fresh app
// ./main.tsimport{start}from"$fresh/server.ts";importmanifestfrom"./fresh.gen.ts";import{freshSEOPlugin}from"https://deno.land/x/fresh_seo/mod.ts";awaitstart(manifest,{plugins: [freshSEOPlugin(manifest)],});A basic sitemap should now be available at:
http://localhost:8000/sitemap.xml
Fresh SEO 🍋 automatically maps out static routes in your project.
For basic routes, you do not have to do anything manually.
You will still have to map dynamic routes yourself!
// ./main.tsimport{start}from"$fresh/server.ts";importmanifestfrom"./fresh.gen.ts";import{freshSEOPlugin}from"https://deno.land/x/fresh_seo/mod.ts";awaitstart(manifest,{plugins: [freshSEOPlugin(manifest,{include: ["/blog/intro"]})],});You can also remove unwanted routes
// ./main.tsimport{start}from"$fresh/server.ts";importmanifestfrom"./fresh.gen.ts";import{freshSEOPlugin}from"https://deno.land/x/fresh_seo/mod.ts";awaitstart(manifest,{plugins: [freshSEOPlugin(manifest,{exclude: ["/blog/intro","/api/*"]})],});The test suite can be started with
deno task test