diff --git a/content/templates/lookup-order.md b/content/templates/lookup-order.md index c7fa4563a..198794fcb 100644 --- a/content/templates/lookup-order.md +++ b/content/templates/lookup-order.md @@ -5,7 +5,7 @@ description: The lookup order is a prioritized list used by Hugo as it traverses godocref: date: 2017-02-01 publishdate: 2017-02-01 -lastmod: 2017-02-25 +lastmod: 2017-05-25 categories: [templates] tags: [lookup,fundamentals] menu: @@ -45,21 +45,6 @@ The respective lookup order for each of Hugo's templates has been defined throug * [RSS Templates][rsslookup] * [Shortcode Templates][sclookup] -[base]: /templates/base/#base-template-lookup-order -[config]: /getting-started/configuration/ -[directory structure]: /getting-started/directory-structure/ -[DRY]: https://en.wikipedia.org/wiki/Don%27t_repeat_yourself -[home]: /templates/homepage/#homepage-template-lookup-order -[rsslookup]: /templates/rss/#rss-template-lookup-order -[sclookup]: /templates/shortcode-templates/#shortcode-template-lookup-order -[sections]: /content-management/sections/ -[sectionlookup]: /templates/section-templates/#section-template-lookup-order -[single page templates]: /templates/single-page-templates/ -[singlelookup]: /templates/single-page-templates/#single-page-template-lookup-order -[switch]: https://en.wikipedia.org/wiki/Switch_statement#Fallthrough -[taxonomylookup]: /templates/taxonomy-templates/#taxonomy-list-template-lookup-order -[termslookup]: /templates/taxonomy-templates/#taxonomy-terms-template-lookup-order - ## Template Lookup Examples The lookup order is best illustrated through examples. The following shows you the process Hugo uses for finding the appropriate template to render your [single page templates][], but the concept holds true for all templates in Hugo. @@ -195,3 +180,18 @@ Here is the way Hugo traverses the single-page lookup order for `my-first-event. {{% note %}} `my-first-event.md` is significant because it demonstrates the role of the lookup order in Hugo themes. Both the root project directory *and* the `mytheme` themes directory have a file at `_default/single.html`. Understanding this order allows you to [customize Hugo themes](/themes/customizing/) by creating template files with identical names in your project directory that step in front of theme template files in the lookup. This allows you to customize the look and feel of your website while maintaining compatibility with the theme's upstream. {{% /note %}} + +[base]: /templates/base/#base-template-lookup-order +[config]: /getting-started/configuration/ +[directory structure]: /getting-started/directory-structure/ +[DRY]: https://en.wikipedia.org/wiki/Don%27t_repeat_yourself +[home]: /templates/homepage/#homepage-template-lookup-order +[rsslookup]: /templates/rss/#rss-template-lookup-order +[sclookup]: /templates/shortcode-templates/#shortcode-template-lookup-order +[sections]: /content-management/sections/ +[sectionlookup]: /templates/section-templates/#section-template-lookup-order +[single page templates]: /templates/single-page-templates/ +[singlelookup]: /templates/single-page-templates/#single-page-template-lookup-order +[switch]: https://en.wikipedia.org/wiki/Switch_statement#Fallthrough +[taxonomylookup]: /templates/taxonomy-templates/#taxonomy-list-template-lookup-order +[termslookup]: /templates/taxonomy-templates/#taxonomy-terms-template-lookup-order