mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 02:46:16 +01:00
Various Fix and added support for Hugo 0.55
This commit is contained in:
parent
8b49c5eaa2
commit
fc248e808b
8 changed files with 62 additions and 14 deletions
|
@ -21,6 +21,34 @@
|
|||
<article class="archive-item">
|
||||
<a href="{{ .URL }}" 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 }}{{ 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">- {{ .Data.Plural | humanize }} -</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">
|
||||
|
@ -44,4 +72,22 @@
|
|||
|
||||
{{ end }}
|
||||
</div>
|
||||
{{end }}
|
||||
{{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 }}
|
||||
|
|
|
@ -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>
|
||||
</feed>
|
||||
|
|
|
@ -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 }}
|
||||
|
||||
|
|
|
@ -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 }}
|
||||
|
||||
|
|
|
@ -28,4 +28,4 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</nav>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -26,4 +26,4 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -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>
|
||||
</rss>
|
||||
|
|
Loading…
Reference in a new issue