-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.json
More file actions
56 lines (56 loc) · 29.7 KB
/
Copy pathdata.json
File metadata and controls
56 lines (56 loc) · 29.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[
{
"id": 1,
"url": "/index.html",
"title": "Typikon Book",
"content": "<h2>Typikon</h2>\n<p>Typikon lets you use markdown to write your online books.</p>\n<hr />\n<div style=\"display: flex; gap: 5px;\">\n <img src=\"https://img.shields.io/badge/📖%20Typikon-Rust%20🦀️-yellow\" alt=\"Typikon Rust CLI\" />\n <img src=\"https://codecov.io/github/auula/typikon/branch/main/graph/badge.svg?token=FaR2OdNYeB\" alt=\"Codecov\" />\n <img src=\"https://img.shields.io/badge/license-Apache-db5149.svg\" alt=\"License\" />\n <img src=\"https://github.com/auula/typikon/actions/workflows/rust.yml/badge.svg?event=push\" alt=\"Action\" />\n <img src=\"https://img.shields.io/twitter/follow/auula_?style=social\" alt=\"Twitter URL\" />\n</div>\n<hr />\n<h3>Introduce</h3>\n<p><img src=\"https://img.leonding.me/w3uchi.png\" alt=\"Typikon Image\"\n\t\t\t\t\t\t\tstyle=\"float: left; margin: 0px 20px 10px 10px;height: 100px;\" /></p>\n<p>Typikon name derived from <a href=\"https://en.wikipedia.org/wiki/Typikon\">Typikon</a> Book, the a static website rendering tool similar to mdbook and gitbook, but it focuses only on rendering markdown into an online book, and is easier to use than the other tools.</p>\n<hr />\n<blockquote>\n<p>GitHub: <a href=\"https://github.com/auula/typikon\">github.com/auula/typikon</a> 🌟</p>\n</blockquote>\n<hr />\n<h3>Feature</h3>\n<ul>\n<li>Support Dark & Light theme</li>\n<li>Support CSS & JS custom</li>\n<li>Only focus on directory and file mapping</li>\n<li>Rendering static files to facilitate deployment</li>\n</ul>\n<hr />\n"
},
{
"id": 2,
"url": "/english/index.html",
"title": "English",
"content": "<h2>Typikon</h2>\n<p>Typikon lets you use markdown to write your online books.</p>\n<hr />\n<div style=\"display: flex; gap: 5px;\">\n <img src=\"https://img.shields.io/badge/📖%20Typikon-Rust%20🦀️-yellow\" alt=\"Typikon Rust CLI\" />\n <img src=\"https://codecov.io/github/auula/typikon/branch/main/graph/badge.svg?token=FaR2OdNYeB\" alt=\"Codecov\" />\n <img src=\"https://img.shields.io/badge/license-Apache-db5149.svg\" alt=\"License\" />\n <img src=\"https://github.com/auula/typikon/actions/workflows/rust.yml/badge.svg?event=push\" alt=\"Action\" />\n <img src=\"https://img.shields.io/twitter/follow/auula_?style=social\" alt=\"Twitter URL\" />\n</div>\n<hr />\n<h3>Introduce</h3>\n<p><img src=\"https://img.leonding.me/w3uchi.png\" alt=\"Typikon Image\"\n\t\t\t\t\t\t\tstyle=\"float: left; margin: 0px 20px 10px 10px;height: 100px;\" /></p>\n<p>Typikon name derived from <a href=\"https://en.wikipedia.org/wiki/Typikon\">Typikon</a> Book, a static website rendering tool similar to mdbook and gitbook, but it focuses only on rendering markdown into an online book, and is easier to use than the other tools.</p>\n<hr />\n<blockquote>\n<p>GitHub: <a href=\"https://github.com/auula/typikon\">github.com/auula/typikon</a> 🌟</p>\n</blockquote>\n<hr />\n<h3>Feature</h3>\n<ul>\n<li>Support Dark & Light theme</li>\n<li>Support CSS & JS custom</li>\n<li>Only focus on directory and file mapping</li>\n<li>Rendering static files to facilitate deployment</li>\n</ul>\n<hr />\n"
},
{
"id": 3,
"url": "/chinese/index.html",
"title": "简体中文",
"content": "<h2>Typikon</h2>\n<p>Typikon 让您可以使用 Markdown 编写您的在线书籍。</p>\n<hr />\n<div style=\"display: flex; gap: 5px;\">\n <img src=\"https://img.shields.io/badge/📖%20Typikon-Rust%20🦀️-yellow\" alt=\"Typikon Rust CLI\" />\n <img src=\"https://codecov.io/github/auula/typikon/branch/main/graph/badge.svg?token=FaR2OdNYeB\" alt=\"Codecov\" />\n <img src=\"https://img.shields.io/badge/license-Apache-db5149.svg\" alt=\"License\" />\n <img src=\"https://github.com/auula/typikon/actions/workflows/rust.yml/badge.svg?event=push\" alt=\"Action\" />\n <img src=\"https://img.shields.io/twitter/follow/auula_?style=social\" alt=\"Twitter URL\" />\n</div>\n<hr />\n<h3>介 绍</h3>\n<p><img src=\"https://img.leonding.me/w3uchi.png\" alt=\"Typikon Image\"\n\t\t\t\t\t\t\tstyle=\"float: left; margin: 0px 20px 10px 10px;height: 100px;\" /></p>\n<p>Typikon 的名字源自 <a href=\"https://en.wikipedia.org/wiki/Typikon\">Typikon</a> 书籍,它是一个类似于 mdbook 和 gitbook 的静态网站渲染工具,但它专注于将 Markdown 渲染成在线书籍,比其他工具更易于使用。</p>\n<hr />\n<blockquote>\n<p>GitHub:<a href=\"https://github.com/auula/typikon\">github.com/auula/typikon</a> 🌟</p>\n</blockquote>\n<hr />\n<h3>特 点</h3>\n<ul>\n<li>支持暗黑和明亮主题</li>\n<li>支持自定义 CSS 和 JS</li>\n<li>仅关注目录和文件映射</li>\n<li>渲染静态文件以便于部署</li>\n</ul>\n"
},
{
"id": 4,
"url": "/english/introduce.html",
"title": "Introduce",
"content": "<h2>Typikon</h2>\n<p>Typikon lets you use markdown to write your online books.</p>\n<hr />\n<div style=\"display: flex; gap: 5px;\">\n <img src=\"https://img.shields.io/badge/📖%20Typikon-Rust%20🦀️-yellow\" alt=\"Typikon Rust CLI\" />\n <img src=\"https://codecov.io/github/auula/typikon/branch/main/graph/badge.svg?token=FaR2OdNYeB\" alt=\"Codecov\" />\n <img src=\"https://img.shields.io/badge/license-Apache-db5149.svg\" alt=\"License\" />\n <img src=\"https://github.com/auula/typikon/actions/workflows/rust.yml/badge.svg?event=push\" alt=\"Action\" />\n <img src=\"https://img.shields.io/twitter/follow/auula_?style=social\" alt=\"Twitter URL\" />\n</div>\n<hr />\n<h3>Introduce</h3>\n<p><img src=\"https://img.leonding.me/w3uchi.png\" alt=\"Typikon Image\"\n\t\t\t\t\t\t\tstyle=\"float: left; margin: 0px 20px 10px 10px;height: 100px;\" /></p>\n<p>Typikon name derived from <a href=\"https://en.wikipedia.org/wiki/Typikon\">Typikon</a> Book, a static website rendering tool similar to mdbook and gitbook, but it focuses only on rendering markdown into an online book, and is easier to use than the other tools.</p>\n<hr />\n<blockquote>\n<p>GitHub: <a href=\"https://github.com/auula/typikon\">github.com/auula/typikon</a> 🌟</p>\n</blockquote>\n<hr />\n<h3>Feature</h3>\n<ul>\n<li>Support Dark & Light theme</li>\n<li>Support CSS & JS custom</li>\n<li>Only focus on directory and file mapping</li>\n<li>Rendering static files to facilitate deployment</li>\n</ul>\n<hr />\n"
},
{
"id": 5,
"url": "/english/quickstart.html",
"title": "Quick Start",
"content": "<h2>Quick Start</h2>\n<p>To use the Typikon program, you must first install Typikon on your computer. During the installation process, download the appropriate binary package for your computer’s version from the <a href=\"https://github.com/auula/typikon/releases\">release page</a>. Once you have downloaded the Typikon binary zip package to your computer:</p>\n<blockquote>\n<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>\n</blockquote>\n<p>After downloading the zip binary package, unzip it using <code>unzip</code> or another decompression software. For example:</p>\n<pre><code class=\"language-shell\">unzip typikon-macos-amd64.zip -d /usr/local/bin\nchmod +x /usr/local/bin/typikon\n</code></pre>\n<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>\n<pre><code class=\"language-shell\">export TYPIKON=\"/usr/local/bin\"\nexport PATH=$TYPIKON:$PATH\n</code></pre>\n<p>Remember to refresh the environment variables to ensure that Typikon can be used properly.</p>\n<hr />\n<h2>Getting Started</h2>\n<p>The typikon program provides four subcommands: <code>init</code> is used to initialize the working directory, <code>build</code> is used to generate static files, <code>serve</code> is used to start a static HTTP server for preview functionality, and <code>help</code> provides intelligent subcommand help information. When the typikon main program runs, the result is as follows:</p>\n<pre><code class=\"language-shell\">$: typikon\n\n _ _ _\n | |_ _ _ _ __(_) |_____ _ _\n | _| || | '_ \\ | / / _ \\ ' \\\n \\__|\\_, | .__/_|_\\_\\___/_||_|\n |__/|_| v0.1.2\n\nTypikon lets you use markdown to write your online books.\nGitHub: http://typikonbook.github.io License: Apache2.0\n\n\nUsage: typikon <command> [<args>...]\n\nThe commands are:\n\n init Initialize to working directory\n serve Serve starting the static http server\n build Builder static html file and output to book\n\nUse typikon help <command> for more information about a command.\n\n</code></pre>\n<p>Before you start writing your book content, you need a clean directory to serve as the Typikon working directory. Execute the following command to create a new directory and initialize it:</p>\n<pre><code class=\"language-shell\">$: mkdir example && cd example && typikon init\n</code></pre>\n<p>After initialization, the default working directory is example. Inside example, you will find several key subdirectories and files, but the most important are <code>settings.yml</code> and <code>root.yml</code>. In <code>root.yml</code>, you map your Markdown files to chapters in your book directory. For example:</p>\n<pre><code class=\"language-yaml\"># Book root path mapping file\npath: index.md\nchapters:\n - title: English\n path: english.md\n sub_chapters:\n - title: Introduce\n path: introduce.md\n - title: Quick Start\n path: quickstart.md\n - title: Settings\n path: settings.md\n - title: 简体中文\n path: chinese.md\n sub_chapters:\n - title: 概述介绍\n path: introduce-zh.md\n - title: 快速开始\n path: quickstart-zh.md\n - title: 自定义设置\n path: settings-zh.md\n\n</code></pre>\n<p>Markdown files are stored by default in the <code>example/book</code> directory. The page you are currently reading is generated and rendered using this method.</p>\n<hr />\n<h3>Deployment</h3>\n<p>To deploy the rendered static files, which are by default stored in the <code>example/docs</code> directory after successful rendering, follow these steps to host them on <code>GitHub Pages</code> or <code>Cloudflare Pages</code>. If testing locally, you can use the live-server program to serve the static files locally.</p>\n<pre><code class=\"language-shell\">$: typikon build\n\n _ _ _\n | |_ _ _ _ __(_) |_____ _ _\n | _| || | '_ \\ | / / _ \\ ' \\\n \\__|\\_, | .__/_|_\\_\\___/_||_|\n |__/|_| v0.1.1-beta\n\nTypikon lets you use markdown to write your online books.\nGitHub: http://typikonbook.github.io License: Apache2.0\n\n[INFO] 2024/07/04 00:43:24 💬 Clean up output directory \"docs\" successful\n[INFO] 2024/07/04 00:43:24 💬 New create output directory \"docs\" successful\n[INFO] 2024/07/04 00:43:24 💬 Building static assets \"docs/assets\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/index.html\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/english.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/chinese.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Folder created \"docs/english\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/english/index.html\" successful\n[INFO] 2024/07/04 00:43:24 💬 Folder created \"docs/chinese\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/chinese/index.html\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/introduce.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/quickstart.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/settings.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/introduce-zh.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/quickstart-zh.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/settings-zh.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/english/introduce\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/english/quickstart\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/english/settings\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/chinese/introduce-zh\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/chinese/quickstart-zh\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/chinese/settings-zh\" successful\n[INFO] 2024/07/04 00:43:24 💬 Rendering of static resource files complete 🎉\n</code></pre>\n<p>If you want to preview your website locally before deployment, use <code>live-server</code> to set up a local static server. Here’s how to run <code>live-server</code> :</p>\n<pre><code class=\"language-shell\">$: live-server docs\nServing \"docs\" at http://127.0.0.1:8080\nReady for changes\n</code></pre>\n<p>Navigate to <code>http://127.0.0.1:8080</code> in your web browser to preview your website locally.</p>\n<p>This setup allows you to deploy your static website to a hosting service or test it locally using live-server for immediate feedback.</p>\n<hr />\n<h2>Built-in Service</h2>\n<p>In the new version <code>v0.1.2</code>, an HTTP static server is already built-in, providing preview functionality. You can start the static HTTP server using the <code>serve</code> command. The default listening port is <code>2478</code>. Access it in your browser at <code>http://127.0.0.1:2478</code> :</p>\n<pre><code class=\"language-shell\"> _ _ _\n | |_ _ _ _ __(_) |_____ _ _\n | _| || | '_ \\ | / / _ \\ ' \\\n \\__|\\_, | .__/_|_\\_\\___/_||_|\n |__/|_| v0.1.2\n\nTypikon lets you use markdown to write your online books.\nGitHub: http://typikonbook.github.io License: Apache2.0\n\n[INFO] 2024/07/08 14:32:04 💬 Starting HTTP server on port 2478\n</code></pre>\n"
},
{
"id": 6,
"url": "/english/settings.html",
"title": "Settings",
"content": "<h2>Settings</h2>\n<p>The <code>settings.yml</code> 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 <code>description</code> and <code>keywords</code>. The <code>title</code> field is used to set the book name, and other fields are used to set author information.</p>\n<pre><code class=\"language-yaml\">title: Typikon Book\nauthor: Leon Ding\ndescription: >\n Typikon name derived from Typikon Book, the a static website rendering tool\n similar to mdbook and hugo, but it focuses only on rendering markdown into\n an online book, and is easier to use than the other tools.\nlanguage: en\nkeywords: 'typikon,book,website,generator,static,html,css,js,theme,rust'\ndirectory:\n theme: theme\n input: book\n output: docs\nicon: ''\nport: 2478\ntheme: typikon-theme\ncustom_css:\n - /assets/css/bootstrap.min.css\n - /assets/typikon.css\ncustom_js:\n - /assets/js/bootstrap.min.js\n - /assets/js/bootstrap.bundle.js\n\n</code></pre>\n<p>In the <code>directory</code> 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:</p>\n<pre><code class=\"language-yaml\"> directory:\n theme: theme\n input: book\n output: docs\n</code></pre>\n<hr />\n<h2>Theme</h2>\n<p>By default, the Typikon program supports custom theme files. Theme files are stored in the <code>theme</code> directory. You only need to modify the default <code>index.html</code> content to achieve the purpose of modifying its theme. The <code>assets</code> 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.</p>\n<p>In the <code>settings.yml</code> file, there is a <code>theme</code> 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 <code>assets</code> folder and adding the corresponding mappings as follows:</p>\n<pre><code class=\"language-yaml\"> theme: typikon-theme\n\n custom_css:\n - /assets/css/bootstrap.min.css\n - /assets/sidebars.css\n\n custom_js:\n - /assets/js/bootstrap.min.js\n - /assets/js/bootstrap.bundle.js\n</code></pre>\n<p>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.</p>\n<p>Also, if you want to customize the <code>icon</code> in the web browser’s address bar, you can configure it by modifying the <code>icon</code> field. The default static server <code>port</code> is also configured here:</p>\n<pre><code class=\"language-yaml\">icon: ''\nport: 2478\n</code></pre>\n<p>After you’ve completed all the introductory tutorials, you’re now ready to start building your own online book website.</p>\n"
},
{
"id": 7,
"url": "/chinese/introduce-zh.html",
"title": "概述介绍",
"content": "<h2>Typikon</h2>\n<p>Typikon 让您可以使用 Markdown 编写您的在线书籍。</p>\n<hr />\n<div style=\"display: flex; gap: 5px;\">\n <img src=\"https://img.shields.io/badge/📖%20Typikon-Rust%20🦀️-yellow\" alt=\"Typikon Rust CLI\" />\n <img src=\"https://codecov.io/github/auula/typikon/branch/main/graph/badge.svg?token=FaR2OdNYeB\" alt=\"Codecov\" />\n <img src=\"https://img.shields.io/badge/license-Apache-db5149.svg\" alt=\"License\" />\n <img src=\"https://github.com/auula/typikon/actions/workflows/rust.yml/badge.svg?event=push\" alt=\"Action\" />\n <img src=\"https://img.shields.io/twitter/follow/auula_?style=social\" alt=\"Twitter URL\" />\n</div>\n<hr />\n<h3>介 绍</h3>\n<p><img src=\"https://img.leonding.me/w3uchi.png\" alt=\"Typikon Image\"\n\t\t\t\t\t\t\tstyle=\"float: left; margin: 0px 20px 10px 10px;height: 100px;\" /></p>\n<p>Typikon 的名字源自 <a href=\"https://en.wikipedia.org/wiki/Typikon\">Typikon</a> 书籍,它是一个类似于 mdbook 和 gitbook 的静态网站渲染工具,但它专注于将 Markdown 渲染成在线书籍,比其他工具更易于使用。</p>\n<hr />\n<blockquote>\n<p>GitHub:<a href=\"https://github.com/auula/typikon\">github.com/auula/typikon</a> 🌟</p>\n</blockquote>\n<hr />\n<h3>特 性</h3>\n<ul>\n<li>支持暗黑和明亮主题</li>\n<li>支持自定义 CSS 和 JS</li>\n<li>仅关注目录和文件映射</li>\n<li>渲染静态文件以便于部署</li>\n</ul>\n"
},
{
"id": 8,
"url": "/chinese/quickstart-zh.html",
"title": "快速开始",
"content": "<h2>快速入门</h2>\n<p>如果想使用 typikon 程序,必须先将 typikon 程序安装到你的计算机中,安装过程中根据自己的计算机版本找到对应的二进制安装包,安装包可以在 <a href=\"https://github.com/auula/typikon/releases\">release</a> 页面中找到,并下载 typikon 的二进制压缩包到你计算机中。</p>\n<blockquote>\n<p>在使用 typikon 程序之前请确保你计算机已经成功连接到国际互联网,如果是中国大陆地区可能会出现无法创建工作目录的情况,如果出现此类问题,可以尝试使用加速或者开启代理软件,再使用 typikon 进行目录初始化工作。</p>\n</blockquote>\n<p>当下载好 zip 二进制软件包后,请使用 <code>unzip</code> 或者其他解压软件来解压 <code>typikon-macos-amd64.zip</code> 软件包,命令如下:</p>\n<pre><code class=\"language-shell\">unzip typikon-macos-amd64.zip -d /usr/local/bin\nchmod +x /usr/local/bin/typikon\n</code></pre>\n<p>通过手动解压二进制到指定目录中,如果你想要全局使用 typikon 程序,那么必须将 typikon 所在的路径添加到计算机操作系统的环境变量中,例如:</p>\n<pre><code class=\"language-shell\">export TYPIKON=\"/usr/local/bin\"\nexport PATH=$TYPIKON:$PATH\n</code></pre>\n<p>最后刷新环境变量,使 typikon 能被正常使用。</p>\n<hr />\n<h2>快速开始</h2>\n<p>在 typikon 程序中提供了 4 个子命令,分别为 <code>init</code> 用来初始化工作目录, <code>build</code> 用来构建生成静态文件,<code>serve</code> 用来启动静态 HTTP 服务器提供预览功能, <code>help</code> 智能化子命令帮助信息提示,当 <code>typikon</code> 主程序运行起来后结果如下:</p>\n<pre><code class=\"language-shell\">$: typikon\n\n _ _ _\n | |_ _ _ _ __(_) |_____ _ _\n | _| || | '_ \\ | / / _ \\ ' \\\n \\__|\\_, | .__/_|_\\_\\___/_||_|\n |__/|_| v0.1.2\n\nTypikon lets you use markdown to write your online books.\nGitHub: http://typikonbook.github.io License: Apache2.0\n\n\nUsage: typikon <command> [<args>...]\n\nThe commands are:\n\n init Initialize to working directory\n serve Serve starting the static http server\n build Builder static html file and output to book\n\nUse typikon help <command> for more information about a command.\n\n</code></pre>\n<p>在编写你的书籍资料之前,需要一个干净的目录作为 <code>typikon</code> 的工作目录,执行以下命令可以创建新的目录并且初始化为工作目录:</p>\n<pre><code class=\"language-shell\">$: mkdir example && cd example && typikon init\n</code></pre>\n<p>当初始化完成之后,默认的工作目录就为 <code>example</code> 目录,在 <code>example</code> 目录中有几个关键的子目录和文件,我们只关注 <code>settings.yml</code> 文件和 <code>root.yml</code> 文件。在 <code>root.yml</code> 文件中编写 markdown 文件到书籍目录的映射关系,例如下面:</p>\n<pre><code class=\"language-yaml\"># Book root path mapping file\nroot:\n index: \"index.md\"\n chapters:\n - title: \"English\"\n index: \"english.md\"\n # Sub chapters root\n sub_chapters:\n - title: \"Introduce\"\n path: \"introduce.md\"\n - title: \"Quick Start\"\n path: \"quickstart.md\"\n - title: \"Settings\"\n path: \"settings.md\"\n # Sub chapters root\n - title: \"简体中文\"\n index: \"chinese.md\"\n sub_chapters:\n # Chapter content\n - title: \"概述介绍\"\n path: \"introduce-zh.md\"\n - title: \"快速开始\"\n path: \"quickstart-zh.md\"\n - title: \"自定义设置\"\n path: \"settings-zh.md\"\n\n</code></pre>\n<p>源 <code>markdown</code> 文件默认存储在 <code>example/book</code> 目录中,你目前所阅读这个页面就是通过此种方式生成渲染的。</p>\n<hr />\n<h3>部署文件</h3>\n<p>如何部署渲染的静态文件,默认被渲染成功之后的存储存储在 <code>example/docs</code> 目录中,只需要在将该目录上传到 GitHub Pages 和 Cloudflare Pages 中部署就可以通过域名访问,如果在本地测试,可以使用 <code>live-server</code> 程序提供本地静态服务器来访问,例如命令:</p>\n<pre><code class=\"language-shell\">$: typikon build\n\n _ _ _\n | |_ _ _ _ __(_) |_____ _ _\n | _| || | '_ \\ | / / _ \\ ' \\\n \\__|\\_, | .__/_|_\\_\\___/_||_|\n |__/|_| v0.1.1-beta\n\nTypikon lets you use markdown to write your online books.\nGitHub: http://typikonbook.github.io License: Apache2.0\n\n[INFO] 2024/07/04 00:43:24 💬 Clean up output directory \"docs\" successful\n[INFO] 2024/07/04 00:43:24 💬 New create output directory \"docs\" successful\n[INFO] 2024/07/04 00:43:24 💬 Building static assets \"docs/assets\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/index.html\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/english.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/chinese.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Folder created \"docs/english\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/english/index.html\" successful\n[INFO] 2024/07/04 00:43:24 💬 Folder created \"docs/chinese\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/chinese/index.html\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/introduce.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/quickstart.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/settings.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/introduce-zh.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/quickstart-zh.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Loading markdown file \"book/settings-zh.md\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/english/introduce\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/english/quickstart\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/english/settings\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/chinese/introduce-zh\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/chinese/quickstart-zh\" successful\n[INFO] 2024/07/04 00:43:24 💬 Data written to file \"docs/chinese/settings-zh\" successful\n[INFO] 2024/07/04 00:43:24 💬 Rendering of static resource files complete 🎉\n</code></pre>\n<p>目前 typikon 程序没有内置静态文件服务器,会在未来的新版本添加支持;\n可以使用本地服务器 <code>live-server</code> 来测试生成静态网站:</p>\n<pre><code class=\"language-shell\">$: live-server docs\nServing \"docs\" at http://127.0.0.1:8080\nReady for changes\n</code></pre>\n<p>访问 <code>http://127.0.0.1:8080</code> 就可以预览到网站。</p>\n<hr />\n<h2>内置服务</h2>\n<p>在新版本 <code>v0.1.2</code> 版本之后已经内置了 HTTP 静态服务器,可以提供预览功能,使用 <code>serve</code> 命令就可以启动静态 HTTP 服务器,默认监听端口为 <code>2478</code> :</p>\n<pre><code class=\"language-shell\"> _ _ _\n | |_ _ _ _ __(_) |_____ _ _\n | _| || | '_ \\ | / / _ \\ ' \\\n \\__|\\_, | .__/_|_\\_\\___/_||_|\n |__/|_| v0.1.2\n\nTypikon lets you use markdown to write your online books.\nGitHub: http://typikonbook.github.io License: Apache2.0\n\n[INFO] 2024/07/08 14:32:04 💬 Starting HTTP server on port 2478\n</code></pre>\n<p>通过浏览器访问 <code>http://127.0.0.1:2478</code> ,就可以浏览已经被渲染的好页面了。</p>\n"
},
{
"id": 9,
"url": "/chinese/settings-zh.html",
"title": "自定义设置",
"content": "<h2>Settings</h2>\n<p>在 <code>settings.yml</code> 文件中存储是 typikon 程序默认配置文件,可以设置 typikon 渲染出来的静态网站元数据信息,例如方便 SEO 优化的 <code>description</code> 和 <code>keywords</code> 字段,<code>title</code> 用来设置书名,其他字段用于设置作者信息。</p>\n<pre><code class=\"language-yaml\">title: Typikon Book\nauthor: Leon Ding\ndescription: >\n Typikon name derived from Typikon Book, the a static website rendering tool\n similar to mdbook and hugo, but it focuses only on rendering markdown into\n an online book, and is easier to use than the other tools.\nlanguage: en\nkeywords: 'typikon,book,website,generator,static,html,css,js,theme,rust'\ndirectory:\n theme: theme\n input: book\n output: docs\nicon: ''\nport: 2478\ntheme: typikon-theme\ncustom_css:\n - /assets/css/bootstrap.min.css\n - /assets/typikon.css\ncustom_js:\n - /assets/js/bootstrap.min.js\n - /assets/js/bootstrap.bundle.js\n</code></pre>\n<p>在 <code>directory</code> 节点下可以设置默认数据文件存储位置的文件夹和被渲染之后的时间存储文件夹,以及主题存放的文件夹;都必须是当前目录下的,可以配置目录映射关系:</p>\n<pre><code class=\"language-yaml\"> directory:\n theme: theme\n input: book\n output: docs\n</code></pre>\n<hr />\n<h2>Theme</h2>\n<p>默认 typikon 程序上是支持主题文件自定义的,主题文件存储在 <code>theme</code> 目录中,你只需要修改默认的 <code>index.html</code> 内容就可以到达修改其主题的目的,<code>assets</code> 目录中存储是主题依赖资源文件。默认情况不建议去修改主题文件,如果你有前端基础可以对该目录中的文件进行修改。</p>\n<p>在 <code>settings.yml</code> 文件有关于主题的 <code>theme</code> 字段,通过修改字段来支持其他主题样式,字段的值对应 <code>theme</code> 目录下的主题文件夹的名称;也可以自定义 css 文件和 js 文件,只需要将其放入 <code>assets</code> 文件夹目录中,添加对应映射关系即可:</p>\n<pre><code class=\"language-yaml\"> theme: typikon-theme\n\n custom_css:\n - /assets/css/bootstrap.min.css\n - /assets/sidebars.css\n\n custom_js:\n - /assets/js/bootstrap.min.js\n - /assets/js/bootstrap.bundle.js\n</code></pre>\n<p>例如你的网站需要统计用户访问数据,例如 Google Analytics 的 JS 代码文件,可以通过此种方式进行自定义配置引入。</p>\n<p>另外如果要自定义网页浏览器栏的 <code>icon</code> 图标可以通过修改 <code>icon</code> 字段进行配置,默认静态服务器端口也在此进行配置:</p>\n<pre><code class=\"language-yaml\">icon: ''\nport: 2478\n</code></pre>\n<p>到此你看完所有入门教程,现在可以动手搭建专属于你的书籍在线网站了。</p>\n"
}
]