Skip to main content
Version: current

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
Both of these commands will create 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:

Optiontypedefault
makersaurusPathstringdocumentation
versionedbooleanfalse
docsUrlstring{{ 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!

Optiontypedefault
makersaurusPathstringdocumentation

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:

Optiontypedefault
makersaurusPathstringdocumentation
adminUsernamestring{{ INSERT_REPO_ADMIN_USERNAME }}
adminEmailstring{{ INSERT_REPO_ADMIN_USERNAME }}

Feedback