Browse Source

Inserting home link based on the URL

master
digitalcraftsman 10 years ago
parent
commit
297d970922
  1. 3
      layouts/partials/nav.html

3
layouts/partials/nav.html

@ -1,6 +1,9 @@
<nav class="main-nav">
<!-- TODO: Show link only if current page is NOT home -->
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ if ne $url "" }}
<a href='{{ .Site.BaseURL }}'> <span class="arrow"></span>Home</a>
{{ end }}
<!-- TODO: If .PermaLink == /about then don't show this link -->
<a href='{{ .Site.BaseURL }}about'>About</a>

Loading…
Cancel
Save