diff --git a/archetypes/default.md b/archetypes/default.md index b1fb4108..3dfd94f3 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,5 +1,6 @@ --- title: "{{ replace .TranslationBaseName "-" " " | title }}" +subtitle: "" date: {{ .Date }} lastmod: {{ .Date }} draft: true diff --git a/assets/css/_page/_single.scss b/assets/css/_page/_single.scss index 89ada33f..fa588f87 100644 --- a/assets/css/_page/_single.scss +++ b/assets/css/_page/_single.scss @@ -6,6 +6,14 @@ line-height: 140%; } + .single-subtitle { + margin: .4rem 0; + font-size: 1.2rem; + font-weight: normal; + font-style: italic; + line-height: 100%; + } + .post-meta { font-size: .875rem; color: $global-font-secondary-color; diff --git a/assets/css/_page/_special.scss b/assets/css/_page/_special.scss index f61360d4..436d8d95 100644 --- a/assets/css/_page/_special.scss +++ b/assets/css/_page/_special.scss @@ -1,6 +1,5 @@ .special { - .single-title { + .single-title, .single-subtitle { text-align: right; - padding-bottom: 1rem; } } diff --git a/exampleSite/content/posts/basic-markdown-syntax.en.md b/exampleSite/content/posts/basic-markdown-syntax.en.md index dfda332d..df5ce48d 100644 --- a/exampleSite/content/posts/basic-markdown-syntax.en.md +++ b/exampleSite/content/posts/basic-markdown-syntax.en.md @@ -1,6 +1,7 @@ --- weight: 4 title: "Basic Markdown Syntax" +subtitle: "" date: 2019-12-01T21:57:40+08:00 lastmod: 2020-01-01T16:45:40+08:00 draft: false diff --git a/exampleSite/content/posts/basic-markdown-syntax.fr.md b/exampleSite/content/posts/basic-markdown-syntax.fr.md index 11bdda6a..dfc49e4d 100644 --- a/exampleSite/content/posts/basic-markdown-syntax.fr.md +++ b/exampleSite/content/posts/basic-markdown-syntax.fr.md @@ -1,6 +1,7 @@ --- weight: 4 title: "Syntaxe de Markdown de Base" +subtitle: "" date: 2019-12-01T21:57:40+08:00 lastmod: 2020-01-01T16:45:40+08:00 draft: false diff --git a/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md b/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md index 9a05b08c..4bff6d5b 100644 --- a/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md +++ b/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md @@ -1,6 +1,7 @@ --- weight: 4 title: "Markdown 基本语法" +subtitle: "" date: 2019-12-01T21:57:40+08:00 lastmod: 2020-01-01T16:45:40+08:00 draft: false diff --git a/exampleSite/content/posts/emoji-support.en.md b/exampleSite/content/posts/emoji-support.en.md index 6ec48b99..da3cf2c0 100644 --- a/exampleSite/content/posts/emoji-support.en.md +++ b/exampleSite/content/posts/emoji-support.en.md @@ -1,6 +1,7 @@ --- weight: 5 title: "Emoji Support" +subtitle: "" date: 2019-10-01T17:55:28+08:00 lastmod: 2019-10-01T17:55:28+08:00 draft: false diff --git a/exampleSite/content/posts/emoji-support.fr.md b/exampleSite/content/posts/emoji-support.fr.md index 86f6de64..94b0454d 100644 --- a/exampleSite/content/posts/emoji-support.fr.md +++ b/exampleSite/content/posts/emoji-support.fr.md @@ -1,6 +1,7 @@ --- weight: 5 title: "Emoji Support" +subtitle: "" date: 2019-10-01T17:55:28+08:00 lastmod: 2019-10-01T17:55:28+08:00 draft: false diff --git a/exampleSite/content/posts/emoji-support.zh-cn.md b/exampleSite/content/posts/emoji-support.zh-cn.md index a2cc76e5..e7e4c5c7 100644 --- a/exampleSite/content/posts/emoji-support.zh-cn.md +++ b/exampleSite/content/posts/emoji-support.zh-cn.md @@ -1,6 +1,7 @@ --- weight: 5 title: "Emoji 支持" +subtitle: "" date: 2019-10-01T17:55:28+08:00 lastmod: 2019-10-01T17:55:28+08:00 draft: false diff --git a/exampleSite/content/posts/theme-documentation-basics.en.md b/exampleSite/content/posts/theme-documentation-basics.en.md index 0758cfcd..4616aacc 100644 --- a/exampleSite/content/posts/theme-documentation-basics.en.md +++ b/exampleSite/content/posts/theme-documentation-basics.en.md @@ -1,6 +1,7 @@ --- weight: 1 title: "Theme Documentation - Basics" +subtitle: "" date: 2020-03-06T21:29:01+08:00 lastmod: 2020-03-06T21:29:01+08:00 draft: false @@ -37,7 +38,7 @@ Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only depende Just install latest version of [:(far fa-file-archive): Hugo (> 0.62.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**). {{< admonition note "Why not support earlier versions of Hugo?" >}} -Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks) was introduced in the [Hugo Christmas Edition](https://gohugo.io/news/0.62.0-relnotes/), this theme only supports Hugo versions above **v0.62.0**. +Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks) was introduced in the [Hugo Christmas Edition](https://gohugo.io/news/0.62.0-relnotes/), this theme only supports Hugo versions above **0.62.0**. {{< /admonition >}} ## 2 Installation @@ -188,7 +189,7 @@ Note that some of these parameters are explained in details in other sections of defaultTheme = "auto" # public git repo url only then enableGitInfo is true gitRepo = "" - # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1 + # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1 # which hash function used for SRI, when empty, no SRI is used ("sha256", "sha384", "sha512", "md5") fingerprint = "" # Header info @@ -348,13 +349,13 @@ Note that some of these parameters are explained in details in other sections of enable = true # Disqus Comment Config (https://disqus.com/) [params.comment.disqus] - # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1 + # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1 enable = false # Disqus shortname to use Disqus in posts shortname = "" # Gitalk Comment Config (https://github.com/gitalk/gitalk) [params.comment.gitalk] - # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1 + # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1 enable = false owner = "" repo = "" diff --git a/exampleSite/content/posts/theme-documentation-basics.fr.md b/exampleSite/content/posts/theme-documentation-basics.fr.md index fbffbbf3..ddbbd647 100644 --- a/exampleSite/content/posts/theme-documentation-basics.fr.md +++ b/exampleSite/content/posts/theme-documentation-basics.fr.md @@ -1,6 +1,7 @@ --- weight: 1 title: "Thème Documentation - Concepts de Base" +subtitle: "" date: 2020-03-06T21:40:32+08:00 lastmod: 2020-03-06T21:40:32+08:00 draft: false @@ -37,7 +38,7 @@ Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only depende Just install latest version of [:(far fa-file-archive): Hugo (> 0.62.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**). {{< admonition note "Why not support earlier versions of Hugo?" >}} -Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks) was introduced in the [Hugo Christmas Edition](https://gohugo.io/news/0.62.0-relnotes/), this theme only supports Hugo versions above **v0.62.0**. +Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks) was introduced in the [Hugo Christmas Edition](https://gohugo.io/news/0.62.0-relnotes/), this theme only supports Hugo versions above **0.62.0**. {{< /admonition >}} ## 2 Installation @@ -188,7 +189,7 @@ Note that some of these parameters are explained in details in other sections of defaultTheme = "auto" # public git repo url only then enableGitInfo is true gitRepo = "" - # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1 + # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1 # which hash function used for SRI, when empty, no SRI is used ("sha256", "sha384", "sha512", "md5") fingerprint = "" # Header info @@ -348,13 +349,13 @@ Note that some of these parameters are explained in details in other sections of enable = true # Disqus Comment Config (https://disqus.com/) [params.comment.disqus] - # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1 + # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1 enable = false # Disqus shortname to use Disqus in posts shortname = "" # Gitalk Comment Config (https://github.com/gitalk/gitalk) [params.comment.gitalk] - # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1 + # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1 enable = false owner = "" repo = "" diff --git a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md index 03fa0a60..c540f021 100644 --- a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md @@ -1,6 +1,7 @@ --- weight: 1 title: "主题文档 - 基本概念" +subtitle: "" date: 2020-03-06T21:40:32+08:00 lastmod: 2020-03-06T21:40:32+08:00 draft: false @@ -37,7 +38,7 @@ comment: true 直接安装满足你操作系统 (**Windows**, **Linux**, **macOS**) 的最新版本 [:(far fa-file-archive): Hugo (> 0.62.0)](https://gohugo.io/getting-started/installing/). {{< admonition note "为什么不支持早期版本的 Hugo?" >}} -由于 [Markdown 渲染钩子函数](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks) 在 [Hugo 圣诞节版本](https://gohugo.io/news/0.62.0-relnotes/) 中被引入, 本主题只支持高于 **v0.62.0** 的 Hugo 版本. +由于 [Markdown 渲染钩子函数](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks) 在 [Hugo 圣诞节版本](https://gohugo.io/news/0.62.0-relnotes/) 中被引入, 本主题只支持高于 **0.62.0** 的 Hugo 版本. {{< /admonition >}} ## 2 安装 @@ -191,7 +192,7 @@ hugo defaultTheme = "auto" # 公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效 gitRepo = "" - # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1 + # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1 # 哪种哈希函数用来 SRI, 为空时表示不使用 SRI ("sha256", "sha384", "sha512", "md5") fingerprint = "" # 页面头部导航栏信息 @@ -350,13 +351,13 @@ hugo enable = true # Disqus 评论系统设置 (https://disqus.com/) [params.comment.disqus] - # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1 + # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1 enable = false # Disqus 的 shortname,用来在文章中启用 Disqus 评论系统 shortname = "" # Gitalk 评论系统设置 (https://github.com/gitalk/gitalk) [params.comment.gitalk] - # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1 + # LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1 enable = false owner = "" repo = "" diff --git a/exampleSite/content/posts/theme-documentation-content.en.md b/exampleSite/content/posts/theme-documentation-content.en.md index 18a9bd50..4ba405b1 100644 --- a/exampleSite/content/posts/theme-documentation-content.en.md +++ b/exampleSite/content/posts/theme-documentation-content.en.md @@ -1,6 +1,7 @@ --- weight: 2 title: "Theme Documentation - Content" +subtitle: "" date: 2020-03-05T15:58:26+08:00 lastmod: 2020-03-05T15:58:26+08:00 draft: false @@ -47,6 +48,7 @@ Here is a default front matter from the default archetype: ```yaml --- title: "My First Post" +subtitle: "" date: 2020-03-04T15:58:26+08:00 lastmod: 2020-03-04T15:58:26+08:00 draft: true @@ -74,6 +76,7 @@ comment: true ``` * **title**: the title for the content. +* **subtitle**: the subtitle for the content. **LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.2.0** * **date**: the datetime assigned to this page, which is usually fetched from the `date` field in front matter, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics/#site-configuration). * **lastmod**: the datetime at which the content was last modified. * **draft**: if `true`, the content will not be rendered unless the `--buildDrafts`/`-D` flag is passed to the `hugo` command. diff --git a/exampleSite/content/posts/theme-documentation-content.fr.md b/exampleSite/content/posts/theme-documentation-content.fr.md index 64ce3a52..2724f864 100644 --- a/exampleSite/content/posts/theme-documentation-content.fr.md +++ b/exampleSite/content/posts/theme-documentation-content.fr.md @@ -1,6 +1,7 @@ --- weight: 2 title: "Thème Documentation - Contenu" +subtitle: "" date: 2020-03-05T16:30:05+08:00 lastmod: 2020-03-05T16:30:05+08:00 draft: false @@ -30,11 +31,6 @@ Découvrez comment créer et organiser votre contenu rapidement et intuitivement -{{< admonition warning >}} -Sorry, this article has not been completely translated into **French**. -Welcome to take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme! -{{< /admonition >}} - ## 1 Contents Organization A few suggestions to help you get a good looking site quickly: @@ -52,6 +48,7 @@ Here is a default front matter from the default archetype: ```yaml --- title: "My First Post" +subtitle: "" date: 2020-03-04T15:58:26+08:00 lastmod: 2020-03-04T15:58:26+08:00 draft: true @@ -79,6 +76,7 @@ comment: true ``` * **title**: the title for the content. +* **subtitle**: the subtitle for the content. **LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.2.0** * **date**: the datetime assigned to this page, which is usually fetched from the `date` field in front matter, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics/#site-configuration). * **lastmod**: the datetime at which the content was last modified. * **draft**: if `true`, the content will not be rendered unless the `--buildDrafts`/`-D` flag is passed to the `hugo` command. diff --git a/exampleSite/content/posts/theme-documentation-content.zh-cn.md b/exampleSite/content/posts/theme-documentation-content.zh-cn.md index a3d710c0..093e7077 100644 --- a/exampleSite/content/posts/theme-documentation-content.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-content.zh-cn.md @@ -1,6 +1,7 @@ --- weight: 2 title: "主题文档 - 内容" +subtitle: "" date: 2020-03-05T16:30:05+08:00 lastmod: 2020-03-05T16:30:05+08:00 draft: false @@ -47,6 +48,7 @@ comment: true ```yaml --- title: "我的第一篇文章" +subtitle: "" date: 2020-03-04T15:58:26+08:00 lastmod: 2020-03-04T15:58:26+08:00 draft: true @@ -74,6 +76,7 @@ comment: true ``` * **title**: 文章标题. +* **subtitle**: 文章副标题. **LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.2.0** * **date**: 这篇文章创建的日期时间. 它通常是从文章的前置参数中的 `date` 字段获取的, 但是也可以在 [网站配置](../theme-documentation-basics/#site-configuration) 中设置. * **lastmod**: 上次修改内容的日期时间. * **draft**: 如果设为 `true`, 除非 `hugo` 命令使用了 `--buildDrafts`/`-D` 参数, 这篇文章不会被渲染. diff --git a/exampleSite/content/posts/theme-documentation-shortcodes.en.md b/exampleSite/content/posts/theme-documentation-shortcodes.en.md index 7b6cab16..52a3c690 100644 --- a/exampleSite/content/posts/theme-documentation-shortcodes.en.md +++ b/exampleSite/content/posts/theme-documentation-shortcodes.en.md @@ -1,6 +1,7 @@ --- weight: 3 title: "Theme Documentation - Shortcodes" +subtitle: "" date: 2020-03-04T16:29:41+08:00 lastmod: 2020-03-04T16:29:41+08:00 draft: false diff --git a/exampleSite/content/posts/theme-documentation-shortcodes.fr.md b/exampleSite/content/posts/theme-documentation-shortcodes.fr.md index c5ff5a43..306e1a6b 100644 --- a/exampleSite/content/posts/theme-documentation-shortcodes.fr.md +++ b/exampleSite/content/posts/theme-documentation-shortcodes.fr.md @@ -1,6 +1,7 @@ --- weight: 3 title: "Thème Documentation - Shortcodes" +subtitle: "" date: 2020-03-04T16:29:59+08:00 lastmod: 2020-03-04T16:29:59+08:00 draft: false diff --git a/exampleSite/content/posts/theme-documentation-shortcodes.zh-cn.md b/exampleSite/content/posts/theme-documentation-shortcodes.zh-cn.md index 9545ed3c..fab39708 100644 --- a/exampleSite/content/posts/theme-documentation-shortcodes.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-shortcodes.zh-cn.md @@ -1,6 +1,7 @@ --- weight: 3 title: "主题文档 - Shortcodes" +subtitle: "" date: 2020-03-04T16:29:59+08:00 lastmod: 2020-03-04T16:29:59+08:00 draft: false diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5bdc32ee..8687942e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,6 +6,9 @@

{{- .Title -}}

+ {{- with .Params.subtitle -}} +

{{ . }}

+ {{- end -}} {{- /* Content */ -}}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 1e901769..6c585992 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -5,6 +5,9 @@
{{- /* Title */ -}}

{{ .Title }}

+ {{- with .Params.subtitle -}} +

{{ . }}

+ {{- end -}} {{- /* Meta */ -}}