slint/docs/astro
dependabot[bot] 9a0390ea07
Some checks are pending
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / files-changed (push) Waiting to run
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, stable) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, 1.85) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, 1.85) (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
CI / mcu-embassy (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (macos-13) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.85) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
build(deps-dev): bump cspell from 9.1.2 to 9.1.3 (#8860)
Bumps [cspell](https://github.com/streetsidesoftware/cspell/tree/HEAD/packages/cspell) from 9.1.2 to 9.1.3.
- [Release notes](https://github.com/streetsidesoftware/cspell/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell/commits/v9.1.3/packages/cspell)

---
updated-dependencies:
- dependency-name: cspell
  dependency-version: 9.1.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-07 20:09:14 +03:00
..
public docs.slint.dev google search results missing favicon (#8841) 2025-07-03 15:33:44 +03:00
src Flickable: reject Wheel events in the orthogonal direction 2025-06-30 13:57:52 +02:00
tests build(deps): bump the starlight_astro group with 2 updates (#8219) 2025-04-24 12:36:43 +03:00
.gitignore 1.9 Organise docs folder. (#7005) 2024-12-05 15:40:04 +02:00
astro.config.mjs docs.slint.dev google search results missing favicon (#8841) 2025-07-03 15:33:44 +03:00
biome.json Update to Biome 2.0 (#8730) 2025-06-19 21:38:30 +03:00
ec.config.mjs biome: Enable lint to check for missing await statements (#8305) 2025-04-29 14:57:52 +02:00
package.json build(deps-dev): bump cspell from 9.1.2 to 9.1.3 (#8860) 2025-07-07 20:09:14 +03:00
playwright.config.ts More robust BASE_URL support for docs (#7158) 2024-12-19 10:58:40 +02:00
README.md Fix typos (#8421) 2025-05-12 13:03:59 +02:00
tsconfig.json 1.9 Organise docs folder. (#7005) 2024-12-05 15:40:04 +02:00
writing-style-guide.md Add User-Centric Messaging in writing style guide 2025-06-12 10:08:27 +02:00

Slint Documentation

Prerequisites

  • Rust
  • Node.js
  • pnpm

🚀 Project Structure

The documentation site is built with Astro Starlight and reuses its project structure.

docs/
├── public/
├── src/
│   ├── assets/
│   ├── content/
│   │   ├── docs/
│   │   └── config.ts
│   └── env.d.ts
├── tests/
├── astro.config.mjs
├── package.json
├── tsconfig.json
└──

Starlight looks for .md or .mdx files in the src/content/docs/ directory. Each file is exposed as a route based on its file name.

Images can be added to src/assets/ and embedded in Markdown with a relative link. They will be optimized for download size and also their width and height will be extracted so the framework can render them without ugly content shifts.

Static assets, like favicons, can be placed in the public/ directory. Note that images in this folder will not be processed and optimized by Starlight.

Building the docs

The docs use a lot of autogenerated content. First create all the screenshots which will be placed at src/assets/generated/.

cargo run -p slint-docsnapper -- docs/astro/src/content --overwrite

Then generate the slint auto generated content.

cargo xtask slintdocs

This xtask also installs the npm dependencies and builds the docs. The equivalent of:

pnpm i
pnpm run build

This will build the site and place it in dist/.

Live edit the docs

To run the live hot reloading dev server run in the astro directory:

cd docs/astro/
pnpm start

This will start the dev server at localhost:4321/docs/.

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
pnpm i Installs dependencies
pnpm start Starts local dev server at localhost:4321
pnpm build Build your production site to ./dist/
pnpm preview Preview your build locally, before deploying
pnpm run astro ... Run CLI commands like astro add, astro check
npm run astro -- --help Get help using the Astro CLI

👀 Want to learn more about Astro and Starlight?

Check out Starlights docs, read the Astro documentation, or jump into the Astro Discord server.