-
Notifications
You must be signed in to change notification settings - Fork 498
Bump mdbook from 0.4.17 -> 0.5.2 and remove custom table-of-contents plugin #19356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f481991
8735831
8d4ff35
4c807ca
823338f
20b3842
e660cf2
84ed978
5aa26fd
57c8162
5f1fa3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ jobs: | |
| - name: Setup mdbook | ||
| uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08 # v2.0.0 | ||
| with: | ||
| mdbook-version: '0.4.17' | ||
| mdbook-version: '0.5.2' | ||
|
|
||
| - name: Setup python | ||
| uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 | ||
|
|
@@ -55,7 +55,7 @@ jobs: | |
| - name: Setup mdbook | ||
| uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08 # v2.0.0 | ||
| with: | ||
| mdbook-version: '0.4.17' | ||
| mdbook-version: '0.5.2' | ||
|
|
||
| - name: Setup htmltest | ||
| run: | | ||
|
|
@@ -64,8 +64,17 @@ jobs: | |
| tar zxf htmltest_0.17.0_linux_amd64.tar.gz | ||
|
|
||
| - name: Test links with htmltest | ||
| # Build the book with `./` as the site URL (to make checks on 404.html possible) | ||
| # Then run htmltest (without checking external links since that involves the network and is slow). | ||
| run: | | ||
| # Build the book with `./` as the site URL (to make checks on 404.html possible) | ||
| MDBOOK_OUTPUT__HTML__SITE_URL="./" mdbook build | ||
| ./htmltest book --skip-external | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of using |
||
|
|
||
| # Delete the contents of the print.html file, as it can raise false | ||
| # positives during link checking. | ||
| # | ||
| # We empty out the file, instead of deleting it, as doing so would | ||
| # just cause htmltest to complain that links to it were invalid. | ||
| # Ideally `htmltest` would have an option to ignore specific files | ||
| # instead. | ||
| echo '<!DOCTYPE HTML>' > book/print.html | ||
|
|
||
| ./htmltest book --conf docs/.htmltest.yml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,6 @@ | |
| title = "Synapse" | ||
| authors = ["The Matrix.org Foundation C.I.C."] | ||
| language = "en" | ||
| multilingual = false | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| # The directory that documentation files are stored in | ||
| src = "docs" | ||
|
|
@@ -31,13 +30,10 @@ site-url = "/synapse/" | |
| # Additional HTML, JS, CSS that's injected into each page of the book. | ||
| # More information available in docs/website_files/README.md | ||
| additional-css = [ | ||
| "docs/website_files/table-of-contents.css", | ||
| "docs/website_files/remove-nav-buttons.css", | ||
| "docs/website_files/indent-section-headers.css", | ||
| "docs/website_files/version-picker.css", | ||
| ] | ||
| additional-js = [ | ||
| "docs/website_files/table-of-contents.js", | ||
| "docs/website_files/version-picker.js", | ||
| "docs/website_files/version.js", | ||
| ] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Bump `mdbook` from 0.4.17 to 0.5.2 and remove our custom table-of-contents plugin in favour of the new default functionality. |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||
| # Configuration for htmltest, which we run in CI to check that links aren't broken in the built documentation. | ||||
| # See all config options: https://github.com/wjdp/htmltest#wrench-configuration | ||||
|
|
||||
| # Don't check external links, as that requires network access and is slow. | ||||
| CheckExternal: false | ||||
|
Comment on lines
+4
to
+5
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For reference, we previously had this config as we used synapse/.github/workflows/docs-pr.yaml Line 71 in cbc5469
|
||||
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this change is spawning from #19341 (comment)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I ran into my own issue here: https://github.com/element-hq/synapse/actions/runs/20788621286/job/59704957332?pr=19356#step:5:26
Though I was hoping to kill two birds with one stone. Sadly it looks like this just makes
print.htmlno longer a valid link: https://github.com/element-hq/synapse/actions/runs/20790804070/job/59712251565?pr=19356#step:5:29We could just replace
print.htmlwith an empty file, but I really wish there was just a config option onhtmltestto ignore a regex of file paths...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have done the workaround and left a sad comment.