Commit c107c3a3 authored by Jamie Tanna's avatar Jamie Tanna

Replace Jekyll HTML `include`s with Hugo `partialCached`

- Use `partialCached` so as not to repeat include files if not needed
- Via steps at https://gohugohq.com/partials/shortcode-embedding-partials-from-content-markdown-files/

As part of this, place the include under `/layouts/partials/posts/`
which makes more sense, as that's then tied to the content type, too.
parent ae35b8be
......@@ -17,7 +17,7 @@ date: 2018-03-06
license_prose: CC-BY-NC-SA-4.0
license_code: Apache-2.0
---
{% include posts/chef-13/intro.html %}
{{< partialCached "posts/chef-13/intro.html" >}}
When running Rubocop from ChefDK 2 against the following code, we receive the error `Parenthesize the param lazy { ... } to make sure that the block will be associated with the lazy method call` twice:
......
......@@ -15,7 +15,7 @@ date: 2018-03-06
license_prose: CC-BY-NC-SA-4.0
license_code: Apache-2.0
---
{% include posts/chef-13/intro.html %}
{{< partialCached "posts/chef-13/intro.html" >}}
When testing that Chef's `template`s are being rendered correctly, the easiest way to do this is via `render_file(...).with_content(&block)`.
......
......@@ -17,7 +17,7 @@ date: 2018-03-06
license_prose: CC-BY-NC-SA-4.0
license_code: Apache-2.0
---
{% include posts/chef-13/intro.html %}
{{< partialCached "posts/chef-13/intro.html" >}}
ChefSpec doesn't execute `ruby_block`s by default, and instead requires you to manually trigger it within your test. In Chef 12, we would be able to do this by calling `block.old_run_action(:run)`:
......
......@@ -17,7 +17,7 @@ date: 2018-03-06
license_prose: CC-BY-NC-SA-4.0
license_code: Apache-2.0
---
{% include posts/chef-13/intro.html %}
{{< partialCached "posts/chef-13/intro.html" >}}
One recommended change with the new version of Rubocop is the error `%w-literals should be delimited by [ and ]`.
......
......@@ -16,7 +16,7 @@ date: 2018-03-07
license_prose: CC-BY-NC-SA-4.0
license_code: Apache-2.0
---
{% include posts/chef-13/intro.html %}
{{< partialCached "posts/chef-13/intro.html" >}}
I use the gem [`knife-cookbook-doc`][knife-cookbook-doc] to autogenerate documentation from my Chef cookbooks. It allows me to ensure that documentation is kept right next to source files, which promotes changing of documentation at the same time as code, as well as make it easier to keep updated as it's a task that can be automated.
......
......@@ -17,7 +17,7 @@ date: 2018-03-09
license_prose: CC-BY-NC-SA-4.0
license_code: Apache-2.0
---
{% include posts/chef-13/intro.html %}
{{< partialCached "posts/chef-13/intro.html" >}}
As mentioned in ['Chef 13 Upgrade: `knife-cookbook-doc` gem upgrade'][chef-13-knife-cookbook-doc] I use the [`knife-cookbook-doc`][knife-cookbook-doc] gem to autogenerate my cookbook documentation, with formatting of the formats:
......
{{ partialCached (.Get 0) . }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment