diff --git a/README.md b/README.md
deleted file mode 120000
index 14300ad..0000000
--- a/README.md
+++ /dev/null
@@ -1 +0,0 @@
-book-src/intro.md
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4c3df6b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,54 @@
+# Zig Cookbook
+
+[](https://discord.gg/bAehMGPb2R)
+[](https://github.com/zigcc/zig-cookbook/stargazers)
+[](https://github.com/zigcc/zig-cookbook/actions/workflows/ci.yml)
+[](https://github.com/zigcc/zig-cookbook/actions/workflows/pages.yml)
+
+
+
+[Zig cookbook](https://github.com/zigcc/zig-cookbook) is a collection of simple Zig programs that demonstrate good practices to accomplish common programming tasks.
+
+> - Main branch tracks Zig 0.14.0 and master, and are tested on Linux and macOS via GitHub actions.
+> - Earlier Zig support could be found in [other branches](https://github.com/zigcc/zig-cookbook/branches).
+
+# How to use
+
+[The website](https://cookbook.ziglang.cc/) is generated by [zine-ssg](https://zine-ssg.io), a static site generator for Zig. `zine` will start a server at `http://localhost:1990` for preview.
+
+Each recipe is accompanied by an illustrative example named after its corresponding sequence number. These examples can be executed using the command `zig build run-{chapter-num}-{sequence-num}`, or `zig build run-all` to execute all.
+
+> ## Note
+>
+> Some recipes may depend on system libraries
+>
+> - Use `make install-deps` to install client libraries, and
+> - `docker-compose up -d` to start required databases.
+
+# Contributing
+
+This cookbook is a work in progress, and we welcome contributions from the community. If you have a favorite recipe that you'd like to share, please submit a [pull request](https://github.com/zigcc/zig-cookbook/pulls).
+
+## Localization
+
+Create corresponding recipe in the language folder, localize it, and submit a [pull request](https://github.com/zigcc/zig-cookbook/pulls).
+
+# Acknowledgment
+
+The **initial** version of the Zig Cookbook was inspired by several other similar projects. We would like to thank the following projects, thanks for their awesome work.
+
+- [Rust Cookbook](https://github.com/rust-lang-nursery/rust-cookbook)
+
+The **current** version of the Zig Cookbook is based on [zine-ssg](https://zine-ssg.io), thanks for their awesome work.
+
+# Star History
+
+```=html
+
+
+
+```
+
+# License
+
+The markdown files are licensed under [CC BY-NC-ND 4.0 DEED](https://creativecommons.org/licenses/by-nc-nd/4.0/), and zig files are under MIT.
diff --git a/assets/style.css b/assets/style.css
index d5bfde4..e50c7e6 100644
--- a/assets/style.css
+++ b/assets/style.css
@@ -70,28 +70,8 @@ body {
}
#prev-next {
- display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
- align-items: center;
- margin-top: 20px;
- padding-top: 5px;
- border-top: 2px solid var(--border);
-}
-
-#prev-next a {
- text-decoration: none;
-}
-#prev-next > :last-child {
- margin-left: auto;
- text-align: right;
-}
-#prev-next > :first-child span::before {
- content: "←";
-}
-
-#prev-next > :last-child span::after {
- content: "→";
+ padding: 15px 0;
+ border-bottom: 1px solid var(--border);
}
a {
@@ -165,6 +145,20 @@ html {
max-width: 50rem;
}
+article {
+ border-bottom: 1px solid var(--border);
+}
+
+#footer {
+ margin: 15px 0;
+ text-align: center;
+ font-size: 0.85rem;
+}
+
+#footer .langs * {
+ margin: 0 5px;
+}
+
.toc {
width: var(--toc-width);
min-width: var(--toc-width);
@@ -176,12 +170,11 @@ html {
/* word-break: normal; */
}
.toc a {
- text-decoration: none;
line-break: auto;
}
.toc a:hover {
- text-decoration: underline;
+ color: #5eafcd;
}
.toc a[aria-current="page"] {
@@ -291,4 +284,9 @@ html {
h1{
margin-bottom: 0;
+}
+#content-header{
+ margin-bottom: 10px;
+ padding-bottom: 10px;
+ border-bottom: 1px solid var(--border)
}
\ No newline at end of file
diff --git a/i18n/en-US.ziggy b/i18n/en-US.ziggy
new file mode 100644
index 0000000..abb9b56
--- /dev/null
+++ b/i18n/en-US.ziggy
@@ -0,0 +1,11 @@
+{
+ "site_title": "Zig Cookbook",
+ "introduction": "Introduction",
+ "contributing": "Contributing",
+ "license": "License",
+ "toggle_toc": "Toggle Table of Contents",
+ "prev": "Previous: ",
+ "next": "Next: ",
+ "languages_menu": "This page is available in the following languages",
+ "footer_copyright": "License: text: CC BY-SA 4.0; code: MIT",
+}
diff --git a/i18n/zh-CN.ziggy b/i18n/zh-CN.ziggy
new file mode 100644
index 0000000..e5ba3dd
--- /dev/null
+++ b/i18n/zh-CN.ziggy
@@ -0,0 +1,11 @@
+{
+ "site_title": "Zig Cookbook",
+ "introduction": "介绍",
+ "contributing": "贡献",
+ "license": "许可证",
+ "toggle_toc": "切换目录",
+ "prev": "上一示例:",
+ "next": "下一示例:",
+ "languages_menu": "此页面提供以下语言的版本",
+ "footer_copyright": "许可证: 文字:CC BY-NC-SA 4.0;代码:MIT",
+}
diff --git a/layouts/section.shtml b/layouts/section.shtml
index f5a7eae..d81cfdd 100644
--- a/layouts/section.shtml
+++ b/layouts/section.shtml
@@ -4,8 +4,8 @@
diff --git a/layouts/templates/base.shtml b/layouts/templates/base.shtml index a260d01..26e2c2a 100644 --- a/layouts/templates/base.shtml +++ b/layouts/templates/base.shtml @@ -3,7 +3,7 @@
-
+