commit | 2c9fde946305316374aa22d69d82f3abf88051f8 | [log] [tgz] |
---|---|---|
author | FeynmanDNA <26617036+FeynmanDNA@users.noreply.github.com> | Sat Dec 07 16:33:09 2019 +0800 |
committer | FeynmanDNA <26617036+FeynmanDNA@users.noreply.github.com> | Sat Dec 07 16:33:09 2019 +0800 |
tree | b93351b8cca2df111ec8422738f087d7fd93eb57 | |
parent | 93b2124fb5b4b720294c575a41035d232d8f77a8 [diff] |
[site] set up husky and lint-staged with git hook
apache-singa-docs-site
website workspace name: apache-singa-docs-site-website-subdir
refer to this page for writing this README: https://github.com/apache/pulsar/tree/master/site2
yarn run start:website
Edit docs by navigating to docs/
and editing the corresponding document:
docs/doc-to-be-edited.md
--- id: page-needs-edit title: This Doc Needs To Be Edited --- Edit me...
For more information about docs, click here
Edit blog posts by navigating to website/blog
and editing the corresponding post:
website/blog/post-to-be-edited.md
--- id: post-needs-edit title: This Blog Post Needs To Be Edited --- Edit me...
For more information about blog posts, click here
/docs
, example docs/newly-created-doc.md
:--- id: newly-created-doc title: This Doc Needs To Be Edited --- My new content here..
website/sidebar.json
:// Add newly-created-doc to the Getting Started category of docs { "docs": { "Getting Started": [ "quick-start", "newly-created-doc" // new doc here ], ... }, ... }
For more information about adding new docs, click here
website/siteConfig.js
:website/siteConfig.js
headerLinks: [ ... { blog: true, label: 'Blog' }, ... ]
YYYY-MM-DD-My-Blog-Post-Title.md
in website/blog
:website/blog/2018-05-21-New-Blog-Post.md
--- author: Frank Li authorURL: https://twitter.com/foobarbaz authorFBID: 503283835 title: New Blog Post --- Lorem Ipsum...
For more information about blog posts, click here
website/siteConfig.js
:website/siteConfig.js
{ headerLinks: [ ... /* you can add docs */ { doc: 'my-examples', label: 'Examples' }, /* you can add custom pages */ { page: 'help', label: 'Help' }, /* you can add external links */ { href: 'https://github.com/facebook/docusaurus', label: 'GitHub' }, ... ], ... }
For more information about the navigation bar, click here
website/pages/en
:website/siteConfig.js
to add to the headerLinks
element:website/siteConfig.js
{ headerLinks: [ ... { page: 'my-new-custom-page', label: 'My New Custom Page' }, ... ], ... }
For more information about custom pages, click here.
Full documentation can be found on the website.
=== from Jest
If you are making changes to the website or documentation, test the website folder and run the server to check if your changes are being displayed accurately.
yarn
. Following steps are to be followed for this purpose from the root directory.$ cd website # Only needed if you are not already in the website directory $ yarn $ yarn start
yarn start
in the website directory.The Jest website also offers documentation for older versions of Jest, which you can edit in website/versioned_docs
. After making changes to the current documentation in docs
, please check if any older versions of the documentation have a copy of the file where the change is also relevant and apply the changes to the versioned_docs
as well.
=== from pulsar
=== general gotchas
for docusaurus 1x console log in react components will only show in live dev server terminal