I am working on a site using v0.20.2 and I was wondering is it possible to assign content (in markdown) to individual taxonomies.
I would like to have a page that includes a description of a taxonomy term and then list all projects that matches with that term.
Here is a breakdown of what I have to try to do this.
config.toml
contains the following for my taxonomies set up:
[taxonomies]
language = "Languages"
framework = "Frameworks"
infrastructure = "Infrastructure"
tool = "Tools"
archetypes/project.md
looks like this:
---
title: ""
description: ""
synopsis: ""
liveurl: ""
date: ""
duration: ""
languages: []
frameworks: []
infrastructure: []
tools: []
---
content/projects/opengl.md
looks like this:
---
title: "OpenGL"
description: "OpenGL experimentation on MacOS with C++."
synopsis: "Learning C++ and OpenGL by coding up some demos which explore 3d mathematics, lighting and transformations."
date: "2016-11-01"
duration: "Ongoing"
languages:
- C/C++
- GLSL
frameworks:
- OpenGL 3.2
tools:
- XCode
- CMake
- Github
---
This will be the content for this project.
layouts/_default/taxonomy.html
looks like this:
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
{{ partial "head" . }}
</head>
<body>
{{ partial "header" . }}
<section class="taxonomy">
{{ .Content }} <- I want content here.
</section>
{{ partial "footer" . }}
</body>
</html>
In the above file layouts/_default/taxonomy.html
I want to be able to include a title, description and the content, but I don’t know where to put this, or even if GoHugo is able to do this.
I would like to know where need to put the .md
file so I can have the {{ .Content }}
tag render some content I have created.
I did see a mention of it in the documentation, but there was not enough information to go on to point me in the right direction.
Can anyone help?
Thanks