Launcher: release notes are loaded from their new URL in the documentation (https://doc.stride3d.net/en/release-notes/<version>.md)

This commit is contained in:
Virgile Bello
2026-10-04 13:43:08 +09:00
parent a7fa31ced6
commit be99673ed8
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ The Stride documentation is organized across different locations. Here's how it'
2. [Stride Docs](https://doc.stride3d.net/) - The official documentation, including:
- [Manual](https://doc.stride3d.net/latest/en/manual/index.html)
- [Tutorials](https://doc.stride3d.net/latest/en/tutorials/index.html)
- [Release Notes](https://doc.stride3d.net/latest/en/ReleaseNotes/ReleaseNotes.html)
- [Release Notes](https://doc.stride3d.net/en/release-notes/index.html)
- [Ways to contribute](https://doc.stride3d.net/latest/en/contributors/index.html)
- [API Reference](https://doc.stride3d.net/latest/en/api/index.html)
- [Community Resources](https://doc.stride3d.net/latest/en/community-resources/index.html) - Demos, articles, shaders, physics examples, and more.
@@ -25,6 +25,7 @@ public sealed partial class ReleaseNotesViewModel : DispatcherViewModel
private const string RootUrl = "https://doc.stride3d.net";
private const string ReleaseNotesFileName = "ReleaseNotes.md";
private readonly string baseUrl;
private readonly string releaseNotesFileName;
internal ReleaseNotesViewModel(MainViewModel launcher, string version)
: base(launcher.SafeArgument(nameof(launcher)).ServiceProvider)
@@ -34,7 +35,9 @@ public sealed partial class ReleaseNotesViewModel : DispatcherViewModel
this.launcher = launcher;
Version = version;
baseUrl = $"{RootUrl}/{Version}/ReleaseNotes/";
// The release notes of every version (betas included) are in one place
baseUrl = $"{RootUrl}/en/release-notes/";
releaseNotesFileName = $"{Version}.md";
#if DEBUG
if (Environment.CommandLine.ToLowerInvariant().Contains("/previewreleasenotes"))
{
@@ -43,6 +46,7 @@ public sealed partial class ReleaseNotesViewModel : DispatcherViewModel
if (File.Exists($"{mdPath}{ReleaseNotesFileName}"))
{
baseUrl = $"file:///{mdPath.Replace("\\", "/")}";
releaseNotesFileName = ReleaseNotesFileName;
}
}
#endif
@@ -72,7 +76,7 @@ public sealed partial class ReleaseNotesViewModel : DispatcherViewModel
try
{
using var response = await httpClient.GetAsync($"{BaseUrl}{ReleaseNotesFileName}");
using var response = await httpClient.GetAsync($"{BaseUrl}{releaseNotesFileName}");
response.EnsureSuccessStatusCode();
releaseNotesMarkdown = await response.Content.ReadAsStringAsync();
}