Skip to content
 
 

Repository files navigation

AutoParams Documentation Site

This is the repository for the AutoParams Documentation site.

Structure

  • docs : Docs markdown files
  • src/components : React components used in homepage, docs mdx
  • src/pages : Homepage files

Files

  • docs/**/_category_.yml : Category metadata
  • docusaurus.config.ts : Configuration file
  • yarn.lock : Used for deploy

Environment Setup

Website

This website is built using Docusaurus, a modern static website generator.

Installation

$ yarn

Local Development

$ 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.

Testing Build Locally

$ yarn build
$ yarn serve

This command generates static content into the build directory and test your build locally.

Internationalization

Add language to docusaurus.config.ts

```json
i18n: { 
  ..
  locales: ['en', 'fr'],
  localeConfigs: {
    fr: {
        htmlLang: 'fr',
    },
  }
}
```

Translate messages in JSON file

Extract and initialize JSON translation files.

yarn write-translations --locale fr

Translates messages in JSON files in the i18n/[locale] path.

Translate docs

mkdir -p i18n/fr/docusaurus-plugin-content-docs/current
cp -r docs/** i18n/fr/docusaurus-plugin-content-docs/current

Translates markdown files in the i18n/[locale] path.

Start localized site in dev mode

Each locale is a distinct standalone single-page application: it is not possible to start the Docusaurus sites in all locales at the same time.

yarn start --locale fr

Versioning

Tagging a new version

  1. First, make sure the current docs version (the ./docs directory) is ready to be frozen.
  2. Enter a new version number.
    yarn docusaurus docs:version 2.x
  3. In the classic theme configuration of the docusaurus.config.ts file, change the docs.versions.current.label to the current version value.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages