This section covers how to build the documentation site with Hugo. For information on Score's style guide see the Style guide.
We use yarn
(for MacOS: brew install yarn
) as a package manager to ensure the versions of Hugo and associated tools are up to date. All commands that execute those tools are prefixed with yarn run
or are aliased in the package.json
file.
To install the packages:
yarn install
To run the server locally:
yarn build
OR
yarn run hugo server
And then view it at http://localhost:1313.
You can install score-compose
and then build and run this hugo website as a container:
score-compose init --no-sample
score-compose generate score.yaml --build main=.
docker compose up --build -d
curl $(score-compose resources get-outputs dns.default#score-docs.dns --format '{{ .host }}:8080/docs/')
This site is currently deployed through Github Pages with a CNAME directing docs.score.dev
to score-spec.github.io
. The DNS configuration is managed by Humanitec.
The following section covers how to format and lint prose.
This project uses the dprint to format documentation. dprint is a command line application that automatically formats code.
Use dprint
to format your documentation.
yarn fmt
Example output.
$ yarn fmt
Formatted 1 file.
✨ Done in 0.13s.
This project uses the Vale with a Vale-compatible implementation of the Google Developer Documentation Style Guide.
On MacOS, install it through brew install vale
.
For example, to lint a document run:
vale sync
vale styles/style-guide.md
Example output.
styles/style-guide.md
40:71 error Did you really mean Vale.Spelling
'inclusivity'?
✖ 1 error, 0 warnings and 0 suggestions in 1 file.
To lint all documents, run yarn lint
.
This section covers common build issues with Hugo.
When building the server, you may receive the following error message.
Error: from config: failed to resolve output format "print" from site config
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
To resolve this issue, delete the temporary Hugo cache directory. By default, -cacheDir
is stored at $TMPDIR/hugo_cache
.
rm -rf $TMPDIR/hugo_cache
When running yarn
, you may receive the following error message.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
To resolve this issue, delete the package-lock.json
file.
rm package-lock.json
You can find our documentation at docs.score.dev.
If you have a suggestion to improve our documentation, please fork the repo and create a pull request. You can also open an issue with the tag enhancement
.
- Fork the Project.
- Create your Feature Branch.
git checkout -b feature/feature-name
- Commit your Changes.
git commit -s -m "Add some amazing documentation enhancement"
- Push to the Branch.
git push origin feature/feature-name
- Open a Pull Request.
Read CONTRIBUTING for more information.
See Roadmap. You can submit an idea anytime.