From 55228c76a67b812c3b056142ab120604d48aa68c Mon Sep 17 00:00:00 2001
From: Myriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com>
Date: Sat, 2 Aug 2025 21:45:58 +0800
Subject: [PATCH] feat: update links in vscode docs (#1967)
---
assets/images/introduction/frame_0.svg | 12 ++++-----
assets/images/introduction/frame_1.svg | 12 ++++-----
.../images/release-instruction/frame_0.svg | 12 ++++-----
.../images/release-instruction/frame_1.svg | 12 ++++-----
docs/tinymist/config/shared.typ | 20 ++------------
docs/tinymist/frontend/vscode.typ | 27 ++++++++++++-------
docs/tinymist/mod.typ | 22 +++++++++++++++
editors/vscode/README.md | 15 ++++++++---
8 files changed, 78 insertions(+), 54 deletions(-)
diff --git a/assets/images/introduction/frame_0.svg b/assets/images/introduction/frame_0.svg
index 121f875a..5800678b 100644
--- a/assets/images/introduction/frame_0.svg
+++ b/assets/images/introduction/frame_0.svg
@@ -2,28 +2,28 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/assets/images/introduction/frame_1.svg b/assets/images/introduction/frame_1.svg
index 175283c6..28d607a0 100644
--- a/assets/images/introduction/frame_1.svg
+++ b/assets/images/introduction/frame_1.svg
@@ -2,28 +2,28 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/docs/assets/images/release-instruction/frame_0.svg b/docs/assets/images/release-instruction/frame_0.svg
index 121f875a..5800678b 100644
--- a/docs/assets/images/release-instruction/frame_0.svg
+++ b/docs/assets/images/release-instruction/frame_0.svg
@@ -2,28 +2,28 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/docs/assets/images/release-instruction/frame_1.svg b/docs/assets/images/release-instruction/frame_1.svg
index 175283c6..28d607a0 100644
--- a/docs/assets/images/release-instruction/frame_1.svg
+++ b/docs/assets/images/release-instruction/frame_1.svg
@@ -2,28 +2,28 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/docs/tinymist/config/shared.typ b/docs/tinymist/config/shared.typ
index cdd35766..44ccc759 100644
--- a/docs/tinymist/config/shared.typ
+++ b/docs/tinymist/config/shared.typ
@@ -12,27 +12,11 @@
#let other-config = json("/editors/vscode/package.other.json").contributes.configuration.properties
-#let html-link(dest) = if is-md-target {
- cross-link(dest, [HTML])
-} else {
- [HTML]
-}
-
-#let md-link(dest) = if is-md-target {
- [Markdown]
-} else {
- github-link(dest, [Markdown])
-}
-
#context if show-switch.get() {
if is-vscode.get() {
- html-link("/config/vscode.typ")
- [ | ]
- md-link("/editors/vscode/Configuration.md")
+ switch-link("/config/vscode.typ", "/editors/vscode/Configuration.md")
} else {
- html-link("/config/neovim.typ")
- [ | ]
- md-link("/editors/neovim/Configuration.md")
+ switch-link("/config/neovim.typ", "/editors/neovim/Configuration.md")
}
}
diff --git a/docs/tinymist/frontend/vscode.typ b/docs/tinymist/frontend/vscode.typ
index 361bf65e..a0adaf47 100644
--- a/docs/tinymist/frontend/vscode.typ
+++ b/docs/tinymist/frontend/vscode.typ
@@ -2,16 +2,25 @@
#show: book-page.with(title: [Tinymist Typst VS Code Extension])
+#switch-link("/frontend/vscode.typ", "/editors/vscode/Configuration.md")
+
A VS Code or VS Codium extension for Typst. You can find the extension on:
-- Night versions available at #link("https://github.com/Myriad-Dreamin/tinymist/actions")[GitHub Actions];.
-- Stable versions available at #link("https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist")[Visual Studio Marketplace];.
-- Stable versions available at #link("https://open-vsx.org/extension/myriad-dreamin/tinymist")[Open VSX];.
+- Stable and pre-release versions available at #link("https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist")[Visual Studio Marketplace] and #link("https://open-vsx.org/extension/myriad-dreamin/tinymist")[Open VSX].
+- The artifacts built per commits at #link("https://github.com/Myriad-Dreamin/tinymist/actions")[GitHub Actions].
= Features
See #link("https://github.com/Myriad-Dreamin/tinymist#features")[Tinymist Features] for a list of features.
+= LLM-Assisted Documentation
+
+The #link("https://github.com/Myriad-Dreamin/tinymist/tree/main/docs/for-llm/vscode-ui.md")[Software Specification] contains user interface provided by this extension, You could find solutions by text search in the docs or ask LLMs with plugging the docs.
+
+= Configuration Reference
+
+#cross-link("/config/vscode.typ", [Configuration Reference]).
+
= Usage Tips
== Initializing with a Template
@@ -28,8 +37,8 @@ To initialize a Typst project:
+ Open settings.
+ Search for "Tinymist Formatter" and modify the value.
- - Use `"formatterMode": "typstyle"` for #link("https://github.com/Enter-tainer/typstyle")[typstyle];.
- - Use `"formatterMode": "typstfmt"` for #link("https://github.com/astrale-sharp/typstfmt")[typstfmt];.
+ - Use `"formatterMode": "typstyle"` for #link("https://github.com/Enter-tainer/typstyle")[typstyle].
+ - Use `"formatterMode": "typstfmt"` for #link("https://github.com/astrale-sharp/typstfmt")[typstfmt].
Tips: to enable formatting on save, you should add extra settings for typst language:
@@ -104,7 +113,7 @@ In short, there is a `sys.inputs` item added to the compiler when your document
#let preview-theme = preview-args.at("theme", default: "light")
```
-For details, please check #link("https://myriad-dreamin.github.io/tinymist/feature/preview.html#label-sys.inputs")[Preview’s sys.inputs];.
+For details, please check #link("https://myriad-dreamin.github.io/tinymist/feature/preview.html#label-sys.inputs")[Preview’s sys.inputs].
== Configuring path to search fonts
@@ -171,7 +180,7 @@ You can export your documents to various other formats by lsp as well.
Currently, the following formats are supported:
- Official svg, png, and pdf.
- Unofficial html, md (typlite), and txt
-- Query Results (into json, yaml, or txt), and pdfpc (by `typst query --selector `, for #link("https://touying-typ.github.io/touying/")[Touying];)
+- Query Results (into json, yaml, or txt), and pdfpc (by `typst query --selector `, for #link("https://touying-typ.github.io/touying/")[Touying])
See
#link("https://myriad-dreamin.github.io/tinymist/feature/export.html")[Docs: Exporting Documents]
@@ -201,7 +210,7 @@ Supported arguments:
- `--input`: Add a string key-value pair visible through `sys.inputs`.
- `--font-path` (environment variable: `TYPST_FONT_PATHS`), Font paths, maybe overridden by `tinymist.fontPaths`.
- `--ignore-system-fonts`: Ensures system fonts won’t be searched, maybe overridden by `tinymist.systemFonts`.
-- `--creation-timestamp` (environment variable: `SOURCE_DATE_EPOCH`): The document’s creation date formatted as a #link("https://reproducible-builds.org/specs/source-date-epoch/")[UNIX timestamp];.
+- `--creation-timestamp` (environment variable: `SOURCE_DATE_EPOCH`): The document’s creation date formatted as a #link("https://reproducible-builds.org/specs/source-date-epoch/")[UNIX timestamp].
- `--cert` (environment variable: `TYPST_CERT`): Path to CA certificate file for network access, especially for downloading typst packages.
*Note:* Fix entry to `main.typ` may help multiple-file projects
@@ -212,4 +221,4 @@ by other settings.
= Contributing
-You can submit issues or make PRs to #link("https://github.com/Myriad-Dreamin/tinymist")[GitHub];.
+You can submit issues or make PRs to #link("https://github.com/Myriad-Dreamin/tinymist")[GitHub].
diff --git a/docs/tinymist/mod.typ b/docs/tinymist/mod.typ
index 132ad635..c4e6e5ce 100644
--- a/docs/tinymist/mod.typ
+++ b/docs/tinymist/mod.typ
@@ -93,3 +93,25 @@
"#ks.join("")" [#vs.join(" ")]
]
}
+
+
+/// A link to a html docs based on the target type.
+#let html-link(dest) = if is-md-target {
+ cross-link(dest, [HTML])
+} else {
+ [HTML]
+}
+
+/// A link to a markdown docs based on the target type.
+#let md-link(dest) = if is-md-target {
+ [Markdown]
+} else {
+ github-link(dest, [Markdown])
+}
+
+/// A link switches between HTML and Markdown links based on the target type.
+#let switch-link(html, md) = if is-md-target {
+ html-link(html)
+ [ | ]
+ md-link(md)
+}
diff --git a/editors/vscode/README.md b/editors/vscode/README.md
index 6396fbfa..844eff8a 100644
--- a/editors/vscode/README.md
+++ b/editors/vscode/README.md
@@ -1,16 +1,25 @@
# Tinymist Typst VS Code Extension
+[HTML](https://myriad-dreamin.github.io/tinymist/frontend/vscode.html) | Markdown
+
A VS Code or VS Codium extension for Typst. You can find the extension on:
-- Night versions available at [GitHub Actions](https://github.com/Myriad-Dreamin/tinymist/actions).
-- Stable versions available at [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist).
-- Stable versions available at [Open VSX](https://open-vsx.org/extension/myriad-dreamin/tinymist).
+- Stable and pre-release versions available at [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist) and [Open VSX](https://open-vsx.org/extension/myriad-dreamin/tinymist).
+- The artifacts built per commits at [GitHub Actions](https://github.com/Myriad-Dreamin/tinymist/actions).
## Features
See [Tinymist Features](https://github.com/Myriad-Dreamin/tinymist#features) for a list of features.
+## LLM-Assisted Documentation
+
+The [Software Specification](https://github.com/Myriad-Dreamin/tinymist/tree/main/docs/for-llm/vscode-ui.md) contains user interface provided by this extension, You could find solutions by text search in the docs or ask LLMs with plugging the docs.
+
+## Configuration Reference
+
+[Configuration Reference](https://myriad-dreamin.github.io/tinymist/config/vscode.html).
+
## Usage Tips
### Initializing with a Template