The Pokémon TCG API docs are built using Docusaurus 2, a modern static website generator.
yarn install
yarn start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
yarn build
This command generates static content into the build
directory and can be served using any static contents hosting service.
Release a version 1.0 of your project:
npm run docusaurus docs:version 1.0
The docs
folder is copied into versioned_docs/version-1.0
and versions.json
is created.
Your docs now have 2 versions:
1.0
athttp://localhost:3000/
for the version 1.0 docscurrent
athttp://localhost:3000/next/
for the upcoming, unreleased docs
To navigate seamlessly across versions, add a version dropdown.
Modify the docusaurus.config.js
file:
module.exports = {
themeConfig: {
navbar: {
items: [
// highlight-start
{
type: 'docsVersionDropdown',
},
// highlight-end
],
},
},
};