mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	@@ -989,3 +989,17 @@ responses of APIs.
 | 
			
		||||
    {{ $resp.content | base64Decode | markdownify }}
 | 
			
		||||
 | 
			
		||||
The response of the GitHub API contains the base64-encoded version of the [README.md](https://github.com/spf13/hugo/blob/master/README.md) in the Hugo repository. Now we can decode it and parse the Markdown. The final output will look similar to the rendered version on GitHub.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## .Site.GetPage
 | 
			
		||||
Every `Page` as a `Kind` attribute that shows what kind of page it is. While this attribute can be used to list pages of a certain `kind` using `where`, often it can be useful to fetch a single page by its path.
 | 
			
		||||
 | 
			
		||||
GetPage looks up an index page of a given `Kind` and `path`. This method may support regular pages in the future, but currently it is a convenient way of getting the index pages such as the home page or a section from a template:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
 {{ with .Site.GetPage "section" "blog" }}{{ .Title }}{{ end }}
 | 
			
		||||
 ```
 | 
			
		||||
 
 | 
			
		||||
This method wil return `nil` when no page could be found, so the above will not print anything if the blog section isn't found.
 | 
			
		||||
 | 
			
		||||
The valid page kinds are: *home, section, taxonomy and taxonomyTerm.*
 | 
			
		||||
 
 | 
			
		||||
@@ -28,6 +28,8 @@ In addition to the standard page variables, the homepage has access to
 | 
			
		||||
all site content accessible from `.Data.Pages`. Details on how to use the
 | 
			
		||||
list of pages can be found in the [Lists Template](/templates/list/).
 | 
			
		||||
 | 
			
		||||
Note that a home page can also have a content file with frontmatter,  see [Source Organization]({{< relref "overview/source-directory.md#content-for-home-page-and-other-list-pages" >}}).
 | 
			
		||||
 | 
			
		||||
## Which Template will be rendered?
 | 
			
		||||
Hugo uses a set of rules to figure out which template to use when
 | 
			
		||||
rendering a specific page.
 | 
			
		||||
 
 | 
			
		||||
@@ -46,6 +46,7 @@ A Section will be rendered at /`SECTION`/ (e.g. http://spf13.com/project/)
 | 
			
		||||
* /themes/`THEME`/layouts/\_default/section.html
 | 
			
		||||
* /themes/`THEME`/layouts/\_default/list.html
 | 
			
		||||
 | 
			
		||||
Note that a sections list page can also have a content file with frontmatter,  see [Source Organization]({{< relref "overview/source-directory.md#content-for-home-page-and-other-list-pages" >}}).
 | 
			
		||||
 | 
			
		||||
### Taxonomy Lists
 | 
			
		||||
 | 
			
		||||
@@ -58,6 +59,8 @@ A Taxonomy will be rendered at /`PLURAL`/`TERM`/ (e.g. http://spf13.com/top
 | 
			
		||||
* /themes/`THEME`/layouts/\_default/taxonomy.html
 | 
			
		||||
* /themes/`THEME`/layouts/\_default/list.html
 | 
			
		||||
 | 
			
		||||
Note that a taxonomy list page can also have a content file with frontmatter,  see [Source Organization]({{< relref "overview/source-directory.md#content-for-home-page-and-other-list-pages" >}}).
 | 
			
		||||
 | 
			
		||||
### Section RSS
 | 
			
		||||
 | 
			
		||||
A Section’s RSS will be rendered at /`SECTION`/index.xml (e.g. http://spf13.com/project/index.xml)
 | 
			
		||||
 
 | 
			
		||||
@@ -20,6 +20,8 @@ A unique template is needed to create a list of the terms for a given
 | 
			
		||||
taxonomy. This is different from the [list template](/templates/list/)
 | 
			
		||||
as that template is a list of content, whereas this is a list of meta data.
 | 
			
		||||
 | 
			
		||||
Note that a taxonomy terms page can also have a content file with frontmatter,  see [Source Organization]({{< relref "overview/source-directory.md#content-for-home-page-and-other-list-pages" >}}).
 | 
			
		||||
 | 
			
		||||
## Which Template will be rendered?
 | 
			
		||||
Hugo uses a set of rules to figure out which template to use when
 | 
			
		||||
rendering a specific page.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user