diff --git a/docs-chef-io/Makefile b/docs-chef-io/Makefile index ea5254902d..2693dcee3e 100644 --- a/docs-chef-io/Makefile +++ b/docs-chef-io/Makefile @@ -5,7 +5,11 @@ SHELL=bash preview_netlify: chef_web_docs rm -rf chef-web-docs/_vendor/github.com/chef/supermarket/docs-chef-io/* cp -R content chef-web-docs/_vendor/github.com/chef/supermarket/docs-chef-io/content - cp -R layouts chef-web-docs/_vendor/github.com/chef/supermarket/docs-chef-io/layouts + + if [ -d "layouts" ]; then \ + cp -R layouts chef-web-docs/_vendor/github.com/chef/supermarket/docs-chef-io/layouts; \ + fi + cp -R config.toml chef-web-docs/_vendor/github.com/chef/supermarket/docs-chef-io/config.toml pushd chef-web-docs && make bundle; hugo --buildFuture --gc --minify --environment development && popd diff --git a/docs-chef-io/content/supermarket/_index.md b/docs-chef-io/content/supermarket/_index.md index d5d3167627..7862f10951 100644 --- a/docs-chef-io/content/supermarket/_index.md +++ b/docs-chef-io/content/supermarket/_index.md @@ -15,7 +15,7 @@ aliases = ["/supermarket.html"] weight = 10 +++ -{{% supermarket/supermarket_summary %}} +{{< readfile file="content/supermarket/reusable/md/supermarket_summary.md" >}} ## Public Supermarket @@ -27,4 +27,4 @@ To interact with the public Chef Supermarket, use [knife supermarket](/workstati ## Private Supermarket -{{% supermarket/supermarket_private %}} +{{< readfile file="content/supermarket/reusable/md/supermarket_private.md" >}} diff --git a/docs-chef-io/content/supermarket/reusable/README.md b/docs-chef-io/content/supermarket/reusable/README.md new file mode 100644 index 0000000000..48cee9033e --- /dev/null +++ b/docs-chef-io/content/supermarket/reusable/README.md @@ -0,0 +1,9 @@ + +# Directory for Reusable Content + + +Files in this directory are used in *more than one place* within the Chef docs. + +Store all files in subdirectories organized by file type. For example, all Markdown files should be in `content//reusable/md/` and all Ruby files are stored in `content//reusable/rb/`. + +Call these files using the [`readfile` shortcode](https://docs.chef.io/style/reuse/#readfile-shortcode). diff --git a/docs-chef-io/content/supermarket/reusable/index.md b/docs-chef-io/content/supermarket/reusable/index.md new file mode 100644 index 0000000000..41de90ae49 --- /dev/null +++ b/docs-chef-io/content/supermarket/reusable/index.md @@ -0,0 +1,5 @@ ++++ +headless = true +## headless = true makes this directory a headless bundle. +## See https://gohugo.io/content-management/page-bundles/#headless-bundle ++++ diff --git a/docs-chef-io/layouts/shortcodes/supermarket/supermarket_api_summary.md b/docs-chef-io/content/supermarket/reusable/md/supermarket_api_summary.md similarity index 100% rename from docs-chef-io/layouts/shortcodes/supermarket/supermarket_api_summary.md rename to docs-chef-io/content/supermarket/reusable/md/supermarket_api_summary.md diff --git a/docs-chef-io/layouts/shortcodes/supermarket/supermarket_private.md b/docs-chef-io/content/supermarket/reusable/md/supermarket_private.md similarity index 100% rename from docs-chef-io/layouts/shortcodes/supermarket/supermarket_private.md rename to docs-chef-io/content/supermarket/reusable/md/supermarket_private.md diff --git a/docs-chef-io/layouts/shortcodes/supermarket/supermarket_summary.md b/docs-chef-io/content/supermarket/reusable/md/supermarket_summary.md similarity index 100% rename from docs-chef-io/layouts/shortcodes/supermarket/supermarket_summary.md rename to docs-chef-io/content/supermarket/reusable/md/supermarket_summary.md diff --git a/docs-chef-io/content/supermarket/supermarket_api.md b/docs-chef-io/content/supermarket/supermarket_api.md index b63ee8a206..3859766818 100644 --- a/docs-chef-io/content/supermarket/supermarket_api.md +++ b/docs-chef-io/content/supermarket/supermarket_api.md @@ -14,10 +14,13 @@ aliases = ["/supermarket_api.html", "/supermarket_api/"] {{< note >}} -In general, using knife (and the `knife supermarket` subcommand) to manage cookbooks that are located on the Cookbooks site is more efficient than using the Supermarket API and is the recommended approach for managing cookbooks on that site. This document provides information about the Supermarket API in the event that using the API is necessary. + +In general, using knife (and the `knife supermarket` subcommand) to manage cookbooks that are located on the Cookbooks site is more efficient than using the Supermarket API and is the recommended approach for managing cookbooks on that site. +This document provides information about the Supermarket API in the event that using the API is necessary. + {{< /note >}} -{{% supermarket/supermarket_api_summary %}} +{{< readfile file="/content/supermarket/reusable/md/supermarket_api_summary.md" >}} ## Endpoints diff --git a/docs-chef-io/content/supermarket/supermarket_private.md b/docs-chef-io/content/supermarket/supermarket_private.md index 8d8820607b..e3e2e2ed6c 100644 --- a/docs-chef-io/content/supermarket/supermarket_private.md +++ b/docs-chef-io/content/supermarket/supermarket_private.md @@ -12,8 +12,8 @@ aliases = ["/supermarket.html", "/supermarket_private/"] weight = 10 +++ -{{% supermarket/supermarket_summary %}} +{{< readfile file="content/supermarket/reusable/md/supermarket_summary.md" >}} ## Private Supermarket -{{% supermarket/supermarket_private %}} +{{< readfile file="content/supermarket/reusable/md/supermarket_private.md" >}}