Skip to content

Commit 3b7aa83

Browse files
authored
docs: Add migration link in the changelog and add index page for guides (#3471)
1 parent f349778 commit 3b7aa83

26 files changed

Lines changed: 335 additions & 3 deletions

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
[Link to all migration guides](https://yew.rs/docs/category/migration-guides)
4+
35
## ✨ yew **0.23.0** *(2026-03-10)*
46

57
bumping from 0.22 should require no code changes for most users.
@@ -148,7 +150,6 @@ Yew pinned to 0.23 now.
148150

149151
- **MSRV raised to 1.84.0.** [[@Siyuan Yan](https://github.com/Madoshakalaka), [#3900](https://github.com/yewstack/yew/pull/3900)]
150152

151-
152153
## ✨ yew **0.21.0** *(2023-09-23)*
153154

154155
Users can follow the [migration guide](https://yew.rs/docs/migration-guides/yew/from-0_20_0-to-0_21_0) to migrate from 0.20.0 to 0.21.0.

tools/changelog/src/write_changelog_file.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ pub fn write_changelog(changelog_path: &str, version_changelog: &[u8]) -> Result
2020

2121
new_changelog.write_all(version_changelog)?;
2222

23-
for old_line in old_changelog_reader.lines().skip(2) {
23+
// The `.skip` skips the title and link to the migration guide
24+
for old_line in old_changelog_reader.lines().skip(4) {
2425
writeln!(new_changelog, "{}", old_line?)?;
2526
}
2627

tools/changelog/src/write_version_changelog.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ pub fn write_changelog_file(
1717
writeln!(version_only_changelog, "# Changelog")?;
1818
writeln!(version_only_changelog)?;
1919

20+
writeln!(
21+
version_only_changelog,
22+
"[Link to all migration guides](https://yew.rs/docs/category/migration-guides)"
23+
)?;
24+
writeln!(version_only_changelog)?;
25+
2026
writeln!(
2127
version_only_changelog,
2228
"## ✨ {package} **{next_version}** *({release_date})*",

tools/changelog/tests/generate_yew_changelog_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn generate_yew_changelog_file() -> Result<()> {
6262
let lines = expected_reader_lines.zip(after_reader_lines);
6363

6464
for (i, (expected_line, after_line)) in lines.enumerate() {
65-
if i == 2 || i == 13 {
65+
if i == 4 || i == 15 {
6666
// these lines have dynamic things that may break the tests
6767
let expected_line_updated = expected_line?.replace(
6868
"date_goes_here",

tools/changelog/tests/test_base.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog for its generation tests
22

3+
[Link to all migration guides](https://yew.rs/docs/category/migration-guides)
4+
35
## ✨ yew **0.19.0** *(2021-11-26)*
46

57
#### Changelog

tools/changelog/tests/test_expected.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
[Link to all migration guides](https://yew.rs/docs/category/migration-guides)
4+
35
## ✨ yew **0.0.0** *(date_goes_here)*
46

57
### ⚡️ Features

website/i18n/ja/docusaurus-plugin-content-docs/current.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,21 @@
8282
"sidebar.docs.category.Struct Components": {
8383
"message": "Struct Components",
8484
"description": "The label for category Struct Components in sidebar docs"
85+
},
86+
"sidebar.docs.category.Migration guides.link.generated-index.title": {
87+
"message": "移行ガイド",
88+
"description": "The generated-index page title for category Migration guides in sidebar docs"
89+
},
90+
"sidebar.docs.category.yew.link.generated-index.title": {
91+
"message": "yew",
92+
"description": "The generated-index page title for category yew in sidebar docs"
93+
},
94+
"sidebar.docs.category.yew-agent.link.generated-index.title": {
95+
"message": "yew-agent",
96+
"description": "The generated-index page title for category yew-agent in sidebar docs"
97+
},
98+
"sidebar.docs.category.yew-router.link.generated-index.title": {
99+
"message": "yew-router",
100+
"description": "The generated-index page title for category yew-router in sidebar docs"
85101
}
86102
}

website/i18n/ja/docusaurus-plugin-content-docs/version-0.20.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,21 @@
8282
"sidebar.docs.category.yew-router": {
8383
"message": "yew-router",
8484
"description": "The label for category yew-router in sidebar docs"
85+
},
86+
"sidebar.docs.category.Migration guides.link.generated-index.title": {
87+
"message": "移行ガイド",
88+
"description": "The generated-index page title for category Migration guides in sidebar docs"
89+
},
90+
"sidebar.docs.category.yew.link.generated-index.title": {
91+
"message": "yew",
92+
"description": "The generated-index page title for category yew in sidebar docs"
93+
},
94+
"sidebar.docs.category.yew-agent.link.generated-index.title": {
95+
"message": "yew-agent",
96+
"description": "The generated-index page title for category yew-agent in sidebar docs"
97+
},
98+
"sidebar.docs.category.yew-router.link.generated-index.title": {
99+
"message": "yew-router",
100+
"description": "The generated-index page title for category yew-router in sidebar docs"
85101
}
86102
}

website/i18n/ja/docusaurus-plugin-content-docs/version-0.21.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,21 @@
8282
"sidebar.docs.category.yew-router": {
8383
"message": "yew-router",
8484
"description": "The label for category yew-router in sidebar docs"
85+
},
86+
"sidebar.docs.category.Migration guides.link.generated-index.title": {
87+
"message": "移行ガイド",
88+
"description": "The generated-index page title for category Migration guides in sidebar docs"
89+
},
90+
"sidebar.docs.category.yew.link.generated-index.title": {
91+
"message": "yew",
92+
"description": "The generated-index page title for category yew in sidebar docs"
93+
},
94+
"sidebar.docs.category.yew-agent.link.generated-index.title": {
95+
"message": "yew-agent",
96+
"description": "The generated-index page title for category yew-agent in sidebar docs"
97+
},
98+
"sidebar.docs.category.yew-router.link.generated-index.title": {
99+
"message": "yew-router",
100+
"description": "The generated-index page title for category yew-router in sidebar docs"
85101
}
86102
}

website/i18n/ja/docusaurus-plugin-content-docs/version-0.22.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,21 @@
8282
"sidebar.docs.category.Struct Components": {
8383
"message": "Struct Components",
8484
"description": "The label for category Struct Components in sidebar docs"
85+
},
86+
"sidebar.docs.category.Migration guides.link.generated-index.title": {
87+
"message": "移行ガイド",
88+
"description": "The generated-index page title for category Migration guides in sidebar docs"
89+
},
90+
"sidebar.docs.category.yew.link.generated-index.title": {
91+
"message": "yew",
92+
"description": "The generated-index page title for category yew in sidebar docs"
93+
},
94+
"sidebar.docs.category.yew-agent.link.generated-index.title": {
95+
"message": "yew-agent",
96+
"description": "The generated-index page title for category yew-agent in sidebar docs"
97+
},
98+
"sidebar.docs.category.yew-router.link.generated-index.title": {
99+
"message": "yew-router",
100+
"description": "The generated-index page title for category yew-router in sidebar docs"
85101
}
86102
}

0 commit comments

Comments
 (0)