1
0
Fork 0
mirror of https://github.com/dillonzq/LoveIt.git synced 2025-03-13 11:18:15 +01:00

docs: update docs for v0.3.0 ()

This commit is contained in:
Dillon 2025-02-13 00:14:16 +08:00 committed by GitHub
parent eb0c78b62c
commit f59fb4ecc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 40 additions and 25 deletions
archetypes
exampleSite
content/posts/theme-documentation-basics
hugo.toml
layouts/partials
package.json

View file

@ -29,6 +29,7 @@ rssFullText: false
toc:
enable: true
auto: true
keepStatic: false
code:
copy: true
maxShownLines: 50

View file

@ -29,10 +29,10 @@ 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 **extended edition** of [:(far fa-file-archive fa-fw): Hugo (> 0.128.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 need to use Hugo **extended edition**" >}}
Since some features of this theme need to processes :(fab fa-sass fa-fw): SCSS to :(fab fa-css3 fa-fw): CSS, you need to use Hugo **extended edition** for correct rendering.
{{< 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.
![Hugo extended edition](hugo-extended-edition.png "Hugo extended edition")
{{< /admonition >}}
@ -52,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:
@ -69,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.143.1 |
| 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:
@ -208,8 +218,6 @@ languageName = "English"
# whether to include Chinese/Japanese/Korean
hasCJKLanguage = false
# google analytics code [UA-XXXXXXXX-X]
googleAnalytics = ""
# copyright description used only for seo schema
copyright = ""
@ -511,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
@ -899,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 >}}

View file

@ -29,10 +29,10 @@ toc:
由于 Hugo 提供的便利性, [Hugo](https://gohugo.io/) 是这个主题唯一的依赖.
直接安装满足你操作系统 (**Windows**, **Linux**, **macOS**) 的最新 **extended** 版本 [:(far fa-file-archive fa-fw): Hugo (> 0.128.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 extended 版本" >}}
由于这个主题的一些特性需要将 :(fab fa-sass fa-fw): SCSS 转换为 :(fab fa-css3 fa-fw): CSS, 你需要使用 Hugo **extended** 版本来获得正确的渲染效果.
{{< admonition note "什么时候需要使用 Hugo extended 版本?" false >}}
当你需要[自定义样式](#style-customization)时, 你要使用 Hugo **extended** 版本来获得正确的渲染效果.
![Hugo extended 版本](hugo-extended-edition.png "Hugo extended 版本")
{{< /admonition >}}
@ -54,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` 目录:
@ -69,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.143.1 |
| 0.2.X(过时) | 0.68.0 - 0.127.0 |
{{< /admonition >}}
### 2.3 基础配置 {#basic-configuration}
以下是 LoveIt 主题的基本配置:
@ -210,8 +220,6 @@ languageName = "简体中文"
# 是否包括中日韩文字
hasCJKLanguage = true
# 谷歌分析代号 [UA-XXXXXXXX-X]
googleAnalytics = ""
# 版权描述,仅仅用于 SEO
copyright = ""
@ -513,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 >}} 代码配置
@ -902,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** 主题支持可配置的样式.

View file

@ -24,9 +24,6 @@ languageName = "English"
# 是否包括中日韩文字
hasCJKLanguage = false
# google analytics code [UA-XXXXXXXX-X]
# 谷歌分析代号 [UA-XXXXXXXX-X]
googleAnalytics = ""
# copyright description used only for seo schema
# 版权描述,仅仅用于 SEO
copyright = ""

View file

@ -1,4 +1,4 @@
{{- .Scratch.Set "version" "0.2.11" -}}
{{- .Scratch.Set "version" "0.3.0" -}}
{{- $params := .Params | merge .Site.Params.page -}}

View file

@ -1,6 +1,6 @@
{
"name": "loveit-src",
"version": "0.2.11",
"version": "0.3.0",
"description": "LoveIt theme source file",
"private": true,
"devDependencies": {