Skip to content

Commit 5e99410

Browse files
committed
Translate urls in changelog
This makes the link checker work and the build to pass.
1 parent f357065 commit 5e99410

File tree

8 files changed

+638
-175
lines changed

8 files changed

+638
-175
lines changed

.docusaurus/client-manifest.json

Lines changed: 539 additions & 0 deletions
Large diffs are not rendered by default.

.docusaurus/registry.js

Lines changed: 30 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.docusaurus/routes.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,6 @@ import React from 'react';
22
import ComponentCreator from '@docusaurus/ComponentCreator';
33

44
export default [
5-
{
6-
path: '/__docusaurus/debug',
7-
component: ComponentCreator('/__docusaurus/debug', '5ff'),
8-
exact: true
9-
},
10-
{
11-
path: '/__docusaurus/debug/config',
12-
component: ComponentCreator('/__docusaurus/debug/config', '5ba'),
13-
exact: true
14-
},
15-
{
16-
path: '/__docusaurus/debug/content',
17-
component: ComponentCreator('/__docusaurus/debug/content', 'a2b'),
18-
exact: true
19-
},
20-
{
21-
path: '/__docusaurus/debug/globalData',
22-
component: ComponentCreator('/__docusaurus/debug/globalData', 'c3c'),
23-
exact: true
24-
},
25-
{
26-
path: '/__docusaurus/debug/metadata',
27-
component: ComponentCreator('/__docusaurus/debug/metadata', '156'),
28-
exact: true
29-
},
30-
{
31-
path: '/__docusaurus/debug/registry',
32-
component: ComponentCreator('/__docusaurus/debug/registry', '88c'),
33-
exact: true
34-
},
35-
{
36-
path: '/__docusaurus/debug/routes',
37-
component: ComponentCreator('/__docusaurus/debug/routes', '000'),
38-
exact: true
39-
},
405
{
416
path: '/blog',
427
component: ComponentCreator('/blog', '9f3'),

.docusaurus/routesChunkNames.json

Lines changed: 46 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,153 +1,110 @@
11
{
2-
"/__docusaurus/debug-5ff": {
3-
"__comp": "__comp---theme-debug-config-23-a-2ff",
4-
"__context": {
5-
"plugin": "plugin---docusaurus-debugb-38-ad3"
6-
}
7-
},
8-
"/__docusaurus/debug/config-5ba": {
9-
"__comp": "__comp---theme-debug-config-23-a-2ff",
10-
"__context": {
11-
"plugin": "plugin---docusaurus-debugb-38-ad3"
12-
}
13-
},
14-
"/__docusaurus/debug/content-a2b": {
15-
"__comp": "__comp---theme-debug-contentba-8-ce7",
16-
"__context": {
17-
"plugin": "plugin---docusaurus-debugb-38-ad3"
18-
},
19-
"__props": "__props---docusaurus-debug-content-3-c-0-be2"
20-
},
21-
"/__docusaurus/debug/globalData-c3c": {
22-
"__comp": "__comp---theme-debug-global-dataede-0fa",
23-
"__context": {
24-
"plugin": "plugin---docusaurus-debugb-38-ad3"
25-
}
26-
},
27-
"/__docusaurus/debug/metadata-156": {
28-
"__comp": "__comp---theme-debug-site-metadata-68-e-3d4",
29-
"__context": {
30-
"plugin": "plugin---docusaurus-debugb-38-ad3"
31-
}
32-
},
33-
"/__docusaurus/debug/registry-88c": {
34-
"__comp": "__comp---theme-debug-registry-679-501",
35-
"__context": {
36-
"plugin": "plugin---docusaurus-debugb-38-ad3"
37-
}
38-
},
39-
"/__docusaurus/debug/routes-000": {
40-
"__comp": "__comp---theme-debug-routes-946-699",
41-
"__context": {
42-
"plugin": "plugin---docusaurus-debugb-38-ad3"
43-
}
44-
},
452
"/blog-9f3": {
46-
"__comp": "__comp---theme-blog-list-pagea-6-a-7ba",
3+
"__comp": "a6aa9e1f",
474
"__context": {
48-
"plugin": "plugin---blog-369-22e"
5+
"plugin": "36994c47"
496
},
50-
"sidebar": "sidebar---blog-814-8ac",
7+
"sidebar": "814f3328",
518
"items": [
529
{
53-
"content": "content---blog-858-162"
10+
"content": "858b0170"
5411
}
5512
],
56-
"__props": "__props---blogc-15-573"
13+
"__props": "c15d9823"
5714
},
5815
"/blog/archive-182": {
59-
"__comp": "__comp---theme-blog-archive-page-9-e-4-1d8",
16+
"__comp": "9e4087bc",
6017
"__context": {
61-
"plugin": "plugin---blog-369-22e"
18+
"plugin": "36994c47"
6219
},
63-
"__props": "__props---blog-archivef-81-229"
20+
"__props": "f81c1134"
6421
},
6522
"/blog/authors-0b7": {
66-
"__comp": "__comp---theme-blog-pages-blog-authors-list-page-621-70c",
23+
"__comp": "621db11d",
6724
"__context": {
6825
"data": {
69-
"blogMetadata": "blogMetadata---blog-authorsace-e7d"
26+
"blogMetadata": "acecf23e"
7027
},
71-
"plugin": "plugin---blog-369-22e"
28+
"plugin": "36994c47"
7229
},
73-
"sidebar": "sidebar---blog-814-8ac",
74-
"__props": "__props---blog-authorsef-8-44f"
30+
"sidebar": "814f3328",
31+
"__props": "ef8b811a"
7532
},
7633
"/blog/tags-287": {
77-
"__comp": "__comp---theme-blog-tags-list-page-01-a-d0b",
34+
"__comp": "01a85c17",
7835
"__context": {
79-
"plugin": "plugin---blog-369-22e"
36+
"plugin": "36994c47"
8037
},
81-
"sidebar": "sidebar---blog-814-8ac",
82-
"__props": "__props---blog-tags-3-a-2-fa2"
38+
"sidebar": "814f3328",
39+
"__props": "3a2db09e"
8340
},
8441
"/blog/tags/announcements-448": {
85-
"__comp": "__comp---theme-blog-tags-posts-page-687-b6c",
42+
"__comp": "6875c492",
8643
"__context": {
87-
"plugin": "plugin---blog-369-22e"
44+
"plugin": "36994c47"
8845
},
89-
"sidebar": "sidebar---blog-814-8ac",
46+
"sidebar": "814f3328",
9047
"items": [
9148
{
92-
"content": "content---blog-858-162"
49+
"content": "858b0170"
9350
}
9451
],
95-
"__props": "__props---blog-tags-announcements-04-e-f34"
52+
"__props": "04e595f1"
9653
},
9754
"/blog/transition-announcement-271": {
98-
"__comp": "__comp---theme-blog-post-pageccc-cab",
55+
"__comp": "ccc49370",
9956
"__context": {
10057
"data": {
101-
"blogMetadata": "blogMetadata---blog-authorsace-e7d"
58+
"blogMetadata": "acecf23e"
10259
},
103-
"plugin": "plugin---blog-369-22e"
60+
"plugin": "36994c47"
10461
},
105-
"sidebar": "sidebar---blog-814-8ac",
106-
"content": "content---blog-transition-announcement-733-ce3"
62+
"sidebar": "814f3328",
63+
"content": "7333c6e9"
10764
},
10865
"/changelog-fda": {
109-
"__comp": "__comp---theme-mdx-page-1-f-3-b90",
66+
"__comp": "1f391b9e",
11067
"__context": {
111-
"plugin": "plugin---changeloga-74-482"
68+
"plugin": "a7456010"
11269
},
113-
"content": "content---changelog-758-113"
70+
"content": "75878fc8"
11471
},
11572
"/ecosystem-18c": {
116-
"__comp": "__comp---theme-mdx-page-1-f-3-b90",
73+
"__comp": "1f391b9e",
11774
"__context": {
118-
"plugin": "plugin---changeloga-74-482"
75+
"plugin": "a7456010"
11976
},
120-
"content": "content---ecosystem-625-43a"
77+
"content": "625beb64"
12178
},
12279
"/markdown-page-3d7": {
123-
"__comp": "__comp---theme-mdx-page-1-f-3-b90",
80+
"__comp": "1f391b9e",
12481
"__context": {
125-
"plugin": "plugin---changeloga-74-482"
82+
"plugin": "a7456010"
12683
},
127-
"content": "content---markdown-page-393-028"
84+
"content": "393be207"
12885
},
12986
"/docs-c4c": {
130-
"__comp": "__comp---theme-docs-root-5-e-9-0b6",
87+
"__comp": "5e95c892",
13188
"__context": {
132-
"plugin": "plugin---docsaba-d7c"
89+
"plugin": "aba21aa0"
13390
}
13491
},
13592
"/docs-7f1": {
136-
"__comp": "__comp---theme-doc-version-roota-7-b-5de",
137-
"__props": "__props---docs-005-788"
93+
"__comp": "a7bd4aaa",
94+
"__props": "0058b4c6"
13895
},
13996
"/docs-d43": {
140-
"__comp": "__comp---theme-doc-roota-94-67a"
97+
"__comp": "a94703ab"
14198
},
14299
"/docs/empty-d08": {
143-
"__comp": "__comp---theme-doc-item-178-a40",
144-
"content": "content---docs-emptyb-1-e-440"
100+
"__comp": "17896441",
101+
"content": "b1eb8ea2"
145102
},
146103
"/-e5f": {
147-
"__comp": "__comp---site-src-pages-index-tsx-1-df-d3e",
104+
"__comp": "1df93b7f",
148105
"__context": {
149-
"plugin": "plugin---changeloga-74-482"
106+
"plugin": "a7456010"
150107
},
151-
"config": "config---5-e-9-4f3"
108+
"config": "5e9f5e1a"
152109
}
153110
}

.docusaurus/site-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"name": "@docusaurus/plugin-content-pages",
1818
"version": "3.5.2"
1919
},
20-
"docusaurus-plugin-debug": {
20+
"docusaurus-plugin-sitemap": {
2121
"type": "package",
22-
"name": "@docusaurus/plugin-debug",
22+
"name": "@docusaurus/plugin-sitemap",
2323
"version": "3.5.2"
2424
},
2525
"docusaurus-theme-classic": {

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
public/
22
node_modules/
33
.DS_Store
4+
build/
45

src/pages/changelog.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6161
- [PR#1081](https://github.com/EmbarkStudios/rust-gpu/pull/1081) added the ability
6262
to access SPIR-V specialization constants (`OpSpecConstant`) via entry-point
6363
inputs declared as `#[spirv(spec_constant(id = ..., default = ...))] x: u32`
64-
(see also [the `#[spirv(spec_constant)]` attribute documentation](docs/src/attributes.md#specialization-constants))
64+
(see also [the `#[spirv(spec_constant)]` attribute documentation](https://rust-gpu.github.io/rust-gpu/book/attributes.html#specialization-constants))
6565
- [PR#1036](https://github.com/EmbarkStudios/rust-gpu/pull/1036) added a `--force-spirv-passthru` flag to `example-runner-wgpu`, to bypass Naga (`wgpu`'s shader translator),
6666
used it to test `debugPrintf` for `wgpu`, and updated `ShaderPanicStrategy::DebugPrintfThenExit` docs to reflect what "enabling `debugPrintf`" looks like for `wgpu`
6767
<sub><sup>(e.g. `VK_LOADER_LAYERS_ENABLE=VK_LAYER_KHRONOS_validation VK_LAYER_ENABLES=VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT DEBUG_PRINTF_TO_STDOUT=1`)</sup></sub>
@@ -116,7 +116,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
116116

117117
### Changed 🛠
118118
- [PR#1040](https://github.com/EmbarkStudios/rust-gpu/pull/1040) refactored "zombie" (delayed error) reporting to use SPIR-V `OpSource`, be more helpful, and added `--no-early-report-zombies` to delay it even further
119-
(see also [the `--no-early-report-zombies` codegen args docs](docs/src/codegen-args.md#--no-early-report-zombies))
119+
(see also [the `--no-early-report-zombies` codegen args docs](https://rust-gpu.github.io/rust-gpu/book/codegen-args.html#--no-early-report-zombies))
120120
- [PR#1035](https://github.com/EmbarkStudios/rust-gpu/pull/1035) reduced the number of CGUs ("codegen units") used by `spirv-builder` to just `1`
121121
- [PR#1011](https://github.com/EmbarkStudios/rust-gpu/pull/1011) made `NonWritable` all read-only storage buffers (i.e. those typed `&T`, where `T` doesn't have interior mutability)
122122
- [PR#1029](https://github.com/EmbarkStudios/rust-gpu/pull/1029) fixed `SampledImage::sample` `fn`s being unnecessarily marked as `unsafe`
@@ -150,7 +150,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
150150
### Added ⭐
151151
- [PR#988](https://github.com/EmbarkStudios/rust-gpu/pull/988) added a couple of (highly experimental)
152152
`SPIR-🇹` optimization passes, and `--spirt-passes=...` codegen args as a way to enable them
153-
(see also [the `--spirt-passes` codegen args docs](docs/src/codegen-args.md#--spirt-passes-PASSES))
153+
(see also [the `--spirt-passes` codegen args docs](https://rust-gpu.github.io/rust-gpu/book/codegen-args.html#--spirt-passes-PASSES))
154154

155155
### Changed 🛠️
156156
- [PR#982](https://github.com/EmbarkStudios/rust-gpu/pull/982) updated toolchain to `nightly-2022-12-18`
@@ -162,15 +162,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
162162
- [PR#959](https://github.com/EmbarkStudios/rust-gpu/pull/959) added two `spirv-builder` environment variables to customize *only* the `rustc` invocations for shader crates and their dependencies:
163163
- `RUSTGPU_RUSTFLAGS="..."` for shader `RUSTFLAGS="..."`
164164
- `RUSTGPU_CODEGEN_ARGS="..."` for shader "codegen args" (i.e. `RUSTFLAGS=-Cllvm-args="..."`)
165-
(check out [the "codegen args" docs](docs/src/codegen-args.md), or run with `RUSTGPU_CODEGEN_ARGS=--help` to see the full list of options)
165+
(check out [the "codegen args" docs](https://rust-gpu.github.io/rust-gpu/book/codegen-args.html), or run with `RUSTGPU_CODEGEN_ARGS=--help` to see the full list of options)
166166
- [PR#940](https://github.com/EmbarkStudios/rust-gpu/pull/940) integrated the experimental [`SPIR-🇹` shader IR framework](https://github.com/rust-gpu/spirt) into the linker
167-
(opt-in via `RUSTGPU_CODEGEN_ARGS=--spirt`, see also [the `--spirt` docs](docs/src/codegen-args.md#--spirt), for more details)
167+
(opt-in via `RUSTGPU_CODEGEN_ARGS=--spirt`, see also [the `--spirt` docs](https://rust-gpu.github.io/rust-gpu/book/codegen-args.html#--spirt), for more details)
168168

169169
### Changed 🛠️
170170
- [PR#958](https://github.com/EmbarkStudios/rust-gpu/pull/958) updated toolchain to `nightly-2022-10-29`
171171
- [PR#941](https://github.com/EmbarkStudios/rust-gpu/pull/941) applied workspace inheritance to `Cargo.toml` files
172-
- [PR#959](https://github.com/EmbarkStudios/rust-gpu/pull/959) moved `rustc_codegen_spirv` debugging functionality from environment variables to "codegen args" options/flags (see [the updated docs](docs/src/codegen-args.md) for more details)
173-
- [PR#967](https://github.com/EmbarkStudios/rust-gpu/pull/967) made `--dump-*` ["codegen args"](docs/src/codegen-args.md) include identifying information (e.g. crate names) in the names of files they emit
172+
- [PR#959](https://github.com/EmbarkStudios/rust-gpu/pull/959) moved `rustc_codegen_spirv` debugging functionality from environment variables to "codegen args" options/flags (see [the updated docs](https://rust-gpu.github.io/rust-gpu/book/codegen-args.html) for more details)
173+
- [PR#967](https://github.com/EmbarkStudios/rust-gpu/pull/967) made `--dump-*` ["codegen args"](https://rust-gpu.github.io/rust-gpu/book/codegen-args.html) include identifying information (e.g. crate names) in the names of files they emit
174174

175175
### Removed 🔥
176176
- [PR#946](https://github.com/EmbarkStudios/rust-gpu/pull/946) removed the `fn`/closure `#[spirv(unroll_loops)]` attribute, as it has no users, is becoming non-trivial to support, and requires redesign for better ergonomics (e.g. `#[spirv(unroll)]` applied to individual loops, not the whole `fn`/closure)
@@ -187,7 +187,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
187187
- [PR#935](https://github.com/EmbarkStudios/rust-gpu/pull/935) added check for environment variable `RUSTGPU_SKIP_TOOLCHAIN_CHECK` to prevent toolchain check
188188

189189
### Changed 🛠️
190-
- 🚨BREAKING🚨 [#926](https://github.com/EmbarkStudios/rust-gpu/pull/926) migrated from `register_attr` to `register_tool`. [More information](docs/src/migration-to-register-tool.md).
190+
- 🚨BREAKING🚨 [#926](https://github.com/EmbarkStudios/rust-gpu/pull/926) migrated from `register_attr` to `register_tool`. [More information](https://rust-gpu.github.io/rust-gpu/book/migration-to-register-tool.html).
191191
- [PR#935](https://github.com/EmbarkStudios/rust-gpu/pull/935) updated toolchain to `nightly-2022-10-01`
192192
- [PR#934](https://github.com/EmbarkStudios/rust-gpu/pull/934) updated `glam` to `0.22`
193193
- [PR#928](https://github.com/EmbarkStudios/rust-gpu/pull/928) updated `spirv-tools` to `0.9` (SPIRV-Tools `2022.4`)

src/plugins/fetchChangelog/index.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import path from 'path';
33
import { LoadContext, Plugin } from '@docusaurus/types';
44

55
const CHANGELOG_URL = 'https://raw.githubusercontent.com/Rust-GPU/rust-gpu/main/CHANGELOG.md';
6-
76
const OUTPUT_PATH = path.resolve(__dirname, '../../pages/changelog.md');
87

98
const FRONTMATTER = `---
@@ -12,6 +11,9 @@ title: Changelog
1211
sidebar_label: Changelog
1312
---\n\n`;
1413

14+
// Base URL for rewritten links
15+
const DOCS_BASE_URL = 'https://rust-gpu.github.io/rust-gpu/book/';
16+
1517
// Fetch the changelog content from GitHub using fetch
1618
async function fetchChangelog(): Promise<string> {
1719
const response = await fetch(CHANGELOG_URL);
@@ -21,9 +23,17 @@ async function fetchChangelog(): Promise<string> {
2123
return await response.text();
2224
}
2325

26+
// Rewrite links from docs/src/*.md to the new base URL
27+
function rewriteLinks(content: string): string {
28+
return content.replace(
29+
/\bdocs\/src\/([a-zA-Z0-9_-]+)\.md\b/g, // Match URLs like docs/src/<filename>.md
30+
(_, filename) => `${DOCS_BASE_URL}${filename}.html`
31+
);
32+
}
33+
2434
// Write the changelog to the docs folder with frontmatter
2535
async function writeChangelog(content: string) {
26-
const changelogWithFrontmatter = `${FRONTMATTER}${content}`;
36+
const changelogWithFrontmatter = `${FRONTMATTER}${rewriteLinks(content)}`;
2737

2838
// Ensure the directory exists
2939
await fs.mkdir(path.dirname(OUTPUT_PATH), { recursive: true });
@@ -45,4 +55,3 @@ export default function fetchChangelogPlugin(context: LoadContext): Plugin<void>
4555
},
4656
};
4757
}
48-

0 commit comments

Comments
 (0)