mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 02:46:16 +01:00
feat(subtitle): add subtitle for posts (#171)
This commit is contained in:
parent
ee1c5c22bc
commit
9a7189c2a3
21 changed files with 50 additions and 20 deletions
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: "{{ replace .TranslationBaseName "-" " " | title }}"
|
||||
subtitle: ""
|
||||
date: {{ .Date }}
|
||||
lastmod: {{ .Date }}
|
||||
draft: true
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
.special {
|
||||
.single-title {
|
||||
.single-title, .single-subtitle {
|
||||
text-align: right;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = ""
|
||||
|
|
|
@ -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 = ""
|
||||
|
|
|
@ -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 = ""
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
|||
|
||||
<!--more-->
|
||||
|
||||
{{< 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.
|
||||
|
|
|
@ -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` 参数, 这篇文章不会被渲染.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
<h1 class="single-title animated pulse faster">
|
||||
{{- .Title -}}
|
||||
</h1>
|
||||
{{- with .Params.subtitle -}}
|
||||
<h2 class="single-subtitle">{{ . }}</h2>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Content */ -}}
|
||||
<div class="content" id="content">
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
<article class="page single">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="single-title animated flipInX">{{ .Title }}</h1>
|
||||
{{- with .Params.subtitle -}}
|
||||
<h2 class="single-subtitle">{{ . }}</h2>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Meta */ -}}
|
||||
<div class="post-meta">
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue