There has been confusion regarding the use of _index.md pages following the shift to 'Everything is a Page' in Hugo v0.18: https://discuss.gohugo.io/t/hugo-0-18-ignores-index-md-in-the-section/4896 This has lead to attempts at clarification: https://discuss.gohugo.io/t/-index-md-pages-in-section-taxonomies-etc-are-not-rendered-using-single-html-template/5466 There is also an open issue regarding improving the docs on this topic: https://github.com/spf13/hugo/issues/2827 This commit adds a dedicated page explaining how _index.md files fit into Hugo's template hierarchy, what they can contain and how to render content from them onto the respective list/terms/home page. What this commit doesn't do is address confusion over former behaviour of the 'index.md' files (note the lack of _). Instead it focuses on clarifying the new behaviour in the hope of rendering the old moot. Fixes #2827
2.5 KiB
aliases | lastmod | date | linktitle | menu | prev | next | notoc | title | weight | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2015-12-23 | 2013-07-01 | Example |
|
/content/multilingual | /content/using-index-md | true | Example Content File | 70 |
Some things are better shown than explained. The following is a very basic example of a content file written in Markdown:
mysite/content/project/nitro.md → http://mysite.com/project/nitro.html
With TOML front matter:
+++ date = "2013-06-21T11:27:27-04:00" title = "Nitro: A quick and simple profiler for Go" description = "Nitro is a simple profiler for your Golang applications" tags = [ "Development", "Go", "profiling" ] topics = [ "Development", "Go" ] slug = "nitro" project_url = "https://github.com/spf13/nitro" +++
# Nitro Quick and easy performance analyzer library for [Go](http://golang.org/). ## Overview Nitro is a quick and easy performance analyzer library for Go. It is useful for comparing A/B against different drafts of functions or different functions. ## Implementing Nitro Using Nitro is simple. First, use `go get` to install the latest version of the library. $ go get github.com/spf13/nitro Next, include nitro in your application.
You may also use the equivalent YAML front matter:
---
lastmod: 2015-12-23
date: "2013-06-21T11:27:27-04:00"
title: "Nitro: A quick and simple profiler for Go"
description: "Nitro is a simple profiler for your Go lang applications"
tags: [ "Development", "Go", "profiling" ]
topics: [ "Development", "Go" ]
slug: "nitro"
project_url: "https://github.com/spf13/nitro"
---
nitro.md
would be rendered as follows:
Nitro
Quick and easy performance analyzer library for Go.
Overview
Nitro is a quick and easy performance analyzer library for Go. It is useful for comparing A/B against different drafts of functions or different functions.
Implementing Nitro
Using Nitro is simple. First, use
go get
to install the latest version of the library.$ go get github.com/spf13/nitro
Next, include nitro in your application.
The source nitro.md
file is converted to HTML by the excellent
Blackfriday Markdown processor,
which supports extended features found in the popular
GitHub Flavored Markdown.