Skip to content

Commit

Permalink
update template
Browse files Browse the repository at this point in the history
  • Loading branch information
qujihan committed Nov 9, 2024
1 parent 2e57e43 commit c9c3c6d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "typst-book-template"]
path = typst-book-template
url = https://github.com/qujihan/typst-book-template.git
[submodule "fonts"]
path = fonts
url = https://github.com/qujihan/fonts.git
1 change: 1 addition & 0 deletions fonts
Submodule fonts added at 061b54
11 changes: 11 additions & 0 deletions fonts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"lora": [
"https://github.com/cyrealtype/Lora-Cyrillic/releases/download/v3.005/Lora-v3.005.zip"
],
"CaskaydiaCove Nerd Font": [
"https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/CascadiaCode.zip"
],
"Han-serif": [
"https://github.com/adobe-fonts/source-han-serif/releases/download/2.002R/09_SourceHanSerifSC.zip"
]
}
4 changes: 3 additions & 1 deletion main.typ
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#show: book.with(info:(
title: "从零开始的分布式数据库生活 \n (From Zero to Distributed Database)",
name: "Quhaha",
outline-depth: 3,
latin-font: ("Lora"),
cjk-font: ("Source Han Serif SC",),
code-font: ("CaskaydiaCove NF",),
))

#set heading(supplement: "")
Expand Down
11 changes: 6 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
.PHONY: w c f font
file_name := "从零开始的分布式数据库生活.pdf"

.PHONY: w c f font

w:
python3 ./typst-book-template/op.py w
typst w main.typ ${file_name} --font-path ./fonts/

c:
python3 ./typst-book-template/op.py c
typst c main.typ ${file_name} --font-path ./fonts/

f:
python3 ./typst-book-template/op.py f
typstyle format-all ./

font:
python3 ./typst-book-template/fonts/download.py --proxy
python3 ./fonts/download.py --proxy
5 changes: 0 additions & 5 deletions metadata.json

This file was deleted.

0 comments on commit c9c3c6d

Please sign in to comment.