fix: fix navigation url

master
nodejh 4 years ago
parent ed49811eda
commit 706cd8f8e9

@ -10,7 +10,7 @@
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }}
<link rel="stylesheet" href={{ "css/style.css" | relURL }}>
<link rel="stylesheet" href={{ "/css/style.css" | relURL }}>
<link rel="shortcut icon" href={{ "/images/favicon.ico" | relURL }} type="image/x-icon" />

@ -1,11 +1,10 @@
<nav class="navigation">
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if not .IsHome }}
<a href='{{ .Site.BaseURL }}'> <span class="arrow"></span>{{ with .Site.Params.home }}{{ . }}{{ else }}Home{{ end }}</a>
<a href='/'> <span class="arrow"></span>{{ with .Site.Params.home }}{{ . }}{{ else }}Home{{ end }}</a>
{{ end }}
<a href='{{ .Site.BaseURL }}posts'>{{ with .Site.Params.archive }}{{ . }}{{ else }}Archive{{ end }}</a>
<a href='{{ .Site.BaseURL }}tags'>{{ with .Site.Params.tags }}{{ . }}{{ else }}Tags{{ end }}</a>
<a href='{{ .Site.BaseURL }}about'>{{ with .Site.Params.about }}{{ . }}{{ else }}About{{ end }}</a>
<a href='/posts'>{{ with .Site.Params.archive }}{{ . }}{{ else }}Archive{{ end }}</a>
<a href='/tags'>{{ with .Site.Params.tags }}{{ . }}{{ else }}Tags{{ end }}</a>
<a href='/about'>{{ with .Site.Params.about }}{{ . }}{{ else }}About{{ end }}</a>
{{ range $element := .Site.Params.Links }}
<a href="{{ $element.path }}">{{ $element.name }}</a>

@ -1,10 +1,10 @@
<header class="profile">
{{ if .Site.Params.avatarLink }}
<a href="{{ .Site.Params.avatarLink }}">
<img class="avatar" alt="avatar" src="{{ .Site.BaseURL }}images/avatar.png" />
<img class="avatar" alt="avatar" src="/images/avatar.png" />
</a>
{{ else }}
<img class="avatar" alt="avatar" src="{{ .Site.BaseURL }}images/avatar.png" />
<img class="avatar" alt="avatar" src="/images/avatar.png" />
{{ end }}
<h1>{{ .Site.Title }}</h1>

Loading…
Cancel
Save