I am trying to add a page to my Hugo site, however, I am running into trouble getting the page to render the content (when using the layout - I can get the content to render without the layout). More specifically, I wanted to add a resume page to my site. Here is what I did:
- I added a
resume.mdfile to my content directory, with the following contents:
--- categories: ["resume"] date: "2016-10-02T22:55:05-04:00" tags: ["resume"] title: "Resume" showpagemeta: false layout: "resume" ---
- I added a layout file in
themes/mytheme/layouts/_default/resume.html, with the following contents:
<section id="resume"> <div class="container"> <h3>{{ .Site.Data.resume.name }}</h3> <div class="panel panel-default"> <div class="panel-body"> {{ range $i, $el := .Site.Data.resume.source }} <h5> <i class="{{ .icon }}"></i> <strong><a href="{{ $el.url }}">{{ $el.name }}</a></strong> - {{ $el.description }} </h5> {{ end }} </div> </div> </div> </section>
- I added the following to the
data/resume.yml:
name: Resume source: - icon: foo url: bar name: baz description: foo bar baz
Unfortunately when I go to the webpage, the page has no contents - to be specific, the header and footer defined in themes/mytheme/layouts/partials/{header.html,footer.html} as well as the css styling from themes/mytheme/static/css/main.css all show as expected but the resume does not!
Any help would be appreciated. I am using Hugo version: v0.40.1 linux/amd64.
Thanks!