mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 16:45:32 -04:00
use Hugo's native menu config for nav bar links
This commit is contained in:
23
config.toml
23
config.toml
@@ -47,6 +47,29 @@ disableAliases = true
|
||||
linkedin = "jakejarvis"
|
||||
mastodon = "pogge.rs/@jake"
|
||||
|
||||
[menu]
|
||||
[[menu.main]]
|
||||
name = "Home"
|
||||
pre = "🏠"
|
||||
url = "/"
|
||||
weight = -100
|
||||
[[menu.main]]
|
||||
name = "Notes"
|
||||
pre = "📝"
|
||||
url = "/notes/"
|
||||
weight = -90
|
||||
[[menu.main]]
|
||||
name = "GitHub"
|
||||
pre = "👨‍💻"
|
||||
url = "https://github.com/jakejarvis"
|
||||
weight = -80
|
||||
[[menu.main]]
|
||||
name = "Email"
|
||||
pre = "📬"
|
||||
# encode my email address -- probably not effective but why not?
|
||||
url = "mailto:jake@jarv.is"
|
||||
weight = -70
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "ALGOLIA", "MANIFEST", "REDIRECTS", "HEADERS"]
|
||||
section = ["HTML"]
|
||||
|
@@ -1,14 +1,13 @@
|
||||
<header>
|
||||
<nav>
|
||||
<a class="no-underline" href="{{ .Site.BaseURL }}" id="logo" rel="me author" title="{{ .Site.Title }}" aria-label="{{ .Site.Title }}">
|
||||
<a class="no-underline" href="{{ .Site.BaseURL }}" id="logo" rel="me author" aria-label="{{ .Site.Title }}">
|
||||
{{ partialCached "page/logo" . }}
|
||||
<h1 id="name">{{ .Site.Title }}</h1>
|
||||
</a>
|
||||
<ul>
|
||||
<li><a class="no-underline" href="{{ .Site.BaseURL }}" title="Home"><span class="emoji">🏠</span><span class="text">Home</span></a></li>
|
||||
<li><a class="no-underline" href="{{ "notes/" | absURL }}" title="Notes"><span class="emoji">📝</span><span class="text">Notes</span></a></li>
|
||||
{{ with .Site.Author.github }}<li><a class="no-underline" href="https://github.com/{{ . }}" title="GitHub" target="_blank" rel="me noopener"><span class="emoji">👨‍💻</span><span class="text">GitHub</span></a></li>{{ end }}
|
||||
<li><a class="no-underline" href="mailto:jake@jarv.is" title="Email Me"><span class="emoji">📬</span><span class="text">Email</span></a></li>
|
||||
{{- range .Site.Menus.main }}
|
||||
<li><a class="no-underline" {{ printf "href=%q" .URL | safeHTMLAttr }} aria-label="{{ .Name }}"{{ if strings.HasPrefix .URL "http" }} target="_blank" rel="me noopener"{{ end }}><span class="emoji">{{ .Pre }}</span><span class="text">{{ .Name }}</span></a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
Reference in New Issue
Block a user