ref: a8f91ace11c51e1a4c72b41d22bc80b23b9ea9b5
parent: 9e13ac9a8ff4d95ed4e1dcd2e6b90aae765c532d
author: Rick Cogley <[email protected]>
date: Mon Apr 27 06:34:09 EDT 2015
Clarify partials folder subfolders A couple of edits to clarify that the layout/partials folder can contain arbitrarily-named subfolders, since I found the examples using ``{{ partial "post/tag/list" . }}`` confusing. Some folders are named specifically to work a certain way with hugo, but although the examples use key functional section and taxonomy names like post and tag, it does not matter what they are called. Hopefully this will help other newbs.
--- a/docs/content/templates/partials.md
+++ b/docs/content/templates/partials.md
@@ -13,7 +13,7 @@
In practice, it's very convenient to split out common template portions into a
partial template that can be included anywhere. As you create the rest of your
-templates, you will include templates from the /layout/partials directory.
+templates, you will include templates from the /layout/partials directory, or from arbitrary subdirectories like /layout/partials/post/tag.
Partials are especially important for themes as it gives users an opportunity
to overwrite just a small part of your theme, while maintaining future compatibility.
@@ -99,5 +99,11 @@
</body>
</html>
-**For examples of referencing these templates, see [single content
+To reference a partial template stored in a subfolder, e.g. `/layout/partials/post/tag/list.html`, call it this way:
+
+ {{ partial "post/tag/list" . }}
+
+Note that the subdirectories you create under /layout/partials can be named whatever you like.
+
+**For more examples of referencing these templates, see [single content
templates](/templates/content/), [list templates](/templates/list/) and [homepage templates](/templates/homepage/).**