Update readme todos and clarifying readFile w themes

This commit is contained in:
Ryan Watters 2017-03-27 11:03:09 -05:00
parent 0a6bc38640
commit db09419df8
3 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -71,6 +71,10 @@ As `readFile` is a function, it is only available to you in your templates and n
{{</* readfile file="/path/to/local/file.txt" markdown="true" */>}}
```
{{% 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