.. | ||
__mocks__ | ||
__snapshots__ | ||
templates | ||
build.js | ||
netlify.toml | ||
package.json | ||
readme.md | ||
write-config.js | ||
write-config.test.js | ||
write-homepage.js | ||
write-homepage.test.js | ||
write-pages.js | ||
write-pages.test.js | ||
yarn.lock |
Docusaurus Build
⚠️ Docusaurus build is not maintained anymore. Please note we were using Docusaurus@1.14.7 at the time.
My opinion
Docusaurus was quite though to setup. It goes too far for my need. It's certainly more suited for real project documentation.
😄 Good
- Default theme is nice
- It's possible to use React components
- Default theme got a footer
😕 Bad
- The new project boilerplate is too complicated. Would have prefer something simpler but extensible as I need it
- Search is only available using Algolia
😫 Ugly
- Didn't find a way not to have that
/docs/
base href
How does it work?
Here is the built website architecture:
website/package.json
- To install docusaurus
website/siteConfig.js
- Main configuration
website/sidebars.json
- Construct sidebar architecture
website/core/Footer.js
- A React footer... I'm not even sure I can throw this one away
website/static/index.html
- The page the user accesses if he goes to
/
. It just redirects to/docs/
...
- The page the user accesses if he goes to
docs/readme.md
- The main page content
All the other pages are markdown files that are carefully put under their folder (e.g. docs/screenshot/disable-shadow.md
). Assets are stored under the docs/assets
folder.
I didn't implement internationalization as it requires the use of the Crowdin SaaS solution and is likely to change in v2.
There is a second build phase where Docusaurus generates the static website.
Try locally
🏗 Install
yarn install
🚀 Usage
This will build the defaults.yml file and run a Docusaurus server on http://localhost:3000/docs/. Sources of the website are available in the dist
folder.
yarn start
🚧 Run unit tests
yarn test