diff options
-rw-r--r-- | layouts/partials/after_footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/article_catetags.html | 6 | ||||
-rw-r--r-- | layouts/partials/head.html | 15 |
3 files changed, 12 insertions, 11 deletions
diff --git a/layouts/partials/after_footer.html b/layouts/partials/after_footer.html index 1851614..c10c776 100644 --- a/layouts/partials/after_footer.html +++ b/layouts/partials/after_footer.html @@ -45,7 +45,7 @@ $(document).ready(function(){ if (false === done) { event.preventDefault(); var orgVal = $(this).find('#search').val(); - $(this).find('#search').val('site:{{ .Site.BaseURL }}} ' + orgVal); + $(this).find('#search').val('site:{{ .Site.BaseURL }} ' + orgVal); done = true; $(this).submit(); } diff --git a/layouts/partials/article_catetags.html b/layouts/partials/article_catetags.html index 3874707..09a0ace 100644 --- a/layouts/partials/article_catetags.html +++ b/layouts/partials/article_catetags.html @@ -3,16 +3,18 @@ <div class="article-tags"> <span></span> {{ range .Params.tags }} - <a href="/tags/{{ . | urlize }}">{{ . }}</a> + <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a> {{ end }} </div> {{ end }} +{{ end }} +{{ if isset .Params "categories" }} {{ if not (eq (len .Params.categories) 0) }} <div class="article-categories"> <span></span> {{ range .Params.categories }} - <a class="article-category-link" href="/categories/{{ . | urlize }}">{{ . }}</a> + <a class="article-category-link" href="{{ $.Site.BaseURL }}categories/{{ . | urlize }}">{{ . }}</a> {{ end }} </div> {{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index c20f507..7c95b76 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -2,7 +2,6 @@ <html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}zh-CN{{ end }}"> <head> <meta charset="UTF-8"> - <base href="{{ .Site.BaseURL }}"> <title>{{ if ne .URL "/" }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3, minimum-scale=1"> {{ if .Keywords }}<meta name="keywords" content="{{ range .Keywords }}{{ . }},{{ end }}">{{ else if eq .URL "/" }}<meta name="keywords" content="{{ .Site.Params.Keywords }}">{{ end }} @@ -17,12 +16,12 @@ {{ with .Description }}<meta name="twitter:description" content="{{ . }}" />{{ else }} <meta name="twitter:description" content="{{ .Site.Params.Description }}">{{ end }} {{ if .RSSlink }}<link rel="alternate" href="{{ .Site.BaseURL }}feed.xml" title="{{ .Site.Title }}" type="application/rss+xml"/>{{ end }} - <link rel="shortcut icon" href="img/favicon.ico"/> - <link rel="apple-touch-icon" href="apple-touch-icon.png" /> - <link rel="apple-touch-icon-precomposed" href="apple-touch-icon.png" /> - <link rel="stylesheet" href="highlight/styles/github.css"> - <script src="highlight/highlight.pack.js"></script> + <link rel="shortcut icon" href="{{ .Site.BaseURL }}img/favicon.ico"/> + <link rel="apple-touch-icon" href="{{ .Site.BaseURL }}apple-touch-icon.png" /> + <link rel="apple-touch-icon-precomposed" href="{{ .Site.BaseURL }}apple-touch-icon.png" /> + <link rel="stylesheet" href="{{ .Site.BaseURL }}highlight/styles/github.css"> + <script src="{{ .Site.BaseURL }}highlight/highlight.pack.js"></script> <script>hljs.initHighlightingOnLoad();</script> - <link rel="stylesheet" href="font/hack/css/hack.min.css"> - <link rel="stylesheet" href="css/style.css"> + <link rel="stylesheet" href="{{ .Site.BaseURL }}font/hack/css/hack.min.css"> + <link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css"> </head> |