fix: some title case bugs for section page and list page (#251)

This commit is contained in:
Dillon 2020-04-23 01:22:29 +08:00 committed by GitHub
parent 07b669c826
commit d90a2d9406
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 67 additions and 65 deletions

View file

@ -3,9 +3,10 @@ title: "About LoveIt"
date: 2019-08-02T11:04:49+08:00 date: 2019-08-02T11:04:49+08:00
draft: false draft: false
lightgallery: true
math: math:
enable: true enable: true
lightgallery: true
--- ---
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/releases) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/releases)

View file

@ -3,9 +3,10 @@ title: "À propos de LoveIt"
date: 2019-08-02T11:04:49+08:00 date: 2019-08-02T11:04:49+08:00
draft: false draft: false
lightgallery: true
math: math:
enable: true enable: true
lightgallery: true
--- ---
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/releases) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/releases)

View file

@ -3,9 +3,10 @@ title: "关于 LoveIt"
date: 2019-08-02T11:04:49+08:00 date: 2019-08-02T11:04:49+08:00
draft: false draft: false
lightgallery: true
math: math:
enable: true enable: true
lightgallery: true
--- ---
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/releases) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/releases)

View file

@ -1,4 +1,3 @@
--- ---
title: "Documentation" title: "Documentation"
slug: "documentation"
--- ---

View file

@ -1,4 +1,3 @@
--- ---
title: "Documentation" title: "Documentation"
slug: "documentation"
--- ---

View file

@ -1,4 +1,3 @@
--- ---
title: "文档" title: "文档"
slug: "documentation"
--- ---

View file

@ -8,9 +8,8 @@ author: "Dillon"
authorLink: "https://dillonzq.com" authorLink: "https://dillonzq.com"
description: "This article shows the basic Markdown syntax and format." description: "This article shows the basic Markdown syntax and format."
tags: ["markdown"] tags: ["Markdown"]
categories: ["markdown"] categories: ["Markdown"]
featuredImage: "/images/basic-markdown-syntax/featured-image.png" featuredImage: "/images/basic-markdown-syntax/featured-image.png"
lightgallery: true lightgallery: true

View file

@ -8,9 +8,8 @@ author: "Dillon"
authorLink: "https://dillonzq.com" authorLink: "https://dillonzq.com"
description: "Cet article présente la syntaxe et le format de base de Markdown." description: "Cet article présente la syntaxe et le format de base de Markdown."
tags: ["markdown"] tags: ["Markdown"]
categories: ["markdown"] categories: ["Markdown"]
featuredImage: "/images/basic-markdown-syntax/featured-image.png" featuredImage: "/images/basic-markdown-syntax/featured-image.png"
lightgallery: true lightgallery: true

View file

@ -8,9 +8,8 @@ author: "Dillon"
authorLink: "https://dillonzq.com" authorLink: "https://dillonzq.com"
description: "这篇文章展示了基本的 Markdown 语法和格式." description: "这篇文章展示了基本的 Markdown 语法和格式."
tags: ["markdown"] tags: ["Markdown"]
categories: ["markdown"] categories: ["Markdown"]
featuredImage: "/images/basic-markdown-syntax/featured-image.png" featuredImage: "/images/basic-markdown-syntax/featured-image.png"
lightgallery: true lightgallery: true

View file

@ -9,8 +9,7 @@ authorLink: "https://dillonzq.com"
description: "Guide to emoji usage in Hugo and LoveIt." description: "Guide to emoji usage in Hugo and LoveIt."
tags: ["emoji"] tags: ["emoji"]
categories: ["markdown"] categories: ["Markdown"]
featuredImage: "/images/emoji-support/featured-image.jpg" featuredImage: "/images/emoji-support/featured-image.jpg"
lightgallery: true lightgallery: true

View file

@ -9,11 +9,8 @@ authorLink: "https://dillonzq.com"
description: "Guide d'utilisation des emoji dans Hugo et LoveIt." description: "Guide d'utilisation des emoji dans Hugo et LoveIt."
tags: ["emoji"] tags: ["emoji"]
categories: ["markdown"] categories: ["Markdown"]
hiddenFromHomePage: false
featuredImage: "/images/emoji-support/featured-image.jpg" featuredImage: "/images/emoji-support/featured-image.jpg"
featuredImagePreview: ""
lightgallery: true lightgallery: true
--- ---

View file

@ -9,8 +9,7 @@ authorLink: "https://dillonzq.com"
description: "Hugo 和 LoveIt 中的 Emoji 的用法指南." description: "Hugo 和 LoveIt 中的 Emoji 的用法指南."
tags: ["emoji"] tags: ["emoji"]
categories: ["markdown"] categories: ["Markdown"]
featuredImage: "/images/emoji-support/featured-image.jpg" featuredImage: "/images/emoji-support/featured-image.jpg"
lightgallery: true lightgallery: true

