From db09419df878ab025f170cdbf4fa1923612cb3f4 Mon Sep 17 00:00:00 2001 From: Ryan Watters Date: Mon, 27 Mar 2017 11:03:09 -0500 Subject: [PATCH] Update readme todos and clarifying readFile w themes --- README.md | 9 +++++---- content/contribute/documentation.md | 2 +- content/templates/files.md | 6 +++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 18ac3e9bc..719a4d0af 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ I reorganized the docs content and realized it did very little to make the docum So, I'm running with it... -TODO: -Fix theme /content/content-management/archetypes.md where theme is indicated -Fix theme /content/contribute/documentation.md where theme is indicated -Fix theme /content/templates/files.md where theme is indicated +TODOs: + +- [X] Fix theme /content/content-management/archetypes.md where theme is indicated +- [X] Fix theme /content/contribute/documentation.md where theme is indicated +- [X] Fix theme /content/templates/files.md where theme is indicated diff --git a/content/contribute/documentation.md b/content/contribute/documentation.md index a693a4022..feff3d1a5 100644 --- a/content/contribute/documentation.md +++ b/content/contribute/documentation.md @@ -47,7 +47,7 @@ Once you have cloned the Hugo repository, you can create a new function via the hugo new functions/newfunction.md ``` -The archetype for the `functions` content type is as follows: +The archetype for `functions` according to the Hugo theme is as follows: {{% code file="archetypes/functions.md" %}} ```yaml diff --git a/content/templates/files.md b/content/templates/files.md index b8d8ced0c..c952d457a 100644 --- a/content/templates/files.md +++ b/content/templates/files.md @@ -71,6 +71,10 @@ As `readFile` is a function, it is only available to you in your templates and n {{}} ``` +{{% warning %}} +If you are going to create [custom shortcodes](/templates/shortcode-templates/) with `readFile` for a theme, note that usage of the shortcode will refer to the project root and *not* your `themes` directory. +{{% /warning %}} + Here is the templating for our new `readfile` shortcode: {{% code file="layouts/shortcodes/readfile.html" download="readfile.html" %}} @@ -107,5 +111,5 @@ And here is the result as [called directly in the Hugo docs][] and rendered for [reads]: /functions/readfile/ [sc]: /content-management/shortcodes/ [sct]: /templates/shortcode-templates/ -[readfilesource]: https://github.com/spf13/hugo/blob/master/docs/layouts/shortcodes/readfile.html +[readfilesource]: https://github.com/spf13/hugo/blob/master/ [testfile]: https://github.com/spf13/hugo/blob/master/docs/testfile