The links to the STM templates are broken. (#7479)

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
This commit is contained in:
Nigel Breslaw 2025-01-29 11:46:21 +02:00 committed by GitHub
parent 67940f8ff9
commit 0dda72ff3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 34 additions and 2 deletions

View file

@ -104,12 +104,15 @@ jobs:
if [ "$RELEASE_INPUT" != "true" ]; then
base_url="https://snapshots.slint.dev"
base_path="/master/docs/slint/"
slint_download_version=nightly
else
base_url="https://releases.slint.dev"
base_path="/${{ steps.version.outputs.VERSION }}/docs/slint/"
slint_download_version=v${{ steps.version.outputs.VERSION }}
fi
sed -i "s|BASE_URL = \".*\"|BASE_URL = \"$base_url\"|" docs/astro/src/utils/site-config.ts
sed -i "s|BASE_PATH = \".*\"|BASE_PATH = \"$base_path\"|" docs/astro/src/utils/site-config.ts
sed -i "s|SLINT_DOWNLOAD_VERSION = \".*\"| SLINT_DOWNLOAD_VERSION = \"$slint_download_version\"|" docs/astro/src/utils/site-config.ts
- name: "Slint Language Documentation"
run: cargo xtask slintdocs
- name: Spellcheck

View file

@ -0,0 +1,27 @@
---
// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: MIT
import { SLINT_DOWNLOAD_VERSION } from "../utils/site-config.ts";
const LINK_MAP = {
"slint-cpp-template-stm32h735g-dk.zip": `https://github.com/slint-ui/slint/releases/download/${SLINT_DOWNLOAD_VERSION}/slint-cpp-template-stm32h735g-dk.zip`,
"slint-cpp-template-stm32h747i-disco.zip": `https://github.com/slint-ui/slint/releases/download/${SLINT_DOWNLOAD_VERSION}/slint-cpp-template-stm32h747i-disco.zip`,
} as const;
type LinkID = keyof typeof LINK_MAP;
interface Props {
id: LinkID;
}
const props = Astro.props;
if (!Object.keys(LINK_MAP).includes(props.id)) {
throw new Error(`Invalid link ID: ${props.id}`);
}
const { id } = props;
const link = LINK_MAP[id];
---
<a href={link}><span>{id}</span></a>

View file

@ -6,6 +6,7 @@ description: Embedded Platforms on which Slint has been tested
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
import ReleaseLink from '/src/components/ReleaseLink.astro';
Slint runs on many embedded platforms.
@ -163,10 +164,10 @@ CARGO_PROFILE_RELEASE_OPT_LEVEL=s cargo +esp run -p printerdemo_mcu --target xte
<Tabs syncKey="dev-language">
<TabItem label="C++">
#### STM32H735G-DK
You can start with the template [slint-cpp-template-stm32h735g-dk.zip](https://github.com/slint-ui/slint/releases/download/%7Bdownload_version%7D/slint-cpp-template-stm32h735g-dk.zip)
You can start with the template <ReleaseLink id="slint-cpp-template-stm32h735g-dk.zip" />
#### STM32H747I-DISCO
You can start with the template [slint-cpp-template-stm32h747i-disco.zip](https://github.com/slint-ui/slint/releases/download/%7Bdownload_version%7D/slint-cpp-template-stm32h747i-disco.zip)
You can start with the template <ReleaseLink id="slint-cpp-template-stm32h747i-disco.zip" />
</TabItem>
<TabItem label="Rust">

View file

@ -3,3 +3,4 @@
export const BASE_URL = "https://localhost";
export const BASE_PATH = "/docs/";
export const SLINT_DOWNLOAD_VERSION = "nightly";