-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
116 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
## Settings | ||
|
||
在 `settings.yml` 文件中存储是 typikon 程序默认配置文件,可以设置 typikon 渲染出来的静态网站元数据信息,例如方便 SEO 优化的 `description` 和 `keywords` 字段,`title` 用来设置书名,其他字段用于设置作者信息。 | ||
|
||
```yaml | ||
settings: | ||
about: | ||
title: Typikon Book | ||
author: Leon Ding | ||
description: Typikon name derived from Typikon Book, the a static website rendering tool similar to mdbook and hugo, but it focuses only on rendering markdown into an online book, and is easier to use than the other tools. | ||
language: en | ||
keywords: typikon,book,website,generator,static,html,css,js,theme,rust | ||
``` | ||
|
||
在 `directory` 节点下可以设置默认,数据文件存储位置的目录和文件夹,必须是当前目录下的,可以配置目录映射关系: | ||
|
||
```yaml | ||
directory: | ||
theme: theme | ||
source: book | ||
output: docs | ||
``` | ||
|
||
|
||
> 所有字段必须都是 `settings` 字段子节点。 | ||
|
||
--- | ||
|
||
## Theme | ||
|
||
默认 typikon 程序上支持主题文件自定义的,主题文件存储在 `theme` 目录中,你只需要修改默认的 `index.html` 内容就可以到达修改其主题的目的,`assets` 目录中存储是主题依赖资源文件。默认情况不建议去修改主题文件,如果你有前端基础可以对该目录中的文件进行修改。 | ||
|
||
在 `settings.yml` 文件有关于主题的 `theme` 字段,通过修改字段来支持其他主题样式,可以自定义 css 文件和 js 文件,只需要将其放入 `assets` 文件夹目录中,添加对应映射关系即可: | ||
|
||
```yaml | ||
theme: typikon-theme | ||
|
||
custom_css: | ||
- /assets/css/bootstrap.min.css | ||
- /assets/sidebars.css | ||
|
||
custom_js: | ||
- /assets/js/bootstrap.min.js | ||
- /assets/js/bootstrap.bundle.js | ||
``` | ||
|
||
如果你的网站需要统计用户访问数据,例如 Google Analytics 对 js 文件,可以通过此种方式进行自定义配置引入。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
## Settings | ||
|
||
The `settings.yml` file is the default configuration file for the Typikon program, where you can set the metadata information of the static website rendered by Typikon. This includes fields for SEO optimization like `description` and `keywords`. The `title` field is used to set the book name, and other fields are used to set author information. | ||
|
||
```yaml | ||
settings: | ||
about: | ||
title: Typikon Book | ||
author: Leon Ding | ||
description: Typikon name derived from Typikon Book, the a static website rendering tool similar to mdbook and hugo, but it focuses only on rendering markdown into an online book, and is easier to use than the other tools. | ||
language: en | ||
keywords: typikon,book,website,generator,static,html,css,js,theme,rust | ||
``` | ||
|
||
In the `directory` node, you can set the default directory and folder for storing data files, which must be under the current directory. You can configure directory mappings as follows: | ||
|
||
```yaml | ||
directory: | ||
theme: theme | ||
source: book | ||
output: docs | ||
``` | ||
|
||
> All fields must be sub-nodes of the settings field. | ||
|
||
|
||
--- | ||
|
||
## Theme | ||
|
||
By default, the Typikon program supports custom theme files. Theme files are stored in the `theme` directory. You only need to modify the default `index.html` content to achieve the purpose of modifying its theme. The `assets` directory stores the theme's dependent resource files. It is not recommended to modify theme files by default, but if you have front-end skills, you can modify the files in this directory. | ||
|
||
In the `settings.yml` file, there is a `theme` field related to the theme. By modifying the field, you can support other theme styles. You can customize CSS and JS files by placing them in the `assets` folder and adding the corresponding mappings as follows: | ||
|
||
|
||
```yaml | ||
theme: typikon-theme | ||
|
||
custom_css: | ||
- /assets/css/bootstrap.min.css | ||
- /assets/sidebars.css | ||
|
||
custom_js: | ||
- /assets/js/bootstrap.min.js | ||
- /assets/js/bootstrap.bundle.js | ||
``` | ||
|
||
If your website needs to track user visit data, such as Google Analytics for JS files, you can customize the configuration and include it in this way. | ||
|
||
|
||
|
||
|
||
|