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 a113d6d commit 97b21bc
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 210 deletions.
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion README.md

This file was deleted.

10 changes: 6 additions & 4 deletions chinese/quickstart-zh.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ <h2>快速入门</h2>
<p>在使用 typikon 程序之前请确保你计算机已经成功连接到国际互联网,如果是中国大陆地区可能会出现无法创建工作目录的情况,如果出现此类问题,可以尝试使用加速或者开启代理软件,再使用 typikon 进行目录初始化工作。</p>
</blockquote>
<p>当下载好 zip 二进制软件包后,请使用 <code>unzip</code> 或者其他解压软件来解压 <code>typikon-darwin-x64-beta-v0.1.1.zip</code> 软件包,命令如下:</p>
<pre><code class="language-shell">unzip typikon-darwin-x64-beta-v0.1.1.zip -d /Users/dings/devsoft
<pre><code class="language-shell">unzip typikon-darwin-x64-beta-v0.1.1.zip -d /usr/local/bin
chmod +x /usr/local/bin/typikon
</code></pre>
<p>通过手动解压二进制到指定目录中,如果你想要全局使用 typikon 程序,那么必须将 typikon 所在的路径添加到计算机操作系统的环境变量中,例如:</p>
<pre><code class="language-shell">export TYPIKON="/Users/dings/devsoft"
<pre><code class="language-shell">export TYPIKON="/usr/local/bin"
export PATH=$TYPIKON:$PATH
</code></pre>
<p>最后刷新环境变量,使 typikon 能被正常使用。</p>
Expand Down Expand Up @@ -176,7 +177,7 @@ <h2>快速开始</h2>
path: "settings-zh.md"

</code></pre>
<p> <code>markdown</code> 文件默认存储在 <code>example/book</code> 目录中,你目前所阅读这个页面就是通过此种方式生成渲染的。</p>
<p> <code>markdown</code> 文件默认存储在 <code>example/book</code> 目录中,你目前所阅读这个页面就是通过此种方式生成渲染的。</p>
<hr />
<h3>部署文件</h3>
<p>如何部署渲染的静态文件,默认被渲染成功之后的存储存储在 <code>example/docs</code> 目录中,只需要在将该目录上传到 GitHub Pages 和 Cloudflare Pages 中部署就可以通过域名访问,如果在本地测试,可以使用 <code>live-server</code> 程序提供本地静态服务器来访问,例如命令:</p>
Expand Down Expand Up @@ -215,7 +216,8 @@ <h3>部署文件</h3>
[INFO] 2024/07/04 00:43:24 💬 Data written to file "docs/chinese/settings-zh" successful
[INFO] 2024/07/04 00:43:24 💬 Rendering of static resource files complete 🎉
</code></pre>
<p>使用本地服务器 <code>live-server</code> 来测试生成静态网站:</p>
<p>目前 typikon 程序没有内置静态文件服务器,会在未来的新版本添加支持;
可以使用本地服务器 <code>live-server</code> 来测试生成静态网站:</p>
<pre><code class="language-shell">$: live-server docs
Serving "docs" at http://127.0.0.1:8080
Ready for changes
Expand Down
36 changes: 35 additions & 1 deletion chinese/settings-zh.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,41 @@

<div class="col-md-8 col-sm-12">
<div id="markdown-content">

<h2>Settings</h2>
<p><code>settings.yml</code> 文件中存储是 typikon 程序默认配置文件,可以设置 typikon 渲染出来的静态网站元数据信息,例如方便 SEO 优化的 <code>description</code><code>keywords</code> 字段,<code>title</code> 用来设置书名,其他字段用于设置作者信息。</p>
<pre><code class="language-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
</code></pre>
<p><code>directory</code> 节点下可以设置默认,数据文件存储位置的目录和文件夹,必须是当前目录下的,可以配置目录映射关系:</p>
<pre><code class="language-yaml"> directory:
theme: theme
source: book
output: docs
</code></pre>
<blockquote>
<p>所有字段必须都是 <code>settings</code> 字段子节点。</p>
</blockquote>
<hr />
<h2>Theme</h2>
<p>默认 typikon 程序上支持主题文件自定义的,主题文件存储在 <code>theme</code> 目录中,你只需要修改默认的 <code>index.html</code> 内容就可以到达修改其主题的目的,<code>assets</code> 目录中存储是主题依赖资源文件。默认情况不建议去修改主题文件,如果你有前端基础可以对该目录中的文件进行修改。</p>
<p><code>settings.yml</code> 文件有关于主题的 <code>theme</code> 字段,通过修改字段来支持其他主题样式,可以自定义 css 文件和 js 文件,只需要将其放入 <code>assets</code> 文件夹目录中,添加对应映射关系即可:</p>
<pre><code class="language-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
</code></pre>
<p>如果你的网站需要统计用户访问数据,例如 Google Analytics 对 js 文件,可以通过此种方式进行自定义配置引入。</p>

</div>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions english/quickstart.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ <h2>Quick Start</h2>
<p>Before using Typikon, ensure that your computer is successfully connected to the international internet. If you are in mainland China, you may encounter issues creating a working directory. If this happens, try using acceleration or enabling proxy software before using Typikon to initialize the directory.</p>
</blockquote>
<p>After downloading the zip binary package, unzip it using <code>unzip</code> or another decompression software. For example:</p>
<pre><code class="language-shell">unzip typikon-darwin-x64-beta-v0.1.1.zip -d /Users/dings/devsoft
<pre><code class="language-shell">unzip typikon-darwin-x64-beta-v0.1.1.zip -d /usr/local/bin
chmod +x /usr/local/bin/typikon
</code></pre>
<p>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:</p>
<pre><code class="language-shell">export TYPIKON="/Users/dings/devsoft"
<pre><code class="language-shell">export TYPIKON="/usr/local/bin"
export PATH=$TYPIKON:$PATH
</code></pre>
<p>Remember to refresh the environment variables to ensure that Typikon can be used properly.</p>
Expand Down
Loading

0 comments on commit 97b21bc

Please sign in to comment.