paketo-buildpacks / paketo-website

Paketo Website Content
https://paketo.io
Apache License 2.0
11 stars 47 forks source link

paketo-website

Website for Paketo Buildpacks

Every day at 0500, a cron job runs to check for broken links on the deployed Paketo site. Link Check

Development

Prerequisites

Navigating this repo

Serving Locally

To Serve docs at http://localhost:1313:

npm install && hugo server

Testing links

To ensure that documentation cross-referencing is done correctly (i.e. no links are broken), we use built in Hugo shortcodes {{< ref >}} and {{< relref >}} in our documentation. (See Hugo docs). As a heuristic check for non-shortcoded internal links in the docs markdown, run

scripts/check-internal-links.sh

We also check whether external links on the site (e.g. a link to buildpacks.io) are valid, using a link checker called muffet. It's written in Golang!

To quickly check most links on the rendered site, run

scripts/check-links.sh --quick

This uses the power of goroutines to check our external links at lightning speed -- but avoids Github links to escape rate limiting.

To run a more complete link check (including Github links), run

scripts/check-links.sh

Checking spelling

The site uses the spellchecker-cli to check spelling in documentation markdown. To quickly spellcheck the entire /content directory, run

scripts/check-spelling.sh

Custom dictionary

This repo contains a dictionary of custom regular expressions to add to the default spellcheck dictionary. It is in scripts/.util/spellcheck-dictionary.txt. Items are case sensitive. See spellchecker's documentation for more details.

Excluding part of a document

If part of the docs is failing the spellcheck, it can be wrapped in an exclude block. Adding to the custom dictionary is usually preferred.

Contributing

Deployment

This repo uses a GHA workflow to automatically deploy commits on main to the Paketo site using GitHub Pages.