Update theme (LoveIt) + Add new fields

This commit is contained in:
Daniel Mason 2025-02-23 12:23:14 +13:00
parent ec90ebd36e
commit 49c98d8fb5
Signed by: idanoo
GPG key ID: 387387CDBC02F132
87 changed files with 6900 additions and 6013 deletions

View file

@ -13,7 +13,7 @@ math:
{{< style "img { height: 1.25rem; }" >}}
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.62.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.128.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt)
[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork)
@ -53,7 +53,7 @@ math:
* :(far fa-user fa-fw): **Gravatar** supported by [Gravatar](https://gravatar.com)
* :(fas fa-user-circle fa-fw): Local **Avatar** supported
* :(far fa-id-card fa-fw): Up to **73** social links supported
* :(far fa-id-card fa-fw): Up to **76** social links supported
* :(fas fa-share-square fa-fw): Up to **24** share sites supported
* :(far fa-comment fa-fw): **Disqus** comment system supported by [Disqus](https://disqus.com)
* :(far fa-comment-dots fa-fw): **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)

View file

@ -13,7 +13,7 @@ math:
{{< style "img { height: 1.25rem; }" >}}
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.62.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.128.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt)
[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork)
@ -35,7 +35,7 @@ math:
* :(far fa-chart-bar fa-fw): 支持 **[Fathom Analytics](https://usefathom.com/)**
* :(fas fa-chart-column fa-fw): 支持 **[Plausible Analytics](https://plausible.io/)**
* :(fab fa-yandex-international fa-fw): 支持 **[Yandex Metrica](https://metrica.yandex.com/)**
* :(fas fa-sitemap fa-fw): 支持搜索引擎的**网站验证** (Google, Bind, Yandex and Baidu)
* :(fas fa-sitemap fa-fw): 支持搜索引擎的**网站验证** (Google, Bind, Yandex Baidu)
* :(fas fa-tachometer-alt fa-fw): 支持所有第三方库的 **CDN**
* :(fas fa-cloud-download-alt fa-fw): 基于 [lazysizes](https://github.com/aFarkas/lazysizes) 自动转换图片为**懒加载**
@ -53,7 +53,7 @@ math:
* :(far fa-user fa-fw): 支持 **[Gravatar](https://gravatar.com)** 头像
* :(fas fa-user-circle fa-fw): 支持本地**头像**
* :(far fa-id-card fa-fw): 支持多达 **73** 种社交链接
* :(far fa-id-card fa-fw): 支持多达 **76** 种社交链接
* :(fas fa-share-square fa-fw): 支持多达 **24** 种网站分享
* :(far fa-comment fa-fw): 支持 **[Disqus](https://disqus.com)** 评论系统
* :(far fa-comment-dots fa-fw): 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统

View file

@ -23,7 +23,7 @@ This article offers a sample of basic Markdown syntax that can be used in Hugo c
<!--more-->
{{< admonition >}}
This article is a shameful copy of the great [Grav original page](http://learn.getgrav.org/content/markdown).
This article is a shameful copy of the great [Grav original page](https://learn.getgrav.org/content/markdown).
If you want to know about the extended Markdown syntax of **LoveIt** theme, please read [extended Markdown syntax page](../theme-documentation-content#extended-markdown-syntax).
{{< /admonition >}}

View file

@ -23,7 +23,7 @@ lightgallery: true
<!--more-->
{{< admonition >}}
这篇文章借鉴了一篇很棒的[来自 Grav 的文章](http://learn.getgrav.org/content/markdown).
这篇文章借鉴了一篇很棒的[来自 Grav 的文章](https://learn.getgrav.org/content/markdown).
如果你想了解 **Loveit** 主题的扩展 Markdown 语法, 请阅读[扩展 Markdown 语法页面](../theme-documentation-content#extended-markdown-syntax).
{{< /admonition >}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

View file

@ -29,14 +29,12 @@ Discover what the Hugo - **LoveIt** theme is all about and the core-concepts beh
Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only dependency of this theme.
Just install latest version of [:(far fa-file-archive fa-fw): Hugo (> 0.62.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**).
Just install latest edition of [:(far fa-file-archive fa-fw): Hugo](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 **0.62.0**.
{{< /admonition >}}
{{< admonition note "When you need to use Hugo extended edition?" false >}}
When you want [style customization](#style-customization), you need to use the Hugo **extended edition** for correct rendering.
{{< admonition tip "Hugo extended version is recommended" >}}
Since some features of this theme need to processes :(fab fa-sass fa-fw): SCSS to :(fab fa-css3 fa-fw): CSS, it is recommended to use Hugo **extended** version for better experience.
![Hugo extended edition](hugo-extended-edition.png "Hugo extended edition")
{{< /admonition >}}
## 2 Installation
@ -54,9 +52,9 @@ cd my_website
### 2.2 Install the Theme
The **LoveIt** themes repository is: [https://github.com/dillonzq/LoveIt](https://github.com/dillonzq/LoveIt).
The **LoveIt** theme's repository is: [https://github.com/dillonzq/LoveIt](https://github.com/dillonzq/LoveIt).
You can download the [latest release :(far fa-file-archive fa-fw): .zip file](https://github.com/dillonzq/LoveIt/releases) of the theme and extract it in the `themes` directory.
You can download the [release :(far fa-file-archive fa-fw): .zip file](https://github.com/dillonzq/LoveIt/releases) of the theme and extract it in the `themes` directory.
Alternatively, clone this repository to the `themes` directory:
@ -71,6 +69,16 @@ git init
git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
```
{{< admonition note "LoveIt theme's compatibility" >}}
| LoveIt branch or version | Supported Hugo versions |
|:-------------------------|:-----------------------:|
| master(Unstable) | ≥ 0.128.0 |
| **0.3.X(Recommended)** | 0.128.0 - 0.144.2 |
| 0.2.X(Outdated) | 0.68.0 - 0.127.0 |
{{< /admonition >}}
### 2.3 Basic Configuration {#basic-configuration}
The following is a basic configuration for the LoveIt theme:
@ -89,12 +97,6 @@ languageCode = "en"
# language name ["English", "简体中文", "Français", "Polski", ...]
languageName = "English"
# Author config
[author]
name = "xxxx"
email = ""
link = ""
# Menu config
[menu]
[[menu.main]]
@ -134,7 +136,7 @@ languageName = "English"
```
{{< admonition >}}
When building the website, you can set a theme by using `--theme` option. However, we suggest you modify the configuration file (**config.toml**) and set the theme as the default.
When building the website, you can set a theme by using `--theme` option. However, we suggest you modify the configuration file (**hugo.toml**) and set the theme as the default.
{{< /admonition >}}
### 2.4 Create Your First Post
@ -174,6 +176,7 @@ it is highly recommended that you add `--disableFastRender` parameter to `hugo s
```bash
hugo serve --disableFastRender
```
{{< /admonition >}}
### 2.6 Build the Website
@ -195,7 +198,7 @@ Alternatively, you can use [AWS Amplify](https://gohugo.io/hosting-and-deploymen
### 3.1 Site Configuration {#site-configuration}
In addition to [Hugo global configuration](https://gohugo.io/overview/configuration/) and [menu configuration](#basic-configuration), **LoveIt** lets you define the following parameters in your site configuration (here is a `config.toml`, whose values are default).
In addition to [Hugo global configuration](https://gohugo.io/overview/configuration/) and [menu configuration](#basic-configuration), **LoveIt** lets you define the following parameters in your site configuration (here is a `hugo.toml`, whose values are default).
Please open the code block below to view the complete sample configuration :(far fa-hand-point-down fa-fw)::
@ -215,10 +218,6 @@ languageName = "English"
# whether to include Chinese/Japanese/Korean
hasCJKLanguage = false
# default amount of posts in each pages
paginate = 12
# google analytics code [UA-XXXXXXXX-X]
googleAnalytics = ""
# copyright description used only for seo schema
copyright = ""
@ -232,11 +231,11 @@ enableEmoji = true
# ignore some build errors
ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
# Author config
[author]
name = "xxxx"
email = ""
link = ""
# Pagination config
[pagination]
disableAliases = false
pagerSize = 10
path = "page"
# Menu config
[menu]
@ -285,6 +284,12 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
# website images for Open Graph and Twitter Cards
images = ["/logo.png"]
# Author config
[params.author]
name = "xxxx"
email = ""
link = ""
# Header config
[params.header]
# desktop header mode ["fixed", "normal", "auto"]
@ -481,6 +486,10 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
Plume = ""
HackTheBox = ""
RootMe= ""
Malt = ""
TikTok = ""
TryHackMe = ""
Codeberg = ""
Phone = ""
Email = "xxxx@xxxx.com"
RSS = true # {{< version 0.2.0 >}}
@ -510,7 +519,7 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
# whether to enable the table of the contents
enable = true
# {{< version 0.2.9 >}} whether to keep the static table of the contents in front of the post
keepStatic = true
keepStatic = false
# whether to make the table of the contents in the sidebar automatically collapsed
auto = true
# {{< version 0.2.0 changed >}} {{< link "https://katex.org/" KaTeX >}} mathematical formulas
@ -898,11 +907,12 @@ into `/static`. Theyre easily created via [https://realfavicongenerator.net/]
Customize `browserconfig.xml` and `site.webmanifest` to set theme-color and background-color.
### 3.3 Style Customization
### 3.3 Style Customization {#style-customization}
{{< version 0.2.8 changed >}}
{{< admonition >}}
{{< admonition note "Hugo extended version is necessary" >}}
Since Hugo need to processes :(fab fa-sass fa-fw): SCSS to :(fab fa-css3 fa-fw): CSS,
Hugo **extended** version is necessary for the style customization.
{{< /admonition >}}
@ -931,30 +941,32 @@ In `assets/css/_custom.scss`, you can add some css style code to customize the s
{{< version 0.2.10 changed >}}
| Language | Hugo Code | HTML `lang` Attribute | Theme Docs | Lunr.js Support |
|:-------------------- |:---------:|:---------------------:|:-----------------------------:|:-----------------------------:|
| English | `en` | `en` | :(far fa-check-square fa-fw): | :(far fa-check-square fa-fw): |
| Simplified Chinese | `zh-cn` | `zh-CN` | :(far fa-check-square fa-fw): | :(far fa-check-square fa-fw): |
| Traditional Chinese | `zh-tw` | `zh-TW` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| French | `fr` | `fr` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Polish | `pl` | `pl` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Brazilian Portuguese | `pt-br` | `pt-BR` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Italian | `it` | `it` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Spanish | `es` | `es` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| German | `de` | `de` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| German | `de` | `de` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Serbian | `sr` | `sr` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Russian | `ru` | `ru` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Romanian | `ro` | `ro` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Vietnamese | `vi` | `vi` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Arabic | `ar` | `ar` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Catalan | `ca` | `ca` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Thai | `th` | `th` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Telugu | `te` | `te` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Indonesian | `id` | `id` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Turkish | `tr` | `tr` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Korean | `ko` | `ko` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Hindi | `hi` | `hi` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Language | Hugo Code | HTML `lang` Attribute | Theme Docs | Lunr.js Support |
|:--------------------|:---------:|:---------------------:|:-----------------------------:|:-----------------------------:|
| English | `en` | `en` | :(far fa-check-square fa-fw): | :(far fa-check-square fa-fw): |
| Simplified Chinese | `zh-cn` | `zh-CN` | :(far fa-check-square fa-fw): | :(far fa-check-square fa-fw): |
| Traditional Chinese | `zh-tw` | `zh-TW` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| French | `fr` | `fr` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Polish | `pl` | `pl` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Portuguese (Brazil) | `pt-br` | `pt-BR` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Italian | `it` | `it` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Spanish | `es` | `es` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| German | `de` | `de` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| German | `de` | `de` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Serbian | `sr` | `sr` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Russian | `ru` | `ru` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Romanian | `ro` | `ro` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Vietnamese | `vi` | `vi` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Arabic | `ar` | `ar` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Catalan | `ca` | `ca` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Thai | `th` | `th` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Telugu | `te` | `te` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Indonesian | `id` | `id` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Turkish | `tr` | `tr` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Korean | `ko` | `ko` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Hindi | `hi` | `hi` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Dutch | `nl` | `nl` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Bengali | `hi` | `hi` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
### 4.2 Basic Configuration

View file

@ -27,16 +27,14 @@ toc:
## 1 准备
由于 Hugo 提供的便利性, [Hugo](https://gohugo.io/) 本身是这个主题唯一的依赖.
由于 Hugo 提供的便利性, [Hugo](https://gohugo.io/) 是这个主题唯一的依赖.
直接安装满足你操作系统 (**Windows**, **Linux**, **macOS**) 的最新版本 [:(far fa-file-archive fa-fw): Hugo (> 0.62.0)](https://gohugo.io/getting-started/installing/).
直接安装满足你操作系统 (**Windows**, **Linux**, **macOS**) 的最新版本 [:(far fa-file-archive fa-fw): Hugo](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/) 中被引入, 本主题只支持高于 **0.62.0** 的 Hugo 版本.
{{< /admonition >}}
{{< admonition note "什么时候需要使用 Hugo extended 版本?" false >}}
当你需要[自定义样式](#style-customization)时, 你要使用 Hugo **extended** 版本来获得正确的渲染效果.
{{< admonition tip "推荐使用 Hugo extended 版本" >}}
由于这个主题的一些特性需要将 :(fab fa-sass fa-fw): SCSS 转换为 :(fab fa-css3 fa-fw): CSS, 推荐使用 Hugo **extended** 版本来获得更好的使用体验.
![Hugo extended 版本](hugo-extended-edition.png "Hugo extended 版本")
{{< /admonition >}}
## 2 安装
@ -56,7 +54,7 @@ cd my_website
**LoveIt** 主题的仓库是: [https://github.com/dillonzq/LoveIt](https://github.com/dillonzq/LoveIt).
你可以下载主题的 [最新版本 :(far fa-file-archive fa-fw): .zip 文件](https://github.com/dillonzq/LoveIt/releases) 并且解压放到 `themes` 目录.
你可以下载主题的 [发布版本 :(far fa-file-archive fa-fw): .zip 文件](https://github.com/dillonzq/LoveIt/releases) 并且解压放到 `themes` 目录.
另外, 也可以直接把这个主题克隆到 `themes` 目录:
@ -71,6 +69,16 @@ git init
git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
```
{{< admonition note "主题的兼容性" >}}
| 分支或版本 | 支持的 Hugo 版本 |
|:--------------|:-----------------:|
| master(不稳定) | ≥ 0.128.0 |
| **0.3.X(推荐)** | 0.128.0 - 0.144.2 |
| 0.2.X(过时) | 0.68.0 - 0.127.0 |
{{< /admonition >}}
### 2.3 基础配置 {#basic-configuration}
以下是 LoveIt 主题的基本配置:
@ -91,12 +99,6 @@ languageName = "简体中文"
# 是否包括中日韩文字
hasCJKLanguage = true
# 作者配置
[author]
name = "xxxx"
email = ""
link = ""
# 菜单配置
[menu]
[[menu.main]]
@ -136,7 +138,7 @@ hasCJKLanguage = true
```
{{< admonition >}}
在构建网站时, 你可以使用 `--theme` 选项设置主题. 但是, 我建议你修改配置文件 (**config.toml**) 将本主题设置为默认主题.
在构建网站时, 你可以使用 `--theme` 选项设置主题. 但是, 我建议你修改配置文件 (**hugo.toml**) 将本主题设置为默认主题.
{{< /admonition >}}
### 2.4 创建你的第一篇文章
@ -176,6 +178,7 @@ hugo serve
```bash
hugo serve --disableFastRender
```
{{< /admonition >}}
### 2.6 构建网站
@ -197,7 +200,7 @@ hugo
### 3.1 网站配置 {#site-configuration}
除了 [Hugo 全局配置](https://gohugo.io/overview/configuration/) 和 [菜单配置](#basic-configuration) 之外, **LoveIt** 主题还允许您在网站配置中定义以下参数 (这是一个示例 `config.toml`, 其内容为默认值).
除了 [Hugo 全局配置](https://gohugo.io/overview/configuration/) 和 [菜单配置](#basic-configuration) 之外, **LoveIt** 主题还允许您在网站配置中定义以下参数 (这是一个示例 `hugo.toml`, 其内容为默认值).
请打开下面的代码块查看完整的示例配置 :(far fa-hand-point-down fa-fw)::
@ -217,10 +220,6 @@ languageName = "简体中文"
# 是否包括中日韩文字
hasCJKLanguage = true
# 默认每页列表显示的文章数目
paginate = 12
# 谷歌分析代号 [UA-XXXXXXXX-X]
googleAnalytics = ""
# 版权描述,仅仅用于 SEO
copyright = ""
@ -234,11 +233,11 @@ enableEmoji = true
# 忽略一些构建错误
ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
# 作者配置
[author]
name = "xxxx"
email = ""
link = ""
# 分页配置
[pagination]
disableAliases = false
pagerSize = 10
path = "page"
# 菜单配置
[menu]
@ -287,6 +286,12 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
# 网站图片, 用于 Open Graph 和 Twitter Cards
images = ["/logo.png"]
# 作者配置
[params.author]
name = "xxxx"
email = ""
link = ""
# 页面头部导航栏配置
[params.header]
# 桌面端导航栏模式 ["fixed", "normal", "auto"]
@ -483,6 +488,10 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
Plume = ""
HackTheBox = ""
RootMe= ""
Malt = ""
TikTok = ""
TryHackMe = ""
Codeberg = ""
Phone = ""
Email = "xxxx@xxxx.com"
RSS = true # {{< version 0.2.0 >}}
@ -512,7 +521,7 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
# 是否使用目录
enable = true
# {{< version 0.2.9 >}} 是否保持使用文章前面的静态目录
keepStatic = true
keepStatic = false
# 是否使侧边目录自动折叠展开
auto = true
# {{< version 0.2.0 >}} 代码配置
@ -901,12 +910,12 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
可以自定义 `browserconfig.xml``site.webmanifest` 文件来设置 theme-color 和 background-color.
### 3.3 自定义样式
### 3.3 自定义样式 {#style-customization}
{{< version 0.2.8 changed >}}
{{< admonition >}}
Hugo **extended** 版本对于自定义样式是必需的.
{{< admonition note "Hugo extended 版本是必需的" >}}
由于需要将 :(fab fa-sass fa-fw): SCSS 转换为 :(fab fa-css3 fa-fw): CSS, Hugo **extended** 版本对于自定义样式是必需的.
{{< /admonition >}}
通过定义自定义 `.scss` 样式文件, **LoveIt** 主题支持可配置的样式.
@ -934,29 +943,31 @@ $code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospac
{{< version 0.2.10 changed >}}
| 语言 | Hugo 代码 | HTML `lang` 属性 | 主题文档 | Lunr.js 支持 |
|:---- |:----:|:----:|:----:|:----:|
| 英语 | `en` | `en` | :(far fa-check-square fa-fw): | :(far fa-check-square fa-fw): |
| 简体中文 | `zh-cn` | `zh-CN` | :(far fa-check-square fa-fw): | :(far fa-check-square fa-fw): |
| 繁體中文 | `zh-tw` | `zh-TW` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 法语 | `fr` | `fr` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 波兰语 | `pl` | `pl` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 巴西葡萄牙语 | `pt-br` | `pt-BR` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 意大利语 | `it` | `it` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 西班牙语 | `es` | `es` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 德语 | `de` | `de` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 塞尔维亚语 | `pl` | `pl` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 俄语 | `ru` | `ru` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 罗马尼亚语 | `ro` | `ro` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 越南语 | `vi` | `vi` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 阿拉伯语 | `ar` | `ar` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 加泰罗尼亚语 | `ca` | `ca` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 泰语 | `th` | `th` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 泰卢固语 | `te` | `te` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 印尼语 | `id` | `id` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 土耳其语 | `tr` | `tr` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 韩语 | `ko` | `ko` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 印地语 | `hi` | `hi` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 语言 | Hugo 代码 | HTML `lang` 属性 | 主题文档 | Lunr.js 支持 |
|:---------|:-------:|:--------------:|:-----------------------------:|:-----------------------------:|
| 英语 | `en` | `en` | :(far fa-check-square fa-fw): | :(far fa-check-square fa-fw): |
| 简体中文 | `zh-cn` | `zh-CN` | :(far fa-check-square fa-fw): | :(far fa-check-square fa-fw): |
| 繁体中文 | `zh-tw` | `zh-TW` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 法语 | `fr` | `fr` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 波兰语 | `pl` | `pl` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 葡萄牙语(巴西) | `pt-br` | `pt-BR` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 意大利语 | `it` | `it` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 西班牙语 | `es` | `es` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 德语 | `de` | `de` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 塞尔维亚语 | `pl` | `pl` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 俄语 | `ru` | `ru` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 罗马尼亚语 | `ro` | `ro` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 越南语 | `vi` | `vi` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 阿拉伯语 | `ar` | `ar` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 加泰罗尼亚语 | `ca` | `ca` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 泰语 | `th` | `th` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 泰卢固语 | `te` | `te` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 印尼语 | `id` | `id` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 土耳其语 | `tr` | `tr` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 韩语 | `ko` | `ko` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 印地语 | `hi` | `hi` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| 荷兰语 | `nl` | `nl` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| 孟加拉语 | `bn` | `bn` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
### 4.2 基本配置

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 425 KiB

Before After
Before After

View file

@ -143,12 +143,12 @@ The rendered output looks like this:
Example `tweet` input:
```markdown
{{</* tweet 917359331535966209 */>}}
{{</* tweet user=GoHugoIO id=917359331535966209 */>}}
```
The rendered output looks like this:
{{< tweet 917359331535966209 >}}
{{< tweet user=GoHugoIO id=917359331535966209 >}}
## 8 vimeo

View file

@ -144,12 +144,12 @@ For more information please have a look at GitHub issue [#7879](https://github.c
一个 `tweet` 示例:
```markdown
{{</* tweet 917359331535966209 */>}}
{{</* tweet user=GoHugoIO id=917359331535966209 */>}}
```
呈现的输出效果如下:
{{< tweet 917359331535966209 >}}
{{< tweet user=GoHugoIO id=917359331535966209 >}}
## 8 vimeo

View file

@ -278,13 +278,13 @@ which helps you write raw mathematical formula content.
Example `raw` input:
```markdown
Inline Formula: {{</* raw */>}}\(\mathbf{E}=\sum_{i} \mathbf{E}_{i}=\mathbf{E}_{1}+\mathbf{E}_{2}+\mathbf{E}_{3}+\cdots\){{</* /raw */>}}
Inline Formula: {?{}{< raw >}}\(\mathbf{E}=\sum_{i} \mathbf{E}_{i}=\mathbf{E}_{1}+\mathbf{E}_{2}+\mathbf{E}_{3}+\cdots\){?{}{< /raw >}}
Block Formula:
{{</* raw */>}}
{?{}{< raw >}}
\[ a=b+c \\ d+e=f \]
{{</* /raw */>}}
{?{}{< /raw >}}
```
The rendered output looks like this:
@ -293,7 +293,7 @@ Inline Formula: {{< raw >}}\(\mathbf{E}=\sum_{i} \mathbf{E}_{i}=\mathbf{E}_{1}+\
Block Formula:
{{< raw>}}
{{< raw >}}
\[ a=b+c \\ d+e=f \]
{{< /raw >}}
{{< /admonition >}}
@ -307,7 +307,7 @@ The default inline delimiters are:
For example:
```tex
```markdown
$c = \pm\sqrt{a^2 + b^2}$ and \\(f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi\\)
```
@ -329,7 +329,7 @@ The default block delimiters are:
For example:
```tex
```markdown
$$ c = \pm\sqrt{a^2 + b^2} $$
\\[ f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\]

View file

@ -276,13 +276,13 @@ resources:
一个 `raw` 示例:
```markdown
行内公式: {{</* raw */>}}\(\mathbf{E}=\sum_{i} \mathbf{E}_{i}=\mathbf{E}_{1}+\mathbf{E}_{2}+\mathbf{E}_{3}+\cdots\){{</* /raw */>}}
行内公式: {?{}{< raw >}}\(\mathbf{E}=\sum_{i} \mathbf{E}_{i}=\mathbf{E}_{1}+\mathbf{E}_{2}+\mathbf{E}_{3}+\cdots\){?{}{< /raw >}}
公式块:
{{</* raw */>}}
{?{}{< raw >}}
\[ a=b+c \\ d+e=f \]
{{</* /raw */>}}
{?{}{< /raw >}}
```
呈现的输出效果如下:
@ -291,7 +291,7 @@ resources:
公式块:
{{< raw>}}
{{< raw >}}
\[ a=b+c \\ d+e=f \]
{{< /raw >}}
{{< /admonition >}}
@ -305,7 +305,7 @@ resources:
例如:
```tex
```markdown
$c = \pm\sqrt{a^2 + b^2}$ 和 \\(f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi\\)
```
@ -327,7 +327,7 @@ $c = \pm\sqrt{a^2 + b^2}$ 和 \\(f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2
例如:
```tex
```markdown
$$ c = \pm\sqrt{a^2 + b^2} $$
\\[ f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\]

View file

@ -374,16 +374,11 @@ Block Formula:
\[ a=b+c \\ d+e=f \]
{{< /raw >}}
{{< script >}}
console.log('Hello LoveIt!');
{{< /script >}}
This renders as {{< person "https://dillonzq.com/" Dillon "author of the LoveIt theme" >}}.
Raw content using Markdown syntax: {{< raw >}}**Hello**{{< /raw >}}
## 13 person
`person` is a shortcode to insert a link to a personal webpage marked up as [h-card](http://microformats.org/wiki/h-card).
`person` is a shortcode to insert a link to a personal webpage marked up as [h-card](https://microformats.org/wiki/h-card).
The `person` shortcode has the following named parameters:

View file

@ -378,7 +378,7 @@ console.log('Hello LoveIt!');
## 13 person
`person` shortcode 用来在你的文章中以 [h-card](http://microformats.org/wiki/h-card) 的格式插入个人网站链接.
`person` shortcode 用来在你的文章中以 [h-card](https://microformats.org/wiki/h-card) 的格式插入个人网站链接.
`person` shortcode 有以下命名参数:

View file

@ -24,12 +24,6 @@ languageName = "English"
# 是否包括中日韩文字
hasCJKLanguage = false
# default amount of posts in each pages
# 默认每页列表显示的文章数目
paginate = 12
# google analytics code [UA-XXXXXXXX-X]
# 谷歌分析代号 [UA-XXXXXXXX-X]
googleAnalytics = ""
# copyright description used only for seo schema
# 版权描述,仅仅用于 SEO
copyright = ""
@ -48,12 +42,12 @@ enableEmoji = true
# 忽略一些构建错误
ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
# Author config
# 作者配置
[author]
name = "xxxx"
email = ""
link = ""
# Pagination config
# 分页配置
[pagination]
disableAliases = false
pagerSize = 10
path = "page"
# Menu config
# 菜单配置
@ -114,6 +108,13 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
# 网站图片, 用于 Open Graph 和 Twitter Cards
images = ["/logo.png"]
# Author config
# 作者配置
[params.author]
name = "xxxx"
email = ""
link = ""
# Header config
# 页面头部导航栏配置
[params.header]
@ -359,6 +360,10 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
Plume = ""
HackTheBox = ""
RootMe= ""
Malt = ""
TikTok = ""
TryHackMe = ""
Codeberg = ""
Email = ""
RSS = ""
@ -518,7 +523,7 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
recordIP = true
highlight = true
enableQQ = false
serverURLs = "https://leancloud.hugoloveit.com"
serverURLs = "https://valine.hugoloveit.com"
# emoji data file name, default is "google.yml"
# ["apple.yml", "google.yml", "facebook.yml", "twitter.yml"]
# located in "themes/LoveIt/assets/lib/valine/emoji/" directory
@ -747,7 +752,7 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
# Permalinks config (https://gohugo.io/content-management/urls/#permalinks)
# Permalinks 配置 (https://gohugo.io/content-management/urls/#permalinks)
[Permalinks]
[permalinks]
# posts = ":year/:month/:filename"
posts = ":filename"
@ -854,9 +859,9 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
highlightTag = "em"
absoluteURL = false
[languages.en.params.search.algolia]
index = "index.en"
appID = "PASDMWALPK"
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
index = "index"
appID = "4D1IDY8JU6"
searchKey = "05332ac5ed76655a511f0da583a9afac"
[languages.en.params.home]
rss = 10
[languages.en.params.home.profile]
@ -947,9 +952,9 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
highlightTag = "em"
absoluteURL = false
[languages.zh-cn.params.search.algolia]
index = "index.zh-cn"
appID = "PASDMWALPK"
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
index = "index"
appID = "GZT24PWKNT"
searchKey = "634ab679e825b815de2663de38908f9d"
[languages.zh-cn.params.home]
rss = 10
[languages.zh-cn.params.home.profile]

View file

@ -1,2 +1 @@
/zh-cn/* /zh-cn/404.html 404
/fr/* /fr/404.html 404