📝 reaction-docs
is the new static documentation generator for all Reaction Commerce projects.
git clone git@github.com:reactioncommerce/reaction-docs.git
cd reaction-docs
bin/setup
docker-compose up
To update docs for the current released version of Reaction, edit existing Markdown files in website/versioned_docs
.
website/versioned_docs/version-CURRENTVERSION
. If the document you want to edit is not in that folder, check in previous versions' folders until you find the latest one.http://localhost:4242/docs/<YOURMARKDOWNFILE_ID>
to see your changes locally.To update docs of unreleased features, you will need to edit existing Markdown files in public_docs
. For example, if you were documenting upcoming Reaction API changes to Cart that are merged into trunk
but not yet tagged in a release, you'd update the public-docs/cart.md
file.
http://localhost:4242/docs/next/<YOURMARKDOWNFILE_ID>
to see your changes locally.To create brand new documentation files for unreleased code that has previously not been documented, you will need to create new files in public_docs
:
---
id: doc2
title: document number 2
---
website/sidebars.json
.sidebars.json
, you'll need to restart the app to see changes. Restart the app.http://localhost:4242/docs/next/<YOURMARKDOWNFILE_ID>
to see your new file locally.![](/assets/admin-dashboard.png "Reaction Dashboard")
Refer to the [FAQs](faqs.md) article
To enable code syntax highlighting, add js
, jsx
, graphql
, html
, sh
, git
, yaml
and more after the ```.
For more Markdown features, including autogenerated table of contents, refer to Docusaurus docs.
We use the Developer Certificate of Origin (DCO) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing off all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:
Signed-off-by: Jane Doe jane.doe@example.com
You can sign off your commit automatically with Git by using git commit -s if you have your user.name and user.email set as part of your Git configuration.
We ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)
We use the Probot DCO GitHub app to check for DCO signoffs of every commit.
If you forget to sign off git your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.
The Header, Footer, index page and version pages are developed in React and CSS within the website/core
and website/static
directories. Site configuration details are managed in website/siteConfig.js
.
docker-compose up -d && docker-compose logs -f
docker-compose run --rm web yarn lint
docker-compose run --rm web yarn lint:fix:eslint
docker-compose run --rm web yarn build
docker-compose run --rm web [...]
will run any command inside a Docker container and then remove the container.
docker-compose run --rm web yarn install \
&& docker-compose down --rmi local \
&& docker-compose build \
&& docker-compose up
Tests are stubbed out for now.
Add a new version
docker-compose run --rm web yarn run version <version>
Rename an existing version to a new name
docker-compose run --rm web yarn run rename-version <currentVersion> <newVersion>
See Versioning guide for more.
docker-compose run --rm web yarn run version <version-number>
docker-compose down && docker-compose up
Run locally to confirm the version number has been changed in the header on http://localhost:4242, and the previous version has been added to the http://localhost:4242/versions list.
If all things look good, push the branch up to make a pull request.
Merge to trunk
to auto-deploy
staging
branchMerging to staging
will trigger a CircleCI build to https://reaction-docs-staging.reactioncommerce.com/ using Netlify.
trunk
branchMerging to trunk
will trigger a CircleCI build to https://docs.reactioncommerce.com/ using Netlify.
Search is generously provided by Algolia DocSearch. The configuration for this site's search available here and can be configured by sending a pull request to that repository. More details here.