macos-defaults/build/docusaurus
2020-11-02 20:30:01 +01:00
..
__mocks__ 👷 Add a Docusaurus build action 2020-09-20 11:18:39 +02:00
__snapshots__ Add Netlify logo on all builds (#58) 2020-10-05 19:15:23 +02:00
templates Add Netlify logo on all builds (#58) 2020-10-05 19:15:23 +02:00
build.js ♻️ Split build into smaller functions 2020-09-26 20:24:54 +02:00
netlify.toml ♻️ Split build into smaller functions 2020-09-26 20:24:54 +02:00
package.json ⬆️ Upgrade jest to v26.6.2 (#88) 2020-11-02 20:30:01 +01:00
readme.md Add Netlify logo on all builds (#58) 2020-10-05 19:15:23 +02:00
write-config.js ♻️ Split build into smaller functions 2020-09-26 20:24:54 +02:00
write-config.test.js ♻️ Split build into smaller functions 2020-09-26 20:24:54 +02:00
write-homepage.js ♻️ Split build into smaller functions 2020-09-26 20:24:54 +02:00
write-homepage.test.js ♻️ Split build into smaller functions 2020-09-26 20:24:54 +02:00
write-pages.js ♻️ Split build into smaller functions 2020-09-26 20:24:54 +02:00
write-pages.test.js ♻️ Split build into smaller functions 2020-09-26 20:24:54 +02:00
yarn.lock ⬆️ Upgrade jest to v26.6.2 (#88) 2020-11-02 20:30:01 +01:00

Docusaurus Build

Docusaurus build status

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:

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