-
Notifications
You must be signed in to change notification settings - Fork 0
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
26 changed files
with
4,903 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,52 @@ | ||
[book] | ||
authors = ["Demian"] | ||
language = "en" | ||
authors = ["Creators!"] | ||
language = "cn" | ||
multilingual = false | ||
src = "src" | ||
title = "Creators World." | ||
title = "Creators' World." | ||
description = "零知世界" | ||
|
||
|
||
[preprocessor] | ||
|
||
# [preprocessor.katex] | ||
# after = ["links"] | ||
# macros = "macros.txt" | ||
|
||
[preprocessor.toc] | ||
command = "mdbook-toc" | ||
renderer = ["html"] | ||
marker = "[TOC]" | ||
max-level = 4 | ||
|
||
[preprocessor.admonish] | ||
command = "mdbook-admonish" | ||
assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install` | ||
|
||
[preprocessor.open-on-gh] | ||
command = "mdbook-open-on-gh" | ||
renderer = ["html"] | ||
|
||
|
||
[preprocessor.mermaid] | ||
command = "mdbook-mermaid" | ||
|
||
|
||
[output.html] | ||
mathjax-support = true | ||
no-section-label = true | ||
theme = "theme" | ||
additional-js = ["theme/mermaid.min.js", "theme/mermaid-init.js"] | ||
additional-css = ["./mdbook-admonish.css", "theme/css/mdbook-admonish.css", "theme/css/open-in.css"] | ||
git-repository-url = "https://github.com/zkp-co-learning/zkp-co-learning.github.io" | ||
open-on-text = "Found a bug?! [Edit this page on GitHub.]" | ||
edit-url-template = "https://github.com/zkp-co-learning/zkp-co-learning.github.io/edit/main/{path}" | ||
curly-quotes = true # replaces straight quotes with curly quotes | ||
|
||
|
||
[output.html.fold] | ||
enable = true # whether or not to enable section folding | ||
level = 0 # the depth to start folding | ||
|
||
[output.html.search] | ||
enable = true |
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,64 @@ | ||
#!/usr/bin/env just --justfile | ||
|
||
COLOR_GREEN := 'Green' | ||
COLOR_BLUE := 'Blue' | ||
COLOR_RED := 'Red' | ||
|
||
ROOT_DIR := replace(justfile_directory(), "\\", "/") | ||
|
||
set shell := ["pwsh", "-NoLogo", "-Command"] | ||
|
||
# | ||
# Build tasks | ||
# | ||
default: serve | ||
|
||
init: | ||
# cargo install mdbook | ||
cargo install mdbook-admonish | ||
cargo install mdbook-mermaid | ||
cargo install mdbook-open-on-gh | ||
cargo install mdbook-toc | ||
|
||
init-builder: | ||
# @just install-gh-bin https://github.com/rust-lang/mdBook/releases/download/v0.4.35/mdbook-v0.4.35-x86_64-unknown-linux-gnu.tar.gz mdbook | ||
# cargo install mdbook-i18n-helpers | ||
@just install-gh-bin https://github.com/badboy/mdbook-mermaid/releases/download/v0.12.6/mdbook-mermaid-v0.12.6-x86_64-unknown-linux-gnu.tar.gz mdbook-mermaid | ||
@just install-gh-bin https://github.com/badboy/mdbook-open-on-gh/releases/download/2.4.1/mdbook-open-on-gh-2.4.1-x86_64-unknown-linux-gnu.tar.gz mdbook-open-on-gh | ||
# @just install-gh-bin https://github.com/lzanini/mdbook-katex/releases/download/v0.5.8pub/mdbook-katex-v0.5.8-x86_64-unknown-linux-gnu.tar.gz mdbook-katex | ||
@just install-gh-bin https://github.com/badboy/mdbook-toc/releases/download/0.14.1/mdbook-toc-0.14.1-x86_64-unknown-linux-gnu.tar.gz mdbook-toc | ||
@just install-gh-bin https://github.com/tommilligan/mdbook-admonish/releases/download/v1.13.0/mdbook-admonish-v1.13.0-x86_64-unknown-linux-gnu.tar.gz mdbook-admonish | ||
|
||
install-gh-bin GITHUB_PATH BIN_NAME: | ||
@just _log-head "Installing {{BIN_NAME}} from {{GITHUB_PATH}} ..." | ||
rm -f bin.tar.gz | ||
wget {{GITHUB_PATH}} -O bin.tar.gz | ||
tar zxvf ./bin.tar.gz | ||
chmod +x ./{{BIN_NAME}} | ||
mv ./{{BIN_NAME}} ~/.cargo/bin | ||
@just _log-info "Installing {{BIN_NAME}} completed!" | ||
|
||
build: | ||
@just _log-head "Building book ..." | ||
mdbook build | ||
just po-build en | ||
|
||
serve: | ||
@just _log-head "Starting mdbook server ..." | ||
mdbook serve -n 0.0.0.0 | ||
|
||
|
||
# | ||
# Utility tasks | ||
# | ||
_log-head LOG_LINE: | ||
@just _log-inner "{{COLOR_GREEN}}" "INFO!" "{{LOG_LINE}}" | ||
|
||
_log-info LOG_LINE: | ||
@just _log-inner "{{COLOR_BLUE}}" "INFO " "{{LOG_LINE}}" | ||
|
||
_log-error LOG_LINE: | ||
@just _log-inner "{{COLOR_RED}}" "ERROR" "{{LOG_LINE}}" | ||
|
||
_log-inner COLOR LOG_LEVEL LOG_LINE: | ||
@if ("{{LOG_LINE}}" -eq "") { echo ""; } else { Write-Host -ForegroundColor "{{COLOR}}" "[$(Get-Date -UFormat '%Y-%m-%d %H:%M:%S')][{{LOG_LEVEL}}] {{LOG_LINE}}"; } |
Oops, something went wrong.