Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiaoheiAh/hugo-theme-pure.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/head.html10
-rw-r--r--layouts/partials/item-post.html12
-rw-r--r--layouts/partials/post/category.html2
-rw-r--r--layouts/partials/post/date.html2
-rw-r--r--layouts/partials/post/tag.html2
-rw-r--r--layouts/partials/script.html10
6 files changed, 21 insertions, 17 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 3119aec..3b33df5 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -50,13 +50,13 @@
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
-
- <link rel="stylesheet" href="{{ "css/style.css" | absURL }}">
- <link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/9.15.10/styles/github.min.css">
+ {{ $css := resources.Get "css/style.css" | minify | fingerprint}}
+ <link rel="stylesheet" href="{{ $css.Permalink }}">
+ <link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/9.15.10/styles/github.min.css" async>
{{- if eq .Site.Params.comment.type "gitalk"}}
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css" async>
{{- end }}
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.css">
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.css" async>
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/spf13/hugo/blob/master/tpl/tplimpl/template_embedded.go#L158 */}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/google_news.html" . -}}
diff --git a/layouts/partials/item-post.html b/layouts/partials/item-post.html
index cc289d2..6acd9e2 100644
--- a/layouts/partials/item-post.html
+++ b/layouts/partials/item-post.html
@@ -1,8 +1,8 @@
-<a href="{{- .Permalink }}" class="collection-item" itemprop="url" target="_blank" >
- <time datetime="{{ .Date }}"
- itemprop="datePublished">
- {{ if .Date }}
+<a href="{{- .Permalink }}" class="collection-item" itemprop="url" target="_blank">
+ {{- if .Date }}
+ <time datetime="{{ .Date }}" itemprop="datePublished">
{{- .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
- {{ end }}</time>
- <span>&nbsp;&nbsp;&nbsp;</span> {{- .Title }}
+ </time>
+ {{- end }}
+ {{- .Title }}
</a> \ No newline at end of file
diff --git a/layouts/partials/post/category.html b/layouts/partials/post/category.html
index 2a49f04..bd06f49 100644
--- a/layouts/partials/post/category.html
+++ b/layouts/partials/post/category.html
@@ -1,6 +1,6 @@
{{- with .Params.categories -}}
<span class="article-category">
- <i class="icon icon-folder"></i>
+ <i class="icon icon-folder"></i>&nbsp;
{{- range . }}
<a class="article-category-link" href="{{ "categories" | relLangURL }}/{{ . | urlize }}/"> {{ . }} </a>
{{- end}}
diff --git a/layouts/partials/post/date.html b/layouts/partials/post/date.html
index b440287..b519b55 100644
--- a/layouts/partials/post/date.html
+++ b/layouts/partials/post/date.html
@@ -1,6 +1,6 @@
{{ if .Date }}
<span class="article-date">
- <i class="icon icon-calendar-check"></i>
+ <i class="icon icon-calendar-check"></i>&nbsp;
<a href="{{- .Permalink }}" class="{{ .Scratch.Get "class_name" }}">
<time datetime="{{ .Date }}" itemprop="datePublished">{{- .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}</time>
</a>
diff --git a/layouts/partials/post/tag.html b/layouts/partials/post/tag.html
index de641bc..1c5b7d6 100644
--- a/layouts/partials/post/tag.html
+++ b/layouts/partials/post/tag.html
@@ -1,6 +1,6 @@
{{- with .Params.tags}}
<span class="article-tag">
- <i class="icon icon-tags"></i>
+ <i class="icon icon-tags"></i>&nbsp;
{{- range . }}
<a class="article-tag-link" href="{{ "tags" | relLangURL }}/{{ . | urlize }}/"> {{ . }} </a>
{{- end}}
diff --git a/layouts/partials/script.html b/layouts/partials/script.html
index 9ff925c..ec8f898 100644
--- a/layouts/partials/script.html
+++ b/layouts/partials/script.html
@@ -17,8 +17,11 @@
})
hljs.initHighlightingOnLoad();
</script>
-<script type="text/javascript" src="{{ "js/application.js" | absURL }}"></script>
-<script type="text/javascript" src="{{ "js/plugin.js" | absURL }}"></script>
+{{- $appjs := resources.Get "js/application.js" | resources.Minify | resources.Fingerprint}}
+<script src="{{- $appjs.Permalink }}"></script>
+{{- $plugin := resources.Get "js/plugin.js" | resources.Minify | resources.Fingerprint}}
+<script src="{{- $plugin.Permalink }}"></script>
+
<script>
(function (window) {
var INSIGHT_CONFIG = {
@@ -35,7 +38,8 @@
window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
-<script type="text/javascript" src="{{ "js/insight.js" | absURL }}"></script>
+{{- $insight := resources.Get "js/insight.js" | resources.Minify | resources.Fingerprint "sha512" }}
+<script type="text/javascript" src="{{- $insight.Permalink }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.min.js"></script>
<script>
tocbot.init({