asdf/docs/contributing-doc-site.md
James Hegedus 2fcde332ae Documentation site (#422)
* init docsify
* add config & plugins to support required features
* create cover page
* add sidebar headings
* add novel 404 page
* add translation message to 404
* add navbar with translations dropdown
* fix punctuation
* add all-plugins section pulling from asdf-plugins repo readme
* update sidebar with sections, better names & descriptions for contributors
* add changelog. pulls from repo
* add thanks page. credits, maintainers & link to contributors on github
* add core documentation
* rm old readme from docs/ folder
this was copied here on docsify init
* comment out some translation config
  ideally this will remain commented out serving as an example for any translation contributions
* run prettier over markdown
* add plugins-create section
* add contributing sections to the docs
* fix cover page get-started link
* use the readme as the main homepage
* update asdf version in docs with release script
2019-01-12 11:32:30 -05:00

1.7 KiB

Setup Your Environment

We're using:

  • Node.js v10.15.0 to support the other required tools
  • docsify to create our documentation site
  • prettier to format our markdown files

Install Dependencies

We are trying to avoid polluting the core repo with tooling for this documentation site. As such, it would be great if you could install these development tools globally so we don't need to commit them to this project.

npm i docsify-cli prettier -g

Serve the Site

From the root of this repo run:

docsify serve docs

Format before Committing

From the root of this repo run:

prettier --write "docs/**/*.md"

Translations

It would be great to provide translations for other languages.

Docsify makes adding new languages quite easy. Look in docs/index.html for commented out zh-cn examples.

Adding a new Translation

  1. create a folder in docs/ for the new translation
    docs/
    docs/zh-cn/
    
  2. copy file from root docs/_404.md to new folder docs/zh-cn/_404.md
    docs/_404.md
    docs/zh-cn/_404.md
    
  3. replace text with translated text.
  4. repeat for all files.
  5. add a link to the new translation in _navbar.md.
  6. run prettier before committing.

For more information, see the Configuration docsify docs, the Custom navbar docsify docs, and have a look at their own index.html's search section.