fix: fix navigation url

master
nodejh 4 years ago
parent ed49811eda
commit 706cd8f8e9

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

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

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

Loading…
Cancel
Save