1.9 Organise docs folder. (#7005)

Move astro files to docs/astro
This commit is contained in:
Nigel Breslaw 2024-12-05 15:40:04 +02:00 committed by GitHub
parent 160c87c2af
commit 92534a8a27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
202 changed files with 73 additions and 49 deletions

View file

@ -23,7 +23,7 @@ jobs:
# Allow deprecated warning because we are using nightly and some things might be deprecated in nightly
# for which the stable alternative is not yet available.
RUSTFLAGS: -D warnings -W deprecated
RUSTDOCFLAGS: --html-in-header=/home/runner/work/slint/slint/docs/src/utils/slint-docs-highlight.html -D warnings -W deprecated --cfg docsrs
RUSTDOCFLAGS: --html-in-header=/home/runner/work/slint/slint/docs/astro/src/utils/slint-docs-highlight.html -D warnings -W deprecated --cfg docsrs
SLINT_NO_QT: 1
CARGO_INCREMENTAL: false
RELEASE_INPUT: ${{ inputs.release }}
@ -88,17 +88,17 @@ jobs:
cp -r target/aarch64-linux-android/doc/i_slint_backend_testing/ target/doc/
- name: "Generate Screenshots for Example Snippets"
run: cargo run -p slint-docsnapper -- docs/src/content --overwrite
run: cargo run -p slint-docsnapper -- docs/astro/src/content --overwrite
- name: "Install Node dependencies"
run: pnpm i --frozen-lockfile
- name: "Run lint checks"
working-directory: docs
working-directory: docs/astro
continue-on-error: true
run: pnpm lint
- name: "Run format checks"
working-directory: docs
working-directory: docs/astro
continue-on-error: true
run: pnpm format
- name: Update URL for sitemap in astro.config.mjs
@ -109,14 +109,14 @@ jobs:
- name: "Slint Language Documentation"
run: cargo xtask slintdocs
- name: Spellcheck
working-directory: docs
working-directory: docs/astro
run: pnpm spellcheck
# Test docs
- name: Run Playwright tests
working-directory: docs
working-directory: docs/astro
run: pnpm exec playwright test
- name: Publish Test Summary Results
working-directory: docs
working-directory: docs/astro
run: npx github-actions-ctrf playwright-report/ctrf-report.json
- name: "Node docs"
@ -162,7 +162,7 @@ jobs:
path: |
target/doc
target/cppdocs/html
docs/dist
docs/astro/dist
api/node/docs
docs/site
- name: "Check for docs warnings in internal crates"

View file

@ -576,11 +576,11 @@ jobs:
RELEASE_INPUT: ${{ github.event.inputs.release }}
run: |
if [ "$RELEASE_INPUT" != "true" ]; then
notes_file=slint-src/docs/src/utils/_templates/nightly-release-notes.md
notes_file=slint-src/docs/nightly-release-notes.md
version=nightly
download_version=$version
else
notes_file=slint-src/docs/src/utils/_templates/release-notes.md
notes_file=slint-src/docs/release-notes.md
version=$(echo artifacts/Slint-cpp-*-win64-MSVC.exe | sed -nre 's/^.*-([0-9]+\.[0-9]+\.[0-9]+).*$/\1/p')
if [[ -z "$version" ]]; then
echo "Version not found"
@ -591,7 +591,7 @@ jobs:
download_version=v$version
fi
echo "VERSION=$version" >> $GITHUB_OUTPUT
cat $notes_file slint-src/docs/src/utils/_templates/release-artifacts.md > release-notes.md
cat $notes_file slint-src/docs/release-artifacts.md > release-notes.md
sed -i -e "s,{version},$version,g" release-notes.md
sed -i -e "s,{download_version},$download_version,g" release-notes.md
sed -i -e "s,{major_version},$major_version,g" release-notes.md

4
.gitignore vendored
View file

@ -9,8 +9,8 @@ node_modules
/_deps
.DS_Store
Pipfile.lock
/docs/src/content/collections/enums/
/docs/src/content/collections/structs/
/docs/astro/src/content/collections/enums/
/docs/astro/src/content/collections/structs/
/playwright-report
# Ignore all package-lock.json files

View file

@ -40,7 +40,7 @@ if(SLINT_BUILD_EXAMPLES)
add_subdirectory(demos)
endif()
if(SLINT_BUILD_TESTING AND (SLINT_FEATURE_COMPILER OR SLINT_COMPILER))
add_subdirectory(docs/src/content/code/)
add_subdirectory(docs/astro/src/content/code/)
endif()
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")

View file

@ -22,10 +22,10 @@ When opening a pull request, you will be asked to sign a
## Internal documentation
- [Development guide](docs/src/utils/_templates//development.md)
- [Building Slint from sources in this repository](docs/src/utils/_templates/building.md)
- [Testing](docs/src/utils/_templates//testing.md)
- [GitHub issues triage and labels](docs/src/utils/_templates/triage.md)
- [Development guide](docs/development.md)
- [Building Slint from sources in this repository](docs/building.md)
- [Testing](docs/testing.md)
- [GitHub issues triage and labels](docs/triage.md)
## Coding Style

View file

@ -113,8 +113,8 @@ use the Slint markup language and how to interact with a Slint user interface
from supported programming languages.
The `docs` folder contains a lot more information, including
[build instructions](docs/src/utils/_templates//building.md), and
[internal developer docs](docs/src/utils/_templates//development.md).
[build instructions](docs/building.md), and
[internal developer docs](docs/development.md).
Refer to the README of each language directory in the `api` folder:

View file

@ -14,7 +14,8 @@ path = [
"**/slint-logo-**.pdf",
"**/slint-logo-**.png",
"**/slint-logo-**.svg",
"docs/src/content/docs/reference/elements/slint-logo.png",
"docs/astro/public/favicon.svg",
"docs/astro/src/content/docs/reference/elements/slint-logo.png",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Copyright © SixtyFPS GmbH <info@slint.dev>"
@ -80,13 +81,13 @@ path = [
"docs/**/book.toml",
"docs/**/package.json",
"docs/public/**.svg",
"docs/src/assets/**.svg",
"docs/src/assets/**.webp",
"docs/src/assets/getting-started/**.webp",
"docs/src/content/docs/reference/elements/mini-banner.png",
"docs/src/misc/**.json",
"docs/src/misc/**.jsonc",
"docs/src/utils/_templates/**.md",
"docs/astro/src/assets/**.svg",
"docs/astro/src/assets/**.webp",
"docs/astro/src/assets/getting-started/**.webp",
"docs/astro/src/content/docs/reference/elements/mini-banner.png",
"docs/astro/src/misc/**.json",
"docs/astro/src/misc/**.jsonc",
"docs/astro/src/utils/_templates/**.md",
"examples/**.json",
"examples/**/LC_MESSAGES/**.mo",

View file

@ -1,6 +1,6 @@
{% extends "!base.html" %}
{% block scripts %}
{{ super() }}
{% include "../../../../docs/src/utils/slint-docs-preview.html" %}
{% include "../../../../docs/src/utils/slint-docs-highlight.html" %}
{% include "../../../../docs/astro/src/utils/slint-docs-preview.html" %}
{% include "../../../../docs/astro/src/utils/slint-docs-highlight.html" %}
{% endblock %}

View file

@ -35,7 +35,7 @@ You need to install the following components:
* **[pnpm](https://www.pnpm.io/)**
* **[Rust compiler](https://www.rust-lang.org/tools/install)** (1.77 or newer)
You will also need a few more dependencies, see <https://github.com/slint-ui/slint/blob/master/docs/src/utils/_templates/building.md#prerequisites>
You will also need a few more dependencies, see <https://github.com/slint-ui/slint/blob/master/docs/building.md#prerequisites>
## Using Slint

View file

@ -35,7 +35,7 @@ Slint-node comes with pre-built binaries for macOS, Linux, and Windows. If you'd
without pre-built binaries, you need to additional software:
* **[Rust compiler](https://www.rust-lang.org/tools/install)** (1.77 or newer) * Depending on your operating system, you may need additional components. For a list of required system libraries,
see <https://github.com/slint-ui/slint/blob/master/docs/src/utils/_templates/building.md#prerequisites>.
see <https://github.com/slint-ui/slint/blob/master/docs/building.md#prerequisites>.
## Getting Started (Node.js)

View file

@ -210,8 +210,8 @@ i-slint-backend-qt = { workspace = true, features = [ "enable" ], optional = tru
[package.metadata.docs.rs]
rustdoc-args = [
# "--html-in-header",
# "docs/src/utils/slint-docs-preview.html",
# "docs/astro/src/utils/slint-docs-preview.html",
"--html-in-header",
"docs/src/utils/slint-docs-highlight.html",
"docs/astro/src/utils/slint-docs-highlight.html",
]
features = ["document-features", "log", "gettext", "renderer-software", "renderer-femtovg", "raw-window-handle-06"]

View file

@ -48,7 +48,7 @@ python3 -m http.server
---
### Running the C++ Examples
* **When compiling Slint from sources:** If you follow the [C++ build instructions](/docs/src/utils/_templates/building.md#c-build), this will build the C++
* **When compiling Slint from sources:** If you follow the [C++ build instructions](/docs/building.md#c-build), this will build the C++
examples as well by default
* **From [installed binary packages](/api/cpp/README.md#binary-packages):** Simply run cmake in one of the example directory containing a CMakeLists.txt

View file

@ -43,7 +43,7 @@ not be processed and optimized by Starlight.
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
cargo run -p slint-docsnapper -- docs/astro/src/content --overwrite
```
Then generate the slint auto generated content.

View file

@ -1,5 +1,5 @@
{
"extends": ["../biome.json"],
"extends": ["../../biome.json"],
"formatter": {
"ignore": ["archive/**", ".astro"]
},

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 846 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 850 B

After

Width:  |  Height:  |  Size: 850 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more