Skip to content

Commit 92534a8

Browse files
authored
1.9 Organise docs folder. (slint-ui#7005)
Move astro files to docs/astro
1 parent 160c87c commit 92534a8

File tree

202 files changed

+73
-49
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+73
-49
lines changed

.github/workflows/build_docs.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
# Allow deprecated warning because we are using nightly and some things might be deprecated in nightly
2424
# for which the stable alternative is not yet available.
2525
RUSTFLAGS: -D warnings -W deprecated
26-
RUSTDOCFLAGS: --html-in-header=/home/runner/work/slint/slint/docs/src/utils/slint-docs-highlight.html -D warnings -W deprecated --cfg docsrs
26+
RUSTDOCFLAGS: --html-in-header=/home/runner/work/slint/slint/docs/astro/src/utils/slint-docs-highlight.html -D warnings -W deprecated --cfg docsrs
2727
SLINT_NO_QT: 1
2828
CARGO_INCREMENTAL: false
2929
RELEASE_INPUT: ${{ inputs.release }}
@@ -88,17 +88,17 @@ jobs:
8888
cp -r target/aarch64-linux-android/doc/i_slint_backend_testing/ target/doc/
8989
9090
- name: "Generate Screenshots for Example Snippets"
91-
run: cargo run -p slint-docsnapper -- docs/src/content --overwrite
91+
run: cargo run -p slint-docsnapper -- docs/astro/src/content --overwrite
9292
- name: "Install Node dependencies"
9393
run: pnpm i --frozen-lockfile
9494

9595
- name: "Run lint checks"
96-
working-directory: docs
96+
working-directory: docs/astro
9797
continue-on-error: true
9898
run: pnpm lint
9999

100100
- name: "Run format checks"
101-
working-directory: docs
101+
working-directory: docs/astro
102102
continue-on-error: true
103103
run: pnpm format
104104
- name: Update URL for sitemap in astro.config.mjs
@@ -109,14 +109,14 @@ jobs:
109109
- name: "Slint Language Documentation"
110110
run: cargo xtask slintdocs
111111
- name: Spellcheck
112-
working-directory: docs
112+
working-directory: docs/astro
113113
run: pnpm spellcheck
114114
# Test docs
115115
- name: Run Playwright tests
116-
working-directory: docs
116+
working-directory: docs/astro
117117
run: pnpm exec playwright test
118118
- name: Publish Test Summary Results
119-
working-directory: docs
119+
working-directory: docs/astro
120120
run: npx github-actions-ctrf playwright-report/ctrf-report.json
121121

122122
- name: "Node docs"
@@ -162,7 +162,7 @@ jobs:
162162
path: |
163163
target/doc
164164
target/cppdocs/html
165-
docs/dist
165+
docs/astro/dist
166166
api/node/docs
167167
docs/site
168168
- name: "Check for docs warnings in internal crates"

.github/workflows/nightly_snapshot.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -576,11 +576,11 @@ jobs:
576576
RELEASE_INPUT: ${{ github.event.inputs.release }}
577577
run: |
578578
if [ "$RELEASE_INPUT" != "true" ]; then
579-
notes_file=slint-src/docs/src/utils/_templates/nightly-release-notes.md
579+
notes_file=slint-src/docs/nightly-release-notes.md
580580
version=nightly
581581
download_version=$version
582582
else
583-
notes_file=slint-src/docs/src/utils/_templates/release-notes.md
583+
notes_file=slint-src/docs/release-notes.md
584584
version=$(echo artifacts/Slint-cpp-*-win64-MSVC.exe | sed -nre 's/^.*-([0-9]+\.[0-9]+\.[0-9]+).*$/\1/p')
585585
if [[ -z "$version" ]]; then
586586
echo "Version not found"
@@ -591,7 +591,7 @@ jobs:
591591
download_version=v$version
592592
fi
593593
echo "VERSION=$version" >> $GITHUB_OUTPUT
594-
cat $notes_file slint-src/docs/src/utils/_templates/release-artifacts.md > release-notes.md
594+
cat $notes_file slint-src/docs/release-artifacts.md > release-notes.md
595595
sed -i -e "s,{version},$version,g" release-notes.md
596596
sed -i -e "s,{download_version},$download_version,g" release-notes.md
597597
sed -i -e "s,{major_version},$major_version,g" release-notes.md

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ node_modules
99
/_deps
1010
.DS_Store
1111
Pipfile.lock
12-
/docs/src/content/collections/enums/
13-
/docs/src/content/collections/structs/
12+
/docs/astro/src/content/collections/enums/
13+
/docs/astro/src/content/collections/structs/
1414
/playwright-report
1515

1616
# Ignore all package-lock.json files

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if(SLINT_BUILD_EXAMPLES)
4040
add_subdirectory(demos)
4141
endif()
4242
if(SLINT_BUILD_TESTING AND (SLINT_FEATURE_COMPILER OR SLINT_COMPILER))
43-
add_subdirectory(docs/src/content/code/)
43+
add_subdirectory(docs/astro/src/content/code/)
4444
endif()
4545

4646
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")

CONTRIBUTING.md

+4-4

README.md

+2-2

REUSE.toml

+9-8
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ path = [
1414
"**/slint-logo-**.pdf",
1515
"**/slint-logo-**.png",
1616
"**/slint-logo-**.svg",
17-
"docs/src/content/docs/reference/elements/slint-logo.png",
17+
"docs/astro/public/favicon.svg",
18+
"docs/astro/src/content/docs/reference/elements/slint-logo.png",
1819
]
1920
precedence = "aggregate"
2021
SPDX-FileCopyrightText = "Copyright © SixtyFPS GmbH <[email protected]>"
@@ -80,13 +81,13 @@ path = [
8081
"docs/**/book.toml",
8182
"docs/**/package.json",
8283
"docs/public/**.svg",
83-
"docs/src/assets/**.svg",
84-
"docs/src/assets/**.webp",
85-
"docs/src/assets/getting-started/**.webp",
86-
"docs/src/content/docs/reference/elements/mini-banner.png",
87-
"docs/src/misc/**.json",
88-
"docs/src/misc/**.jsonc",
89-
"docs/src/utils/_templates/**.md",
84+
"docs/astro/src/assets/**.svg",
85+
"docs/astro/src/assets/**.webp",
86+
"docs/astro/src/assets/getting-started/**.webp",
87+
"docs/astro/src/content/docs/reference/elements/mini-banner.png",
88+
"docs/astro/src/misc/**.json",
89+
"docs/astro/src/misc/**.jsonc",
90+
"docs/astro/src/utils/_templates/**.md",
9091

9192
"examples/**.json",
9293
"examples/**/LC_MESSAGES/**.mo",

api/cpp/docs/_templates/base.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends "!base.html" %}
22
{% block scripts %}
33
{{ super() }}
4-
{% include "../../../../docs/src/utils/slint-docs-preview.html" %}
5-
{% include "../../../../docs/src/utils/slint-docs-highlight.html" %}
4+
{% include "../../../../docs/astro/src/utils/slint-docs-preview.html" %}
5+
{% include "../../../../docs/astro/src/utils/slint-docs-highlight.html" %}
66
{% endblock %}

api/node/README.md

+1-1

api/node/cover.md

+1-1

api/rs/slint/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ i-slint-backend-qt = { workspace = true, features = [ "enable" ], optional = tru
210210
[package.metadata.docs.rs]
211211
rustdoc-args = [
212212
# "--html-in-header",
213-
# "docs/src/utils/slint-docs-preview.html",
213+
# "docs/astro/src/utils/slint-docs-preview.html",
214214
"--html-in-header",
215-
"docs/src/utils/slint-docs-highlight.html",
215+
"docs/astro/src/utils/slint-docs-highlight.html",
216216
]
217217
features = ["document-features", "log", "gettext", "renderer-software", "renderer-femtovg", "raw-window-handle-06"]

demos/README.md

+1-1
File renamed without changes.

docs/README.md docs/astro/README.md

+1-1
File renamed without changes.

docs/biome.json docs/astro/biome.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": ["../biome.json"],
2+
"extends": ["../../biome.json"],
33
"formatter": {
44
"ignore": ["archive/**", ".astro"]
55
},
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/src/utils/_templates/building.md docs/building.md

+1-1

docs/src/utils/_templates/embedded-tutorials.md docs/embedded-tutorials.md

+2

docs/src/utils/_templates/nightly-release-notes.md docs/nightly-release-notes.md

+2

docs/readme.md

+17

docs/src/utils/_templates/release-artifacts.md docs/release-artifacts.md

+2

docs/src/utils/_templates/release-notes.md docs/release-notes.md

+2

examples/README.md

+1-1

internal/backends/qt/build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn main() {
1818
println!("cargo:rustc-cfg=no_qt");
1919
println!(
2020
"cargo:warning=Could not find a Qt installation. The Qt backend will not be functional. \
21-
See https://github.com/slint-ui/slint/blob/master/docs/src/utils/_templates/install_qt.md for more info"
21+
See https://github.com/slint-ui/slint/blob/master/docs/install_qt.md for more info"
2222
);
2323
println!("cargo:warning= {}", std::env::var("DEP_QT_ERROR_MESSAGE").unwrap());
2424
return;
@@ -28,7 +28,7 @@ fn main() {
2828
println!("cargo:rustc-cfg=no_qt");
2929
println!(
3030
"cargo:warning=Qt {} is not supported, you need at least Qt 5.15. The Qt backend will not be functional. \
31-
See https://github.com/slint-ui/slint/blob/master/docs/src/utils/_templates/install_qt.md for more info",
31+
See https://github.com/slint-ui/slint/blob/master/docs/install_qt.md for more info",
3232
qt_version
3333
);
3434
return;

pnpm-lock.yaml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ packages:
1010
- "examples/carousel/node"
1111
- "examples/todo/node"
1212
- "examples/memory"
13-
- "docs/editor"
14-
- "docs"
13+
- "docs/astro"

xtask/src/license_headers_check.rs

-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ lazy_static! {
436436
("^editors/tree-sitter-slint/corpus/", LicenseLocation::NoLicense), // liberal license
437437
("^api/cpp/docs/_static/", LicenseLocation::NoLicense),
438438
("^api/cpp/docs/_templates/", LicenseLocation::NoLicense),
439-
("^docs/src/utils/_templates/", LicenseLocation::NoLicense),
440439
("^docs/quickstart/theme/", LicenseLocation::NoLicense),
441440
("^editors/tree-sitter-slint/queries/", LicenseLocation::NoLicense), // liberal license
442441

xtask/src/slintdocs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn generate() -> Result<(), Box<dyn std::error::Error>> {
1515

1616
let root = super::root_dir();
1717

18-
let docs_source_dir = root.join("docs");
18+
let docs_source_dir = root.join("docs/astro");
1919

2020
{
2121
let sh = Shell::new()?;
@@ -32,7 +32,7 @@ fn write_individual_enum_files(
3232
root_dir: &Path,
3333
enums: &std::collections::BTreeMap<String, EnumDoc>,
3434
) -> Result<(), Box<dyn std::error::Error>> {
35-
let enums_dir = root_dir.join("docs/src/content/collections/enums");
35+
let enums_dir = root_dir.join("docs/astro/src/content/collections/enums");
3636
create_dir_all(&enums_dir).context(format!(
3737
"Failed to create folder holding individual enum doc files {enums_dir:?}"
3838
))?;
@@ -224,7 +224,7 @@ fn write_individual_struct_files(
224224
root_dir: &Path,
225225
structs: std::collections::BTreeMap<String, StructDoc>,
226226
) -> Result<(), Box<dyn std::error::Error>> {
227-
let structs_dir = root_dir.join("docs/src/content/collections/structs");
227+
let structs_dir = root_dir.join("docs/astro/src/content/collections/structs");
228228
create_dir_all(&structs_dir).context(format!(
229229
"Failed to create folder holding individual structs doc files {structs_dir:?}"
230230
))?;

0 commit comments

Comments
 (0)