slint/docs/astro
dependabot[bot] 04d2d2e8b9
build(deps-dev): bump @playwright/test in the playwright group (#8698)
Bumps the playwright group with 1 update: [@playwright/test](https://github.com/microsoft/playwright).


Updates `@playwright/test` from 1.52.0 to 1.53.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.52.0...v1.53.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.53.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: playwright
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-17 11:01:35 +03:00
..
public 1.9 Organise docs folder. (#7005) 2024-12-05 15:40:04 +02:00
src Bump version number to 1.12.1 2025-06-16 13:32:39 +00: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 figma-inspector: initial docs for the variables export files (#8326) 2025-05-20 15:24:02 -04:00
biome.json 1.9 Organise docs folder. (#7005) 2024-12-05 15:40:04 +02: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 @playwright/test in the playwright group (#8698) 2025-06-17 11:01:35 +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.