~tristan957/tristan.partin.io

66b97e94a0762bddb03d85414cc59b285066559f — Tristan Partin 23 days ago 1225b5e
Pass context to nav.html
3 files changed, 8 insertions(+), 4 deletions(-)

M layouts/_default/baseof.html
M layouts/index.html
M layouts/partials/nav.html
M layouts/_default/baseof.html => layouts/_default/baseof.html +1 -1
@@ 2,7 2,7 @@
<html lang="{{ .Site.LanguageCode }}">
{{ partial "head.html" . }}
<body>
	{{ partial "nav.html" }}
	{{ partial "nav.html" . }}
	<div id="page-container">
		<div id="content-container">
			<main id="main">

M layouts/index.html => layouts/index.html +1 -1
@@ 2,7 2,7 @@
<html lang="{{ .Site.LanguageCode }}">
	{{ partial "head.html" . }}
<body>
	{{ partial "nav.html" }}
	{{ partial "nav.html" . }}
	<div id="page-container">
		<div id="content-container">
			<main id="main">

M layouts/partials/nav.html => layouts/partials/nav.html +6 -2
@@ 2,8 2,12 @@
	<nav id="nav">
		<ul class="undecorated-list">
			<li><a class="undecorated-link" href="/">Home</a></li>
			<!-- Why does .GetPage not work here? Frustrating... -->
			<li><a class="undecorated-link" href="/blog/">Blog</a></li>
			{{ with .Site.GetPage "blog" }}
				<li><a class="undecorated-link" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
			{{ end }}
			{{ with .Site.GetPage "archives" }}
				<li><a class="undecorated-link" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
			{{ end }}
		</ul>
	</nav>
</header>