编程解剖 in rust
以rust为例分享学习编程常考虑的方方面面
本地运行
cargo install mdbook
mdbook serve
git lfs配置
git lfs install
git lfs track '*.img'
项目基础结构
{{#check
- 每个文件夹下的同名md文件介绍当前文件夹的内容
- 关于待完成内容:主要基于mdbook-checklist插件
- [待完成](checklist.md)
- 添加待完成锚点的格式
check空格之后的内容不能有空格, 且只能为英文 “ | “之后的内容可以有空格,可以为中文
<a id="Note-1"></a>Note-1
- checklist页面渲染效果:
- <SUMMARY对应标题名>
- [This is an important note](Note-1)
这种写法会自动在本地生成md文件:src/checklist.md, 但是不用管它,最后渲染还是以mdbook-checklist的内容为准
用到的工具
mdbook-checklist: 整理待办事项
ANSSI-FR/mdbook-checklist: mdbook preprocessor for generating checklists and indexes
cargo install mdbook-checklist
mdbook-checklist - crates.io: Rust Package Registry
mdbook-pagetoc: 添加业内目录
JorelAli/mdBook-pagetoc: A page table of contents for mdBook
mdbook-admonish: 使用新的css文件
相关资源
- tommilligan/mdbook-admonish: A preprocessor for mdbook to add Material Design admonishments.
- mdbook-admonish - crates.io: Rust Package Registry
- Overview - The mdbook-admonish book
- Admonitions - Material for MkDocs
All supported directives are listed below.
特别语法
自定义标题
内嵌代码
自定义样式
可折叠
常用格式
note
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
abstract
, summary
, tldr
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
info
, todo
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
tip
, hint
, important
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
success
, check
, done
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
question
, help
, faq
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
warning
, caution
, attention
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
failure
, fail
, missing
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
danger
, error
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
bug
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
example
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
quote
, cite
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
github action
- rust-cargo-install · Actions · GitHub Marketplace
- ekalinin/github-markdown-toc: Easy TOC creation for GitHub README.md
- 设置token:Personal access tokens
- 给指定repository设置secret:repository -> settings -> secrets -> Actions
- 新建一个名为GH_MD_TOC的repository secret,将第一步的token设置进去
- 将这个secret设置为action环境变量