mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-12-23 08:47:50 +00:00
docs: add typlite docs (#1828)
Some checks failed
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Has been cancelled
tinymist::ci / build-binary (push) Has been cancelled
tinymist::ci / build-vsc-assets (push) Has been cancelled
tinymist::ci / build-vscode (push) Has been cancelled
tinymist::ci / build-vscode-others (push) Has been cancelled
tinymist::ci / publish-vscode (push) Has been cancelled
Some checks failed
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Has been cancelled
tinymist::ci / build-binary (push) Has been cancelled
tinymist::ci / build-vsc-assets (push) Has been cancelled
tinymist::ci / build-vscode (push) Has been cancelled
tinymist::ci / build-vscode-others (push) Has been cancelled
tinymist::ci / publish-vscode (push) Has been cancelled
* docs: add typlite docs * docs: update typlite docs * chore: reduce trim
This commit is contained in:
parent
7ee2e53189
commit
59c6e1c48e
18 changed files with 278 additions and 25 deletions
36
typ/templates/git.typ
Normal file
36
typ/templates/git.typ
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
#let git-head = read("/.git/HEAD").trim()
|
||||
#let git-head-branch = if git-head.starts-with("ref: refs/heads/") {
|
||||
git-head.slice("ref: refs/heads/".len())
|
||||
} else {
|
||||
none
|
||||
}
|
||||
#let git-head-hash = if git-head.starts-with("ref: ") {
|
||||
read("/.git/" + git-head.slice(5)).trim()
|
||||
} else {
|
||||
git-head
|
||||
}
|
||||
|
||||
// todo: read it from somewhere
|
||||
#let remote = "https://github.com/Myriad-Dreamin/tinymist"
|
||||
|
||||
#let github-link(path, body, kind: "tree", permalink: true) = link(
|
||||
{
|
||||
remote
|
||||
"/"
|
||||
kind
|
||||
"/"
|
||||
if not permalink or git-head-branch == none {
|
||||
git-head-branch
|
||||
} else {
|
||||
git-head-hash
|
||||
}
|
||||
"/"
|
||||
if path.starts-with("/") {
|
||||
path.slice(1)
|
||||
} else {
|
||||
path
|
||||
}
|
||||
},
|
||||
body,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue