Skip to content

Commit 4636729

Browse files
docs: make the HTML valid
[How to properly create an outlined heading with an external link for HTML? - Questions - Typst Forum](https://forum.typst.app/t/how-to-properly-create-an-outlined-heading-with-an-external-link-for-html/7748/4)
1 parent 9882c12 commit 4636729

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/gh-pages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v5
2323
- uses: typst-community/setup-typst@v4
2424
with:
25-
typst-version: v0.14.0
25+
typst-version: v0.14.2
2626
- uses: actions/configure-pages@v5
2727
- run: python scripts/build_catalog.py
2828
env:

scripts/catalog.typ

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@
7373

7474
#context document.description
7575

76+
#show outline: body => {
77+
// Remove external links
78+
show link: it => if type(it.dest) == str { it.body } else { it }
79+
body
80+
}
7681
#outline()
7782

7883
= Introduction <introduction>
@@ -105,7 +110,7 @@ There might be more recent builds in #link("https://github.com/typst-community/d
105110
(name, "")
106111
}
107112

108-
link("https://github.com/typst/" + repo + path)[#[== #raw(name)] #label(name)]
113+
[#[== #link("https://github.com/typst/" + repo + path, raw(name))] #label(name)]
109114

110115
html.p({
111116
// Display the latest release

0 commit comments

Comments
 (0)