-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Aurindam Jana <[email protected]> Co-authored-by: Tobias Hunger <[email protected]> Co-authored-by: Simon Hausmann <[email protected]>
- Loading branch information
1 parent
5b3ea5c
commit 08d90a5
Showing
209 changed files
with
12,825 additions
and
3,250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,10 @@ Files: docs/_templates/*.md | |
Copyright: Copyright © SixtyFPS GmbH <[email protected]> | ||
License: MIT | ||
|
||
Files: docs/src/assets/*.svg docs/src/assets/*.webp docs/src/assets/getting-started/*.webp docs/playwright.config.ts docs/*.mjs docs/*.json docs/public/*.svg docs/src/misc/*.json docs/src/misc/*.jsonc | ||
Copyright: Copyright © SixtyFPS GmbH <[email protected]> | ||
License: MIT | ||
|
||
Files: api/*/*.json | ||
Copyright: Copyright © SixtyFPS GmbH <[email protected]> | ||
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{% extends "!base.html" %} | ||
{% block scripts %} | ||
{{ super() }} | ||
{% include "../../../../docs/resources/slint-docs-preview.html" %} | ||
{% include "../../../../docs/resources/slint-docs-highlight.html" %} | ||
{% include "../../../../docs/src/utils/slint-docs-preview.html" %} | ||
{% include "../../../../docs/src/utils/slint-docs-highlight.html" %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# build output | ||
dist/ | ||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store | ||
|
||
# More to ignore | ||
/test-results/ | ||
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ | ||
/src/assets/generated/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<!-- Copyright © SixtyFPS GmbH <[email protected]> ; SPDX-License-Identifier: MIT --> | ||
# Slint Documentation | ||
|
||
|
||
## Prerequisites | ||
- Rust | ||
- Node.js | ||
- pnpm | ||
|
||
|
||
## 🚀 Project Structure | ||
The documentation site is built with [Astro Starlight](https://starlight.astro.build/) and reuses it's | ||
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/`. | ||
|
||
```bash | ||
cargo run -p slint-docsnapper -- docs/src/content --overwrite | ||
``` | ||
|
||
Then generate the slint auto generated content. | ||
|
||
```bash | ||
cargo xtask slintdocs | ||
``` | ||
|
||
This xtask also installs the npm dependencies and builds the docs. The equivalent of: | ||
|
||
```bash | ||
pnpm i --ignore-scripts | ||
pnpm run build | ||
``` | ||
|
||
`--ignore-scripts` is needed because this is a monorepo and `pnpm i` will install the dependencies of all | ||
the projects as well as run any install scripts. Currently the `api/node` project will attemtpt to compile | ||
|
||
This will build the site and place it in `dist/`. | ||
|
||
## Live edit the docs | ||
To run the live hot reloading dev server run: | ||
|
||
```bash | ||
pnpm start | ||
``` | ||
|
||
This will start the dev server at `localhost:4321`. | ||
|
||
|
||
|
||
## 🧞 Commands | ||
|
||
All commands are run from the root of the project, from a terminal: | ||
|
||
| Command | Action | | ||
| :------------------------ | :----------------------------------------------- | | ||
| `pnpm i --ignore-scripts` | 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 [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat). |
Oops, something went wrong.