Merge commit 'eb16165694f868d73e57b6aed5c26ba5e98229de'

This commit is contained in:
Bjørn Erik Pedersen
2018-12-12 09:06:42 +01:00
199 changed files with 10860 additions and 22630 deletions

View File

@@ -48,7 +48,7 @@ You can then call the shortcode as follows inside of your content's markup:
The above shortcode [is part of the code for the Hugo docs][dirindex]. Here it lists this site's CSS files:
{{< directoryindex path="/themes/gohugoioTheme/static/dist" pathURL="/css" >}}
{{< directoryindex path="/themes/gohugoioTheme/static" pathURL="/css" >}}
{{% note "Slashes are Important" %}}
The initial slash `/` in `pathURL` is important in the `directoryindex` shortcode. Otherwise, `pathURL` becomes relative to the current web page.

View File

@@ -60,6 +60,10 @@ All partials are called within your templates using the following pattern:
One of the most common mistakes with new Hugo users is failing to pass a context to the partial call. In the pattern above, note how "the dot" (`.`) is required as the second argument to give the partial context. You can read more about "the dot" in the [Hugo templating introduction](/templates/introduction/).
{{% /note %}}
{{% note %}}
`<PARTIAL>` including `baseof` is reserved. ([#5373](https://github.com/gohugoio/hugo/issues/5373))
{{% /note %}}
As shown in the above example directory structure, you can nest your directories within `partials` for better source organization. You only need to call the nested partial's path relative to the `partials` directory:
```