Skip to content

Commit

Permalink
Merge pull request #392 from liam-hq/add-docs-robots-txt
Browse files Browse the repository at this point in the history
📘 Add robots.txt and sitemap to docs
  • Loading branch information
MH4GF authored Dec 27, 2024
2 parents cfe81e5 + 1720b61 commit c98ed44
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions frontend/apps/docs/app/docs/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { source } from '@/lib/source'
import type { MetadataRoute } from 'next'

export default function sitemap(): MetadataRoute.Sitemap {
const pages = source.getPages()
const allPaths = pages.map((page) => page.url)

return allPaths.map((path) => ({
url: `${process.env.SERVICE_SITE_URL}${path}`,
lastModified: new Date().toISOString(),
}))
}
2 changes: 2 additions & 0 deletions frontend/apps/docs/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-Agent: *
Disallow: /

0 comments on commit c98ed44

Please sign in to comment.