The intent of this project is help Blowater collaborator understand the project quickly. This website is built using Docusaurus, a modern static website generator.
The docs.deno.com website is hosted on Deno Deploy, where it is fronted by a Hono web server that handles redirects and other dynamic content requests as they become necessary.
Note
The document is currently in its early stages, with a significant portion of the content yet to be written.
The actual content of the docs site is found mostly in these three folders:
runtime- docs for the Deno CLI / runtimedeploy- docs for the Deno Deploy cloud servicekv- docs for Deno KV, Deno's integrated database
Most files are markdown, but even markdown files are processed with MDX, which enables you to use JSX syntax within your markdown files.
Left navigation for the different doc sections are configured in one of these files:
sidebars/runtime.js- sidebar config for the Runtime sectionsidebars/deploy.js- sidebar config for the Deno Deploy sectionsidebars/kv.js- sidebar config for the KV section
Static files (like screenshots) can be included directly in the runtime, deploy, or kv folders, and referenced by relative URLs in your markdown.
Docusaurus provides a number of nice extensions to markdown you might want to use, like tabs, admonitions, and code blocks. Refer to the Docusaurus docs for more details.
Since Docusaurus is built and maintained using Node.js, it is recommended to have Node.js and npm installed for local development. Once Node and npm are installed, install Docusaurus' dependencies with:
npm installYou can then start the local development server with:
npm startThis will launch a browser window open to localhost:3000, where you will see any doc content changes you make update live.
To test the generated static site in a production configuration, run:
npm run buildThis will generate a static site to the build folder locally. To test the production server (through the actual Deno / Hono server), run this command:
npm run serveThis will start a Deno server on localhost:8000, where you can preview the site as it will run on Deno Deploy.
Sometimes, after making a Docusaurus config change, you will run into an error and need to clean Docusaurus' generated assets. You can do this by running:
npm run clearThis will solve most errors you encounter while refactoring the site. Static assets will be rebuilt from scratch the next time you run npm run build or npm start.