View file

@ -10,12 +10,12 @@ description: "Discover what the Hugo - LoveIt theme is all about and the core-co
tags: ["installation", "configuration"] tags: ["installation", "configuration"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-basics/featured-image.jpg" featuredImage: "/images/theme-documentation-basics/featured-image.jpg"
lightgallery: true
toc: toc:
auto: false auto: false
lightgallery: true
--- ---
Discover what the Hugo - **LoveIt** theme is all about and the core-concepts behind it. Discover what the Hugo - **LoveIt** theme is all about and the core-concepts behind it.

View file

@ -10,12 +10,12 @@ description: "Découvrez en quoi consiste le thème Hugo - LoveIt et les concept
tags: ["installation", "configuration"] tags: ["installation", "configuration"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-basics/featured-image.jpg" featuredImage: "/images/theme-documentation-basics/featured-image.jpg"
lightgallery: true
toc: toc:
auto: false auto: false
lightgallery: true
--- ---
Découvrez en quoi consiste le thème Hugo - **LoveIt** et les concepts fondamentaux qui le sous-tendent. Découvrez en quoi consiste le thème Hugo - **LoveIt** et les concepts fondamentaux qui le sous-tendent.

View file

@ -8,14 +8,14 @@ author: "Dillon"
authorLink: "https://dillonzq.com" authorLink: "https://dillonzq.com"
description: "探索 Hugo - LoveIt 主题的全部内容和背后的核心概念." description: "探索 Hugo - LoveIt 主题的全部内容和背后的核心概念."
tags: ["安装", "配置"] tags: ["installation", "configuration"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-basics/featured-image.jpg" featuredImage: "/images/theme-documentation-basics/featured-image.jpg"
lightgallery: true
toc: toc:
auto: false auto: false
lightgallery: true
--- ---
探索 Hugo - **LoveIt** 主题的全部内容和背后的核心概念. 探索 Hugo - **LoveIt** 主题的全部内容和背后的核心概念.

View file

@ -10,7 +10,6 @@ description: "Hugo provides multiple built-in shortcodes for author convenience
tags: ["shortcodes"] tags: ["shortcodes"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png" featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
lightgallery: true lightgallery: true

View file

@ -10,7 +10,6 @@ description: "Hugo fournit plusieurs shortcodes intégrés pour la commodité de
tags: ["shortcodes"] tags: ["shortcodes"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png" featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
lightgallery: true lightgallery: true

View file

@ -10,7 +10,6 @@ description: "Hugo 提供了多个内置的 Shortcodes, 以方便作者保持 Ma
tags: ["shortcodes"] tags: ["shortcodes"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png" featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
lightgallery: true lightgallery: true

View file

@ -8,16 +8,16 @@ author: "Dillon"
authorLink: "https://dillonzq.com" authorLink: "https://dillonzq.com"
description: "Find out how to create and organize your content quickly and intuitively in LoveIt theme." description: "Find out how to create and organize your content quickly and intuitively in LoveIt theme."
tags: ["content", "markdown"] tags: ["content", "Markdown"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-content/featured-image.jpg" featuredImage: "/images/theme-documentation-content/featured-image.jpg"
lightgallery: true
toc: toc:
auto: false auto: false
math: math:
enable: true enable: true
lightgallery: true
--- ---
Find out how to create and organize your content quickly and intuitively in **LoveIt** theme. Find out how to create and organize your content quickly and intuitively in **LoveIt** theme.

View file

@ -8,16 +8,16 @@ author: "Dillon"
authorLink: "https://dillonzq.com" authorLink: "https://dillonzq.com"
description: "Découvrez comment créer et organiser votre contenu rapidement et intuitivement dans le thème LoveIt." description: "Découvrez comment créer et organiser votre contenu rapidement et intuitivement dans le thème LoveIt."
tags: ["contenu", "markdown"] tags: ["content", "Markdown"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-content/featured-image.jpg" featuredImage: "/images/theme-documentation-content/featured-image.jpg"
lightgallery: true
toc: toc:
auto: false auto: false
math: math:
enable: true enable: true
lightgallery: true
--- ---
Découvrez comment créer et organiser votre contenu rapidement et intuitivement dans le thème **LoveIt**. Découvrez comment créer et organiser votre contenu rapidement et intuitivement dans le thème **LoveIt**.

View file

@ -8,16 +8,16 @@ author: "Dillon"
authorLink: "https://dillonzq.com" authorLink: "https://dillonzq.com"
description: "了解如何在 LoveIt 主题中快速, 直观地创建和组织内容." description: "了解如何在 LoveIt 主题中快速, 直观地创建和组织内容."
tags: ["内容", "markdown"] tags: ["content", "Markdown"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-content/featured-image.jpg" featuredImage: "/images/theme-documentation-content/featured-image.jpg"
lightgallery: true
toc: toc:
auto: false auto: false
math: math:
enable: true enable: true
lightgallery: true
--- ---
了解如何在 **LoveIt** 主题中快速, 直观地创建和组织内容. 了解如何在 **LoveIt** 主题中快速, 直观地创建和组织内容.

View file

@ -10,7 +10,6 @@ description: "LoveIt theme provides multiple shortcodes on top of built-in ones
tags: ["shortcodes"] tags: ["shortcodes"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg" featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg"
featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg" featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"

View file

@ -10,7 +10,6 @@ description: "Le thème LoveIt fournit plusieurs shortcodes en plus de ceux int
tags: ["shortcodes"] tags: ["shortcodes"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg" featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg"
featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg" featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"

View file

@ -10,7 +10,6 @@ description: "LoveIt 主题在 Hugo 内置的 shortcode 的基础上提供多个
tags: ["shortcodes"] tags: ["shortcodes"]
categories: ["documentation"] categories: ["documentation"]
featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg" featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg"
featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg" featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"

View file

@ -0,0 +1,3 @@
---
title: "配置"
---

View file

@ -0,0 +1,3 @@
---
title: "contenu"
---

View file

@ -0,0 +1,3 @@
---
title: "内容"
---

View file

@ -0,0 +1,3 @@
---
title: "安装"
---

View file

@ -1,12 +1,12 @@
{{- define "title" }} {{- define "title" }}
{{- T .Section | default .Section | printf (T "allSome") }} | {{ .Site.Title -}} {{- .Title | default (T .Section) | default .Section | printf (T "allSome") }} | {{ .Site.Title -}}
{{- end -}} {{- end -}}
{{- define "content" -}} {{- define "content" -}}
<div class="page archive"> <div class="page archive">
{{- /* Title */ -}} {{- /* Title */ -}}
<h2 class="single-title animated pulse faster"> <h2 class="single-title animated pulse faster">
{{- T .Section | default .Section | humanize | printf (T "allSome") -}} {{- .Title | default (T .Section) | default .Section | printf (T "allSome") -}}
</h2> </h2>
{{- /* Paginate */ -}} {{- /* Paginate */ -}}

View file

@ -33,8 +33,9 @@
{{- T "included" -}} {{- T "included" -}}
{{- range $index, $value := . -}} {{- range $index, $value := . -}}
{{- if gt $index 0 }}&nbsp;{{ end -}} {{- if gt $index 0 }}&nbsp;{{ end -}}
<a href="{{ `/categories/` | relLangURL }}{{ urlize $value }}"> {{- $category := printf "/categories/%s" $value | $.Site.GetPage -}}
<i class="far fa-folder fa-fw"></i>{{ $value | humanize }} <a href="{{ $category.RelPermalink }}">
<i class="far fa-folder fa-fw"></i>{{ $category.Title }}
</a> </a>
{{- end -}} {{- end -}}
</span> </span>
@ -58,7 +59,8 @@
<i class="fas fa-tags fa-fw"></i>&nbsp; <i class="fas fa-tags fa-fw"></i>&nbsp;
{{- range $index, $value := . -}} {{- range $index, $value := . -}}
{{- if gt $index 0 }},&nbsp;{{ end -}} {{- if gt $index 0 }},&nbsp;{{ end -}}
<a href="{{ `/tags/` | relLangURL }}{{ urlize $value }}">{{ $value }}</a> {{- $tag := printf "/tags/%s" $value | $.Site.GetPage -}}
<a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
{{- end -}} {{- end -}}
</div> </div>
{{- end -}} {{- end -}}

View file

@ -48,7 +48,8 @@
<i class="fas fa-tags fa-fw"></i>&nbsp; <i class="fas fa-tags fa-fw"></i>&nbsp;
{{- range $index, $value := . -}} {{- range $index, $value := . -}}
{{- if gt $index 0 }},&nbsp;{{ end -}} {{- if gt $index 0 }},&nbsp;{{ end -}}
<a href="{{ `/tags/` | relLangURL }}{{ urlize $value }}">{{ $value }}</a> {{- $tag := printf "/tags/%s" $value | $.Site.GetPage -}}
<a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
</section> </section>

View file

@ -1,13 +1,13 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> <rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel> <channel>
<title> <title>
{{- T .Section | default .Section | printf (T "allSome") }} | {{ .Site.Title -}} {{- .Title | default (T .Section) | default .Section | printf (T "allSome") }} | {{ .Site.Title -}}
</title> </title>
<link> <link>
{{- .Permalink -}} {{- .Permalink -}}
</link> </link>
<description> <description>
{{- T .Section | default .Section | printf (T "allSome") }} | {{ .Site.Title -}} {{- .Title | default (T .Section) | default .Section | printf (T "allSome") }} | {{ .Site.Title -}}
</description> </description>
<generator>Hugo -- gohugo.io</generator> <generator>Hugo -- gohugo.io</generator>
{{- with .Site.LanguageCode -}} {{- with .Site.LanguageCode -}}

View file

@ -36,8 +36,9 @@
{{- T "included" -}} {{- T "included" -}}
{{- range $index, $value := . -}} {{- range $index, $value := . -}}
{{- if gt $index 0 }}&nbsp;{{ end -}} {{- if gt $index 0 }}&nbsp;{{ end -}}
<a href="{{ `/categories/` | relLangURL }}{{ urlize $value }}"> {{- $category := printf "/categories/%s" $value | $.Site.GetPage -}}
<i class="far fa-folder fa-fw"></i>{{ $value | humanize }} <a href="{{ $category.RelPermalink }}">
<i class="far fa-folder fa-fw"></i>{{ $category.Title }}
</a> </a>
{{- end -}} {{- end -}}
</span> </span>

View file

@ -1,5 +1,5 @@
{{- define "title" -}} {{- define "title" -}}
{{- .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}} {{- .Title }} | {{ T .Data.Singular | default .Data.Singular }} | {{ .Site.Title -}}
{{- end -}} {{- end -}}
{{- define "content" -}} {{- define "content" -}}
@ -8,11 +8,11 @@
<h2 class="single-title animated pulse faster"> <h2 class="single-title animated pulse faster">
{{- $taxonomy := .Data.Singular -}} {{- $taxonomy := .Data.Singular -}}
{{- if eq $taxonomy "category" -}} {{- if eq $taxonomy "category" -}}
<i class="far fa-folder-open fa-fw"></i>&nbsp;{{ humanize .Title }} <i class="far fa-folder-open fa-fw"></i>&nbsp;{{ .Title }}
{{- else if eq $taxonomy "tag" -}} {{- else if eq $taxonomy "tag" -}}
<i class="fas fa-tag fa-fw"></i>&nbsp;{{ humanize .Title }} <i class="fas fa-tag fa-fw"></i>&nbsp;{{ .Title }}
{{- else -}} {{- else -}}
{{- printf "%s - %s" (T $taxonomy | default (humanize $taxonomy)) .Title -}} {{- printf "%s - %s" (T $taxonomy | default $taxonomy) .Title -}}
{{- end -}} {{- end -}}
</h2> </h2>

View file

@ -1,13 +1,13 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> <rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel> <channel>
<title> <title>
{{- .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}} {{- .Title }} | {{ T .Data.Singular | default .Data.Singular }} | {{ .Site.Title -}}
</title> </title>
<link> <link>
{{- .Permalink -}} {{- .Permalink -}}
</link> </link>
<description> <description>
{{- .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}} {{- .Title }} | {{ T .Data.Singular | default .Data.Singular }} | {{ .Site.Title -}}
</description> </description>
<generator>Hugo -- gohugo.io</generator> <generator>Hugo -- gohugo.io</generator>
{{- with .Site.LanguageCode -}} {{- with .Site.LanguageCode -}}

View file

@ -1,5 +1,5 @@
{{- define "title" -}} {{- define "title" -}}
{{- .Title | default (T .Data.Plural) | default (humanize .Data.Plural) }} | {{ .Site.Title -}} {{- .Title | default (T .Data.Plural) | default .Data.Plural }} | {{ .Site.Title -}}
{{- end -}} {{- end -}}
{{- define "content" -}} {{- define "content" -}}
@ -10,7 +10,7 @@
<div class="page archive"> <div class="page archive">
{{- /* Title */ -}} {{- /* Title */ -}}
<h2 class="single-title animated pulse faster"> <h2 class="single-title animated pulse faster">
{{- T "all" | humanize}}{{ T $taxonomies | default $taxonomies | humanize -}} {{- T "all" }}{{ T $taxonomies | default $taxonomies -}}
</h2> </h2>
{{- /* Categories Page */ -}} {{- /* Categories Page */ -}}
@ -24,7 +24,7 @@
<div class="card-item-wrapper"> <div class="card-item-wrapper">
<h3 class="card-item-title"> <h3 class="card-item-title">
<a href="{{ .RelPermalink }}"> <a href="{{ .RelPermalink }}">
<i class="far fa-folder fa-fw"></i>&nbsp;{{ $term | humanize}} <i class="far fa-folder fa-fw"></i>&nbsp;{{ .Page.Title }}
</a> </a>
</h3> </h3>
{{- range first 5 $pages -}} {{- range first 5 $pages -}}