fix the problem wrong url for secondary path location
This commit is contained in:
parent
af6cb2b23e
commit
f49368aa50
3 changed files with 9 additions and 8 deletions
|
@ -10,30 +10,30 @@
|
|||
{{ define "pagination" }}
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="/{{sub .Paginator.PageNumber 1 }}" tabindex="-1">Previous</a>
|
||||
<a class="page-link" href="{{$.Site.BaseURL}}/{{sub .Paginator.PageNumber 1 }}" tabindex="-1">Previous</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="/{{sub .Paginator.PageNumber 1 }}" tabindex="-1">Previous</a>
|
||||
<a class="page-link" href="{{$.Site.BaseURL}}/{{sub .Paginator.PageNumber 1 }}" tabindex="-1">Previous</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ $current_num := .Paginator.PageNumber }}
|
||||
{{ range (seq 1 .Paginator.TotalPages) }}
|
||||
{{ if (eq $current_num .)}}
|
||||
<li class="page-item active"><a class="page-link" href="/{{.}}">{{.}}</a></li>
|
||||
<li class="page-item active"><a class="page-link" href="{{$.Site.BaseURL}}/{{.}}">{{.}}</a></li>
|
||||
{{ else }}
|
||||
<li class="page-item"><a class="page-link" href="/{{.}}">{{.}}</a></li>
|
||||
<li class="page-item"><a class="page-link" href="{{$.Site.BaseURL}}/{{.}}">{{.}}</a></li>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
|
||||
{{ if .Paginator.HasNext }}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="/{{ add .Paginator.PageNumber 1 }}">Next</a>
|
||||
<a class="page-link" href="{{$.Site.BaseURL}}/{{ add .Paginator.PageNumber 1 }}">Next</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="/{{ add .Paginator.PageNumber 1 }}">Next</a>
|
||||
<a class="page-link" href="{{$.Site.BaseURL}}/{{ add .Paginator.PageNumber 1 }}">Next</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -29,7 +29,7 @@
|
|||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<!-- the Moments style css file -->
|
||||
<link rel="stylesheet" type="text/css" href="/css/style.css">
|
||||
<link rel="stylesheet" type="text/css" href="{{.Site.BaseURL}}/css/style.css">
|
||||
|
||||
<!-- website title -->
|
||||
<title>{{ .Site.Params.title }}</title>
|
|
@ -13,7 +13,8 @@
|
|||
{{ with .Params.avatar }}
|
||||
<img src='{{ . }}' class="avatar">
|
||||
{{ else }}
|
||||
<img src='{{ .Site.Params.avatar}}' class="avatar">
|
||||
<!-- fixme check whether the default avatar path is url or not-->
|
||||
<img src='{{ $.Site.BaseURL }}/{{ .Site.Params.avatar }}' class="avatar">
|
||||
{{ end }}
|
||||
<div class="intro">
|
||||
{{ with .Params.name }}
|
||||
|
|
Loading…
Add table
Reference in a new issue