Skip to content

Commit

Permalink
docs: add all docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
auula committed Jul 4, 2024
1 parent 2f66ad8 commit a55fd1b
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 9 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ Typikon name derived from [Typikon](https://en.wikipedia.org/wiki/Typikon) Book,
## Preview

<div style="display: flex; justify-content: space-around;">
<img src="https://img.ibyte.me/a0mt96.png" alt="Alt text" style="width: 400px; height: 300px;">
<img src="https://img.ibyte.me/e68k6e.png" alt="Alt text" style="width: 400px; height: 300px;">
<img src="https://img.ibyte.me/z1zano.png" alt="Alt text" style="width: 400px; height: 300px;">
<img src="https://img.ibyte.me/lvc0iv.png" alt="Alt text" style="width: 400px; height: 300px;">
</div>

---
---

## Document

To learn how to use the `Typikon` program, you can refer to the documentation that I have written. This documentation is generally rendered and built using Typikon. The online documentation can be accessed at the following address: [https://typikonbook.github.io](https://typikonbook.github.io) 🌟.
10 changes: 6 additions & 4 deletions book/quickstart-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
当下载好 zip 二进制软件包后,请使用 `unzip` 或者其他解压软件来解压 `typikon-darwin-x64-beta-v0.1.1.zip` 软件包,命令如下:

```shell
unzip typikon-darwin-x64-beta-v0.1.1.zip -d /Users/dings/devsoft
unzip typikon-darwin-x64-beta-v0.1.1.zip -d /usr/local/bin
chmod +x /usr/local/bin/typikon
```

通过手动解压二进制到指定目录中,如果你想要全局使用 typikon 程序,那么必须将 typikon 所在的路径添加到计算机操作系统的环境变量中,例如:

```shell
export TYPIKON="/Users/dings/devsoft"
export TYPIKON="/usr/local/bin"
export PATH=$TYPIKON:$PATH
```

Expand Down Expand Up @@ -85,7 +86,7 @@ root:

```

`markdown` 文件默认存储在 `example/book` 目录中,你目前所阅读这个页面就是通过此种方式生成渲染的。
`markdown` 文件默认存储在 `example/book` 目录中,你目前所阅读这个页面就是通过此种方式生成渲染的。

---

Expand Down Expand Up @@ -130,7 +131,8 @@ GitHub: http://typikonbook.github.io License: Apache2.0
[INFO] 2024/07/04 00:43:24 💬 Rendering of static resource files complete 🎉
```

使用本地服务器 `live-server` 来测试生成静态网站:
目前 typikon 程序没有内置静态文件服务器,会在未来的新版本添加支持;
可以使用本地服务器 `live-server` 来测试生成静态网站:

```shell
$: live-server docs
Expand Down
5 changes: 3 additions & 2 deletions book/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ To use the Typikon program, you must first install Typikon on your computer. Dur
After downloading the zip binary package, unzip it using `unzip` or another decompression software. For example:

```shell
unzip typikon-darwin-x64-beta-v0.1.1.zip -d /Users/dings/devsoft
unzip typikon-darwin-x64-beta-v0.1.1.zip -d /usr/local/bin
chmod +x /usr/local/bin/typikon
```

Then manually extract the binaries to the specified directory. If you want to use the Typikon program globally, you must add the path where Typikon is located to the environment variables of your computer's operating system. For example:

```shell
export TYPIKON="/Users/dings/devsoft"
export TYPIKON="/usr/local/bin"
export PATH=$TYPIKON:$PATH
```

Expand Down
47 changes: 47 additions & 0 deletions book/settings-zh.md
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 文件,可以通过此种方式进行自定义配置引入
53 changes: 53 additions & 0 deletions book/settings.md
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.





0 comments on commit a55fd1b

Please sign in to comment.