Skip to content

Commit

Permalink
Fix docs build for 1.9 release, part 3
Browse files Browse the repository at this point in the history
steps.version.outputs.VERSION is always empty in build_docs.yaml, so the substitution never worked. Hard-code for today.
  • Loading branch information
tronical committed Dec 18, 2024
1 parent 566cb4e commit 90f7292
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ jobs:
working-directory: docs/astro
continue-on-error: true
run: pnpm format
- name: Update URL for sitemap in astro.config.mjs
if: ${{ env.RELEASE_INPUT == 'true' }}
run: |
sed -i 's|"https://snapshots.slint.dev/master/docs/slint/"|"https://releases.slint.dev/${{ steps.version.outputs.VERSION }}/docs/slint/"|' docs/astro/astro.config.mjs
sed -i 's|"/master/docs/slint"|"/${{ steps.version.outputs.VERSION }}/docs/slint"|' docs/astro/astro.config.mjs
sed -i 's|href="/master/docs/slint|href="/${{ steps.version.outputs.VERSION }}/docs/slint|' docs/astro/src/content/docs/index.mdx
# - name: Update URL for sitemap in astro.config.mjs
# if: ${{ env.RELEASE_INPUT == 'true' }}
# run: |
# sed -i 's|"https://snapshots.slint.dev/master/docs/slint/"|"https://releases.slint.dev/${{ steps.version.outputs.VERSION }}/docs/slint/"|' docs/astro/astro.config.mjs
# sed -i 's|"/master/docs/slint"|"/${{ steps.version.outputs.VERSION }}/docs/slint"|' docs/astro/astro.config.mjs
# sed -i 's|href="/master/docs/slint|href="/${{ steps.version.outputs.VERSION }}/docs/slint|' docs/astro/src/content/docs/index.mdx
- name: "Slint Language Documentation"
run: cargo xtask slintdocs
- name: Spellcheck
Expand Down
4 changes: 2 additions & 2 deletions docs/astro/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import starlightSidebarTopics from "starlight-sidebar-topics";

// https://astro.build/config
export default defineConfig({
site: "https://snapshots.slint.dev/master/docs/slint/",
base: "/master/docs/slint",
site: "https://releases.slint.dev/1.9.0/docs/slint/",
base: "/1.9.0/docs/slint",
markdown: {
rehypePlugins: [
[
Expand Down
8 changes: 4 additions & 4 deletions docs/astro/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,30 @@ The documentation is split into several sections:
description="This will get you up and running with the tooling for Slint development including the IDE integration via the Slint Language Server (LSP) and Slint Viewer.
<br/><br/>
It then offers a guide explaining all the key concepts of Slint and how to understand and use the Slint language."
href="/master/docs/slint"
href="/1.9.0/docs/slint"
>
</LinkCard>

<LinkCard
title="Reference"
description="This contains the API reference for all aspects of the Slint language. All the elements, properties, functions, callbacks and namespaces. It also contains the
API reference for the `std-widgets` library. A set of cross platform components that can be used to build desktop applications."
href="/master/docs/slint/reference/primitive-types"
href="/1.9.0/docs/slint/reference/primitive-types"
>
</LinkCard>

<LinkCard
title="Tutorial"
description="For those that like to learn by example or want to see how to structure a simple application, this section contains a step-by-step tutorial that walks you
through the creation of a simple memory game example."
href="/master/docs/slint/tutorial/quickstart/"
href="/1.9.0/docs/slint/tutorial/quickstart/"
>
</LinkCard>

<LinkCard
title="Language Integrations"
description="This details the API for the Rust, C++, and JS-Runtime versions of Slint."
href="/master/docs/slint/language-integrations/"
href="/1.9.0/docs/slint/language-integrations/"
>
</LinkCard>
</CardGrid>
Expand Down

0 comments on commit 90f7292

Please sign in to comment.