Using aquila is a 3-step process:
- Create
aquila.yaml
config file. - Specify the
codePath
&docsPath
directory in the config file.
- Annotate all the code regions that might be used within the docs using a comment
#aqstart <region-name>
and closing it with#aqend <region-name>
. - Wherever you want to use the code region in the docs, use one of these syntaxes:
- For full regions:
<?code-region "file.go" region="myregion"?>
- For a single line:
<?code-region "file.go" region="myregion" lines="4"?>
- For line ranges:
<?code-region "file.go" region="myregion" lines="4-8"?>
- For full regions:
- Generate the docs using
aquila generate
command. - The generated docs will be present in the
./code_regions
directory. - Run
aquila update-md
to update the docs with the generated code regions.
Example can be found here.