This directory contains scripts and configuration files that generate Markdown files in the generated/generated_content
directory. Basically this is a second Hugo project inside of chef-web-docs.
From the generated
directory, run make build
.
This will regenerate all the Cookstyle cops Markdown pages in generated/generated_content
.
From the generated
directory, run make update_cookstyle_cops
This will:
- Delete all existing Cookstyle cops documentation in
generated/generated_content
. - Update the chef/cookstyle Hugo module in
generated/go.mod
to the latest commit of thechef/cookstyle
repo. - Rebuild the Cookstyle cops Markdown files in
generated/generated_content/workstation
.
When you run hugo
from chef-web-docs/generated
, Hugo will execute the generated/layouts/index.html
layout. That layout calls two partials in generated/layouts/partials
which read YAML files in generated/_vendor
and will output Markdown files in the generated/generated_content
directory.
Hugo is configured in chef-web-docs to mount content in generated/generated_content/workstation
to content/workstation
. See the config/_default/module.toml
configuration file.
The YAML files are generated from a rake task in the chef/cookstyle repo. chef-web-docs gets a pull request that updates this content when Cookstyle is promoted.
This setup is based on a blog post and example project from The New Dynamic.