Skip to content

Latest commit

 

History

History
120 lines (84 loc) · 2.69 KB

README.md

File metadata and controls

120 lines (84 loc) · 2.69 KB

Visit docs.openfn.org to view the documentation site.

Contributing to this documentation site

Visit https://docs.openfn.org/documentation/writing-docs/.

This website is built using Docusaurus, a static website generator that uses Markdown and Javascript.

  • To create new docs pages, add markdown files (or JS files) to the /docs folder.
  • To view those new pages via the navigation, add links to them in the header, footer, or sidebars.
  • Note that page ids (which are required in sidebar.js are either set explicitly or automatically generated by docusaurus as the filename, sans extension.)
./sidebars.js
./sidebars-adaptors.js
./docusaurs.config.js

Local Development

Installation

Unix-like systems

asdf install
corepack enable
asdf reshim nodejs
yarn install

Windows

Install nvm-windows. Make sure your node version matches the one specified in .tool-versions.

Starting your docs site server

yarn start

This command builds the Adaptor docs from OpenFn/adaptors, starts a local development server, and opens up a browser window. Most changes are reflected live without having to restart the server.

Start without rebuilding adaptor docs

yarn start-offline

This command skips the adaptor docs step, which requires an active internet connection.

Building the job library

yarn generate-library

This command pulls public job data from OpenFn.org to create a local "job library".

Building the adaptors docs from the monorepo

yarn start:dev

This will first generate adaptors from your monorepo, then launch the server.

You can trigger a rebuild with:

yarn generate-adaptors -m

Where -m means "build from the monorepo.

To automatically rebuild whenever docs.json changes, run generate-adaptors with watch mode:

yarn generate-adaptors -w

Ensure that the OPENFN_ADAPTORS_REPO env var is set and points to the local monorepo.

See (github.com/OpenFn/adaptors/wiki/How-to-test-docs-changes)[https://github.com/OpenFn/adaptors/wiki/How-to-test-docs-changes] for more details

Build and serve for full-featured testing

yarn generate-adaptors
yarn generate-library
yarn build
yarn serve

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Builds to main will automatically be deployed to docs.openfn.org. This branch is protected, but we welcome pull requests!