Templates
Makersaurus provides a few commands to generate templates for files that typically live outside of the documentation folder. The goal of these commands is to make the process of creating a new site easier and more consistent.
gen-*
commands write their output to the command line. If you would rather write to a file, you can redirect the output like so:
- Replace contents of a file:
npx @h2oai/makersaurus@latest gen-readme > README.md
- Add to the end of a file:
npx @h2oai/makersaurus@latest gen-readme >> README.md
README.md
if it does not currently exist. :::README.md
A project's README.md
file should include some details about how documentation works. Instead of writing it out every time, you can use the gen-readme
command:
% npx @h2oai/makersaurus@latest gen-readme
Documentation
- Documentation is built using Makersaurus
- The documentation is displayed at {{ INSERT_DOCS_URL }}
- Note: The above is the official documentation URL and should be the one to share with people inside and outside the company
Requirements
To view, edit, and cut a version of the documentation, the following...
The template can be customized with the following options:
Option | type | default |
---|---|---|
makersaurusPath | string | documentation |
versioned | boolean | false |
docsUrl | string | {{ INSERT_DOCS_URL }} |
Makefile
You can generate some documentation-related tasks to add to a Makefile
with the gen-makefile
command:
% npx @h2oai/makersaurus@latest gen-makefile
setup-doc:## Install documentation dependencies
cd documentation && npm install
run-doc: ## Run the doc site locally
cd documentation && npm start
build-doc-locally: ## Bundles your website into...
There is only one option, but make sure it's right or the tasks wont run properly!
Option | type | default |
---|---|---|
makersaurusPath | string | documentation |
Deployment script
You can easily deploy a Makersaurus project with Github actions. The gen-deployment
command will generate a set of instructions which Github will recognize when they are placed in a YML file in the .github/workflows
folder.
% npx @h2oai/makersaurus@latest gen-deployment > .github/workflows/deploy-to-gh-pages.yml
Three options must be configured for the action to work properly:
Option | type | default |
---|---|---|
makersaurusPath | string | documentation |
adminUsername | string | {{ INSERT_REPO_ADMIN_USERNAME }} |
adminEmail | string | {{ INSERT_REPO_ADMIN_USERNAME }} |
- Submit and view feedback for this page
- Send feedback about Makersaurus Docs to cloud-feedback@h2o.ai