• Stars
    star
    129
  • Rank 279,262 (Top 6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Contentlayer Website

Contentlayer Website

Gitpod Ready-to-Code

Local setup

npm install
npm run dev

Open https://localhost:3000 with your browser to see the result. (Note the webserver is using a self-signed SSL certificate since HTTPS is required for the embedded Stackblitz editor to work properly.)

Live preview

Current Vercel Deployment

Generating Global Doc ID

Every document (except docs index page) has a unique eight-character global_id property. This uniquely identifies that piece of documentation and provides a seamless way to be able to reorganize documentation without worrying about 404 errors for missing redirects.

These can be automatically generated by running the following command:

node scripts/generate-page-ids.mjs

Validate that all global_id values are unique with this command:

node scripts/validate-duplicate-ids.mjs