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

github.com/Fastbyte01/KeepIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Pignataro <rogepix@gmail.com>2019-05-05 11:25:43 +0300
committerGiuseppe Pignataro <rogepix@gmail.com>2019-05-05 11:25:43 +0300
commitfc248e808b1de1d4a5fc3219bfee4ef303721f6f (patch)
tree0bf78c6815508ed2d7cc8c7eaddefa8c9d54e759
parent8b49c5eaa2d68eeaf0549df00020c1191d1c37b1 (diff)
Various Fix and added support for Hugo 0.55
-rw-r--r--layouts/_default/terms.html48
-rw-r--r--layouts/index.atom.xml2
-rw-r--r--layouts/partials/comments.html3
-rw-r--r--layouts/partials/head.html7
-rw-r--r--layouts/partials/header.html2
-rw-r--r--layouts/partials/home_post.html2
-rw-r--r--layouts/partials/paginator.html2
-rw-r--r--layouts/rss.xml10
8 files changed, 62 insertions, 14 deletions
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 3a192a0..391e3c2 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -26,6 +26,34 @@
<span class="more-post">
<a href="{{ .Permalink }}" class="more-post-link">{{ i18n "More" }} >></a>
</span>
+ {{ end }}{{ define "content" }}
+
+{{ $termName := .Data.Plural }}
+{{ $terms := .Data.Terms.ByCount }}
+{{ $length := len $terms }}
+{{ $type := .Type }}
+<!-- Categories Page -->
+<div class="post-warp {{.Data.Plural}}">
+ <h2 class="post-title" style="text-align:right;padding-bottom:2em">-&nbsp;{{ .Data.Plural | humanize }}&nbsp;-</h2>
+{{ if and $.Site.Taxonomies.categories (eq $termName "categories") }}
+
+<div class="categories-card">
+{{ range $terms }}
+ {{ $term := .Term }}
+ {{ $pages := .Pages }}
+ {{ with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $term) }}
+ <div class="card-item">
+ <div class="categories" >
+ <a href="{{ .Permalink }}"><h3> <i class="iconfont icon-folder" style="padding-right: 3px"></i> {{ $term | humanize}} </h3> </a>
+ {{ range first 5 $pages }}
+ <article class="archive-item">
+ <a href="{{ .Permalink }}" class="archive-item-link">{{ .Title }}</a>
+ </article>
+ {{ end }}
+ {{ if gt (len $pages) 5 }}
+ <span class="more-post">
+ <a href="{{ .Permalink }}" class="more-post-link">{{ i18n "More" }} >></a>
+ </span>
{{ end }}
</div>
</div>
@@ -44,4 +72,22 @@
{{ end }}
</div>
-{{end }} \ No newline at end of file
+{{end }}
+ </div>
+ </div>
+ {{ end }}
+{{ end }}
+</div> <!-- //categories-card -->
+ <!-- Tag cloud Page -->
+{{ else if and $.Site.Taxonomies.tags (eq $termName "tags") }}
+ <div class="tag-cloud-tags">
+ {{ range $.Site.Taxonomies.tags.ByCount }}
+ {{ if .Name }}
+ <a href="/tags/{{ .Name | urlize}}/"> {{ .Name }} <small>({{ .Count }})</small></a>
+ {{ end }}
+ {{end}}
+ </div>
+
+{{ end }}
+</div>
+{{end }}
diff --git a/layouts/index.atom.xml b/layouts/index.atom.xml
index 9192e0c..725add4 100644
--- a/layouts/index.atom.xml
+++ b/layouts/index.atom.xml
@@ -24,4 +24,4 @@
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
{{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
</entry>{{ end }}
-</feed> \ No newline at end of file
+</feed>
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
index 6a0d0ab..d554938 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -40,7 +40,7 @@
<!-- valine -->
{{- if .Site.Params.valine.enable -}}
<span
- id="{{ .URL | relURL }}"
+ id="{{ .RelPermalink | relURL }}"
class="leancloud_visitors"
data-flag-title="{{ .Title }}"
>
@@ -65,3 +65,4 @@
</script>
{{- end -}}
{{- end }}
+
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 12de83e..bfaaa2f 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -31,9 +31,9 @@
</title>
<meta name="title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else if .Params.heading }}{{ .Params.heading }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end}}">
{{ partial "css" . }}
- {{ if .RSSLink }}
- <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
- <link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
+ {{ with .OutputFormats.Get "RSS" }}
+ <link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ site.Title }}">
+ <link rel="feed" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ site.Title }}">
{{ end }}
{{- template "_internal/twitter_cards.html" . }}
{{ partial "seo_schema" . }}
@@ -45,3 +45,4 @@
{{ end }}
{{ end }}
{{ .Scratch.Set "cdn_url" $cdn_url }}
+
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 76b93fb..875bcde 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -28,4 +28,4 @@
{{ end }}
</div>
</div>
-</nav> \ No newline at end of file
+</nav>
diff --git a/layouts/partials/home_post.html b/layouts/partials/home_post.html
index 061f6bc..9103a78 100644
--- a/layouts/partials/home_post.html
+++ b/layouts/partials/home_post.html
@@ -58,7 +58,7 @@
{{ with .Params.tags }}
<div class="post-tags">
{{ range . }}
- <span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}/">
+ <span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}/">
#{{.}}</a></span>
{{ end }}
</div>
diff --git a/layouts/partials/paginator.html b/layouts/partials/paginator.html
index dd341aa..4451b99 100644
--- a/layouts/partials/paginator.html
+++ b/layouts/partials/paginator.html
@@ -26,4 +26,4 @@
{{ end }}
{{ end }}
</ul>
-{{ end }} \ No newline at end of file
+{{ end }}
diff --git a/layouts/rss.xml b/layouts/rss.xml
index 935d316..ebfb43b 100644
--- a/layouts/rss.xml
+++ b/layouts/rss.xml
@@ -5,20 +5,20 @@
<description>Recent content {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
- <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
- <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
+ <managingEditor>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
+ <webMaster>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
- <atom:link href="{{.URL}}" rel="self" type="application/rss+xml" />
+ <atom:link href="{{.Permalink}}" rel="self" type="application/rss+xml" />
{{ range first 15 (where .Data.Pages "Type" "!=" "home") }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
- {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
+ {{ with .Site.Author.email }}<author>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>
{{ end }}
</channel>
-</rss> \ No newline at end of file
+</rss>