From dfc1f3bc5cc1616241b6d8fbd111ae07d663f78c Mon Sep 17 00:00:00 2001 From: Simon Hyll Date: Mon, 22 Apr 2024 21:33:22 +0200 Subject: [PATCH] feat: site restructuring (#2082) * merge conflicts resolved * fix: link validation * fix: ordering * fix: js renamed to javascript * fix: removed accidentally committed generated files * fix: removed tauri * fix: added tauri * fix: releases should only be built in prod --- .gitmodules | 9 +- astro.config.mjs | 191 ++------- package.json | 5 +- packages/config-generator/build.ts | 10 +- packages/js-api-generator/build.ts | 26 +- packages/tauri | 1 + packages/tauri-v1 | 1 - packages/tauri-v2 | 1 - public/navigate.js | 45 ++ .../visual-studio-build-tools-installer.png | Bin .../docs/{es => _es}/features/dialog.mdx | 2 +- .../docs/{es => _es}/features/index.mdx | 0 .../{es => _es}/guides/frontend/index.mdx | 20 +- .../{es => _es}/guides/frontend/nextjs.mdx | 0 .../docs/{es => _es}/guides/frontend/nuxt.mdx | 0 .../{es => _es}/guides/frontend/trunk.mdx | 0 .../guides/prerequisites/index.mdx | 10 +- .../visual-studio-build-tools-installer.png | Bin src/content/docs/{es => _es}/index.mdx | 0 .../docs/{fr => _fr}/features/index.mdx | 0 .../{fr => _fr}/features/notification.mdx | 0 .../{fr => _fr}/guides/debug/application.mdx | 2 +- .../docs/{fr => _fr}/guides/debug/index.mdx | 2 +- .../docs/{fr => _fr}/guides/debug/vs-code.mdx | 0 .../guides/develop/development-cycle.mdx | 0 .../docs/{fr => _fr}/guides/develop/index.mdx | 0 .../guides/develop/updating-dependencies.mdx | 0 .../{fr => _fr}/guides/frontend/index.mdx | 20 +- .../{fr => _fr}/guides/frontend/nextjs.mdx | 0 .../docs/{fr => _fr}/guides/frontend/nuxt.mdx | 0 .../{fr => _fr}/guides/frontend/trunk.mdx | 0 .../guides/prerequisites/index.mdx | 10 +- .../visual-studio-build-tools-installer.png | Bin .../guides/upgrade-migrate/from-tauri-1.mdx | 4 +- src/content/docs/{fr => _fr}/index.mdx | 0 .../docs/_ko/guides/debug/application.mdx | 2 +- src/content/docs/_ko/guides/test/index.mdx | 2 +- .../docs/_ko/guides/test/webdriver/ci.md | 2 +- .../test/webdriver/example/selenium.mdx | 6 +- .../docs/_ko/guides/test/webdriver/index.mdx | 8 +- .../{zh-cn => _zh-cn}/features/autostart.mdx | 2 +- .../features/barcode-scanner.mdx | 2 +- .../docs/{zh-cn => _zh-cn}/features/cli.mdx | 2 +- .../{zh-cn => _zh-cn}/features/clipboard.mdx | 0 .../{zh-cn => _zh-cn}/features/commands.mdx | 0 .../features/deep-linking.mdx | 2 +- .../{zh-cn => _zh-cn}/features/dialog.mdx | 2 +- .../features/file-system.mdx | 4 +- .../features/global-shortcut.mdx | 2 +- .../features/http-client.mdx | 2 +- .../docs/{zh-cn => _zh-cn}/features/index.mdx | 0 .../{zh-cn => _zh-cn}/features/localhost.mdx | 0 .../{zh-cn => _zh-cn}/features/logging.mdx | 2 +- .../features/notification.mdx | 0 .../{zh-cn => _zh-cn}/features/os-info.mdx | 2 +- .../features/persisted-scope.mdx | 0 .../{zh-cn => _zh-cn}/features/positioner.mdx | 2 +- .../{zh-cn => _zh-cn}/features/process.mdx | 0 .../docs/{zh-cn => _zh-cn}/features/shell.mdx | 2 +- .../features/single-instance.mdx | 0 .../docs/{zh-cn => _zh-cn}/features/sql.mdx | 0 .../docs/{zh-cn => _zh-cn}/features/store.mdx | 2 +- .../{zh-cn => _zh-cn}/features/stronghold.mdx | 2 +- .../{zh-cn => _zh-cn}/features/upload.mdx | 0 .../{zh-cn => _zh-cn}/features/websocket.mdx | 2 +- .../features/window-customization.mdx | 6 +- .../features/window-state.mdx | 2 +- .../guides/debug/application.mdx | 2 +- .../{zh-cn => _zh-cn}/guides/debug/index.mdx | 4 +- .../guides/debug/vs-code.mdx | 0 .../guides/develop/development-cycle.mdx | 0 .../guides/develop/index.mdx | 0 .../guides/develop/updating-dependencies.mdx | 0 .../guides/frontend/index.mdx | 20 +- .../guides/frontend/nextjs.mdx | 0 .../guides/frontend/nuxt.mdx | 0 .../guides/frontend/trunk.mdx | 0 .../docs/{zh-cn => _zh-cn}/guides/index.mdx | 6 +- .../guides/plugins/develop-mobile.mdx | 10 +- .../guides/plugins/index.mdx | 12 +- .../guides/prerequisites/index.mdx | 10 +- .../visual-studio-build-tools-installer.png | Bin .../{zh-cn => _zh-cn}/guides/test/index.mdx | 2 +- .../{zh-cn => _zh-cn}/guides/test/mocking.md | 0 .../guides/test/webdriver/ci.md | 2 +- .../test/webdriver/example/selenium.mdx | 2 +- .../guides/test/webdriver/index.mdx | 8 +- .../guides/upgrade-migrate/from-tauri-1.mdx | 6 +- .../guides/upgrade-migrate/index.mdx | 0 src/content/docs/{zh-cn => _zh-cn}/index.mdx | 0 .../{zh-cn => _zh-cn}/references/v2/acl.mdx | 2 +- src/content/docs/about/index.mdx | 2 +- src/content/docs/blog/tauri-1-4.mdx | 2 +- .../brownfield.md | 4 + .../index.mdx | 6 + .../isolation.md | 10 +- src/content/docs/concepts/architecture.mdx | 13 +- src/content/docs/concepts/index.mdx | 10 +- src/content/docs/concepts/process-model.md | 5 + src/content/docs/concepts/rendering.mdx | 5 + src/content/docs/concepts/size.mdx | 5 + .../debug => develop/Debug}/application.mdx | 6 +- .../docs/develop/Debug/crabnebula-cloud.mdx | 13 + src/content/docs/develop/Debug/index.mdx | 14 + .../clion.mdx => develop/Debug/intellij.mdx} | 6 +- .../vs-code.mdx => develop/Debug/vscode.mdx} | 4 + .../Plugins}/develop-mobile.mdx | 10 +- .../plugins => develop/Plugins}/index.mdx | 18 +- .../commands.mdx => develop/calling-rust.mdx} | 5 + .../configuration-files.md | 17 +- .../develop/development-cycle.mdx | 5 + src/content/docs/develop/index.mdx | 16 + .../{guides => develop}/state-management.mdx | 2 + .../develop/updating-dependencies.mdx | 5 + .../docs/distribute/Pipelines/github.mdx | 12 + .../docs/distribute/Pipelines/gitlab.mdx | 12 + .../docs/distribute/Pipelines/index.mdx | 13 + src/content/docs/distribute/app-store.mdx | 13 + src/content/docs/distribute/debian.mdx | 13 + src/content/docs/distribute/index.mdx | 14 + src/content/docs/distribute/play-store.mdx | 13 + src/content/docs/distribute/steam.mdx | 13 + src/content/docs/features/_authenticator.mdx | 2 +- src/content/docs/features/autostart.mdx | 6 +- src/content/docs/features/barcode-scanner.mdx | 2 +- src/content/docs/features/biometric.mdx | 6 +- src/content/docs/features/cli.mdx | 6 +- src/content/docs/features/clipboard.mdx | 4 + src/content/docs/features/deep-linking.mdx | 2 +- src/content/docs/features/dialog.mdx | 2 +- src/content/docs/features/file-system.mdx | 8 +- src/content/docs/features/global-shortcut.mdx | 6 +- src/content/docs/features/http-client.mdx | 6 +- src/content/docs/features/index.mdx | 4 +- src/content/docs/features/localhost.mdx | 4 + src/content/docs/features/logging.mdx | 6 +- src/content/docs/features/nfc.mdx | 6 +- src/content/docs/features/os-info.mdx | 8 +- src/content/docs/features/persisted-scope.mdx | 4 + src/content/docs/features/positioner.mdx | 6 +- src/content/docs/features/process.mdx | 4 + src/content/docs/features/shell.mdx | 6 +- src/content/docs/features/single-instance.mdx | 4 + src/content/docs/features/sql.mdx | 4 + src/content/docs/features/store.mdx | 6 +- src/content/docs/features/stronghold.mdx | 6 +- src/content/docs/features/updater.mdx | 6 +- src/content/docs/features/upload.mdx | 4 + src/content/docs/features/websocket.mdx | 6 +- .../docs/features/window-customization.mdx | 10 +- src/content/docs/features/window-state.mdx | 6 +- src/content/docs/guides/TEMPLATE.md | 4 - src/content/docs/guides/build.mdx | 17 - .../docs/guides/create/existing-project.mdx | 7 - src/content/docs/guides/create/index.mdx | 152 ------- src/content/docs/guides/create/mobile.mdx | 217 ---------- src/content/docs/guides/debug/index.mdx | 12 - src/content/docs/guides/develop/index.mdx | 17 - src/content/docs/guides/distribute.mdx | 17 - src/content/docs/guides/test/index.mdx | 13 - src/content/docs/guides/troubleshoot.mdx | 7 - src/content/docs/index.mdx | 6 +- src/content/docs/references/.gitignore | 10 +- src/content/docs/references/{v2 => }/acl.mdx | 4 +- src/content/docs/references/{v2 => }/cli.mdx | 4 +- .../docs/references/environment-variables.mdx | 5 + src/content/docs/references/index.mdx | 20 +- src/content/docs/references/v1/cli.mdx | 402 ------------------ src/content/docs/references/v2/js/index.mdx | 7 - .../docs/references/webview-versions.md | 2 + .../security/best-practices.mdx | 4 + .../{concepts => }/security/capabilities.mdx | 10 +- .../docs/{concepts => }/security/csp.mdx | 4 + .../{concepts => }/security/development.mdx | 4 + .../{concepts => }/security/ecosystem.mdx | 4 + .../docs/{concepts => }/security/future.mdx | 4 + .../docs/{concepts => }/security/index.mdx | 24 +- .../{concepts => }/security/permissions.mdx | 4 + .../security/runtime-authority.mdx | 4 + .../docs/{concepts => }/security/scope.mdx | 10 +- .../Frontend Configuration}/index.mdx | 46 +- .../Frontend Configuration}/leptos.mdx | 4 + .../Frontend Configuration}/nextjs.mdx | 0 .../Frontend Configuration}/nuxt.mdx | 0 .../Frontend Configuration}/qwik.mdx | 4 + .../Frontend Configuration}/svelte.mdx | 4 + .../Frontend Configuration}/sycamore.mdx | 4 + .../Frontend Configuration}/trunk.mdx | 0 .../Frontend Configuration}/vite.mdx | 4 + .../Frontend Configuration}/webpack.mdx | 4 + .../Frontend Configuration}/yew.mdx | 4 + .../Upgrade & Migrate}/from-electron.mdx | 5 + .../start/Upgrade & Migrate/from-existing.mdx | 12 + .../Upgrade & Migrate}/from-flutter.mdx | 5 + .../Upgrade & Migrate}/from-tauri-1.mdx | 8 +- .../Upgrade & Migrate}/index.mdx | 12 +- src/content/docs/start/create-project.mdx | 83 ++++ src/content/docs/{guides => start}/index.mdx | 8 +- .../index.mdx => start/prerequisites.mdx} | 16 +- src/content/docs/test/Pipelines/github.mdx | 12 + src/content/docs/test/Pipelines/gitlab.mdx | 12 + src/content/docs/test/Pipelines/index.mdx | 13 + .../WebDriver/Example/index.mdx} | 9 +- .../WebDriver/Example}/selenium.mdx | 11 +- .../WebDriver/Example}/webdriverio.mdx | 7 +- .../test/webdriver => test/WebDriver}/ci.md | 7 +- .../webdriver => test/WebDriver}/index.mdx | 14 +- src/content/docs/test/index.mdx | 15 + src/content/docs/{guides => }/test/mocking.md | 3 + tsconfig.json | 3 +- 210 files changed, 936 insertions(+), 1329 deletions(-) create mode 160000 packages/tauri delete mode 160000 packages/tauri-v1 delete mode 160000 packages/tauri-v2 create mode 100644 public/navigate.js rename src/{content/docs/es/guides => assets/img/start}/prerequisites/visual-studio-build-tools-installer.png (100%) rename src/content/docs/{es => _es}/features/dialog.mdx (98%) rename src/content/docs/{es => _es}/features/index.mdx (100%) rename src/content/docs/{es => _es}/guides/frontend/index.mdx (77%) rename src/content/docs/{es => _es}/guides/frontend/nextjs.mdx (100%) rename src/content/docs/{es => _es}/guides/frontend/nuxt.mdx (100%) rename src/content/docs/{es => _es}/guides/frontend/trunk.mdx (100%) rename src/content/docs/{es => _es}/guides/prerequisites/index.mdx (95%) rename src/content/docs/{ => _es}/guides/prerequisites/visual-studio-build-tools-installer.png (100%) rename src/content/docs/{es => _es}/index.mdx (100%) rename src/content/docs/{fr => _fr}/features/index.mdx (100%) rename src/content/docs/{fr => _fr}/features/notification.mdx (100%) rename src/content/docs/{fr => _fr}/guides/debug/application.mdx (98%) rename src/content/docs/{fr => _fr}/guides/debug/index.mdx (80%) rename src/content/docs/{fr => _fr}/guides/debug/vs-code.mdx (100%) rename src/content/docs/{fr => _fr}/guides/develop/development-cycle.mdx (100%) rename src/content/docs/{fr => _fr}/guides/develop/index.mdx (100%) rename src/content/docs/{fr => _fr}/guides/develop/updating-dependencies.mdx (100%) rename src/content/docs/{fr => _fr}/guides/frontend/index.mdx (72%) rename src/content/docs/{fr => _fr}/guides/frontend/nextjs.mdx (100%) rename src/content/docs/{fr => _fr}/guides/frontend/nuxt.mdx (100%) rename src/content/docs/{fr => _fr}/guides/frontend/trunk.mdx (100%) rename src/content/docs/{fr => _fr}/guides/prerequisites/index.mdx (95%) rename src/content/docs/{fr => _fr}/guides/prerequisites/visual-studio-build-tools-installer.png (100%) rename src/content/docs/{fr => _fr}/guides/upgrade-migrate/from-tauri-1.mdx (99%) rename src/content/docs/{fr => _fr}/index.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/autostart.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/features/barcode-scanner.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/features/cli.mdx (99%) rename src/content/docs/{zh-cn => _zh-cn}/features/clipboard.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/commands.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/deep-linking.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/features/dialog.mdx (99%) rename src/content/docs/{zh-cn => _zh-cn}/features/file-system.mdx (99%) rename src/content/docs/{zh-cn => _zh-cn}/features/global-shortcut.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/features/http-client.mdx (96%) rename src/content/docs/{zh-cn => _zh-cn}/features/index.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/localhost.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/logging.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/features/notification.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/os-info.mdx (93%) rename src/content/docs/{zh-cn => _zh-cn}/features/persisted-scope.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/positioner.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/features/process.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/shell.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/features/single-instance.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/sql.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/store.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/features/stronghold.mdx (99%) rename src/content/docs/{zh-cn => _zh-cn}/features/upload.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/features/websocket.mdx (97%) rename src/content/docs/{zh-cn => _zh-cn}/features/window-customization.mdx (97%) rename src/content/docs/{zh-cn => _zh-cn}/features/window-state.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/guides/debug/application.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/guides/debug/index.mdx (61%) rename src/content/docs/{zh-cn => _zh-cn}/guides/debug/vs-code.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/guides/develop/development-cycle.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/guides/develop/index.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/guides/develop/updating-dependencies.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/guides/frontend/index.mdx (67%) rename src/content/docs/{zh-cn => _zh-cn}/guides/frontend/nextjs.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/guides/frontend/nuxt.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/guides/frontend/trunk.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/guides/index.mdx (86%) rename src/content/docs/{zh-cn => _zh-cn}/guides/plugins/develop-mobile.mdx (94%) rename src/content/docs/{zh-cn => _zh-cn}/guides/plugins/index.mdx (94%) rename src/content/docs/{zh-cn => _zh-cn}/guides/prerequisites/index.mdx (95%) rename src/content/docs/{zh-cn => _zh-cn}/guides/prerequisites/visual-studio-build-tools-installer.png (100%) rename src/content/docs/{zh-cn => _zh-cn}/guides/test/index.mdx (79%) rename src/content/docs/{zh-cn => _zh-cn}/guides/test/mocking.md (100%) rename src/content/docs/{zh-cn => _zh-cn}/guides/test/webdriver/ci.md (97%) rename src/content/docs/{zh-cn => _zh-cn}/guides/test/webdriver/example/selenium.mdx (98%) rename src/content/docs/{zh-cn => _zh-cn}/guides/test/webdriver/index.mdx (92%) rename src/content/docs/{zh-cn => _zh-cn}/guides/upgrade-migrate/from-tauri-1.mdx (99%) rename src/content/docs/{zh-cn => _zh-cn}/guides/upgrade-migrate/index.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/index.mdx (100%) rename src/content/docs/{zh-cn => _zh-cn}/references/v2/acl.mdx (96%) rename src/content/docs/concepts/{inter-process-communication => Inter-Process Communication}/brownfield.md (97%) rename src/content/docs/concepts/{inter-process-communication => Inter-Process Communication}/index.mdx (96%) rename src/content/docs/concepts/{inter-process-communication => Inter-Process Communication}/isolation.md (97%) rename src/content/docs/{guides/debug => develop/Debug}/application.mdx (97%) create mode 100644 src/content/docs/develop/Debug/crabnebula-cloud.mdx create mode 100644 src/content/docs/develop/Debug/index.mdx rename src/content/docs/{guides/debug/clion.mdx => develop/Debug/intellij.mdx} (97%) rename src/content/docs/{guides/debug/vs-code.mdx => develop/Debug/vscode.mdx} (98%) rename src/content/docs/{guides/plugins => develop/Plugins}/develop-mobile.mdx (94%) rename src/content/docs/{guides/plugins => develop/Plugins}/index.mdx (96%) rename src/content/docs/{features/commands.mdx => develop/calling-rust.mdx} (99%) rename src/content/docs/{references => develop}/configuration-files.md (90%) rename src/content/docs/{guides => }/develop/development-cycle.mdx (96%) create mode 100644 src/content/docs/develop/index.mdx rename src/content/docs/{guides => develop}/state-management.mdx (95%) rename src/content/docs/{guides => }/develop/updating-dependencies.mdx (96%) create mode 100644 src/content/docs/distribute/Pipelines/github.mdx create mode 100644 src/content/docs/distribute/Pipelines/gitlab.mdx create mode 100644 src/content/docs/distribute/Pipelines/index.mdx create mode 100644 src/content/docs/distribute/app-store.mdx create mode 100644 src/content/docs/distribute/debian.mdx create mode 100644 src/content/docs/distribute/index.mdx create mode 100644 src/content/docs/distribute/play-store.mdx create mode 100644 src/content/docs/distribute/steam.mdx delete mode 100644 src/content/docs/guides/TEMPLATE.md delete mode 100644 src/content/docs/guides/build.mdx delete mode 100644 src/content/docs/guides/create/existing-project.mdx delete mode 100644 src/content/docs/guides/create/index.mdx delete mode 100644 src/content/docs/guides/create/mobile.mdx delete mode 100644 src/content/docs/guides/debug/index.mdx delete mode 100644 src/content/docs/guides/develop/index.mdx delete mode 100644 src/content/docs/guides/distribute.mdx delete mode 100644 src/content/docs/guides/test/index.mdx delete mode 100644 src/content/docs/guides/troubleshoot.mdx rename src/content/docs/references/{v2 => }/acl.mdx (95%) rename src/content/docs/references/{v2 => }/cli.mdx (99%) delete mode 100644 src/content/docs/references/v1/cli.mdx delete mode 100644 src/content/docs/references/v2/js/index.mdx rename src/content/docs/{concepts => }/security/best-practices.mdx (97%) rename src/content/docs/{concepts => }/security/capabilities.mdx (96%) rename src/content/docs/{concepts => }/security/csp.mdx (97%) rename src/content/docs/{concepts => }/security/development.mdx (98%) rename src/content/docs/{concepts => }/security/ecosystem.mdx (96%) rename src/content/docs/{concepts => }/security/future.mdx (98%) rename src/content/docs/{concepts => }/security/index.mdx (87%) rename src/content/docs/{concepts => }/security/permissions.mdx (98%) rename src/content/docs/{concepts => }/security/runtime-authority.mdx (93%) rename src/content/docs/{concepts => }/security/scope.mdx (93%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/index.mdx (69%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/leptos.mdx (58%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/nextjs.mdx (100%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/nuxt.mdx (100%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/qwik.mdx (57%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/svelte.mdx (58%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/sycamore.mdx (59%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/trunk.mdx (100%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/vite.mdx (57%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/webpack.mdx (58%) rename src/content/docs/{guides/frontend => start/Frontend Configuration}/yew.mdx (57%) rename src/content/docs/{guides/upgrade-migrate => start/Upgrade & Migrate}/from-electron.mdx (58%) create mode 100644 src/content/docs/start/Upgrade & Migrate/from-existing.mdx rename src/content/docs/{guides/upgrade-migrate => start/Upgrade & Migrate}/from-flutter.mdx (58%) rename src/content/docs/{guides/upgrade-migrate => start/Upgrade & Migrate}/from-tauri-1.mdx (99%) rename src/content/docs/{guides/upgrade-migrate => start/Upgrade & Migrate}/index.mdx (62%) create mode 100644 src/content/docs/start/create-project.mdx rename src/content/docs/{guides => start}/index.mdx (84%) rename src/content/docs/{guides/prerequisites/index.mdx => start/prerequisites.mdx} (94%) create mode 100644 src/content/docs/test/Pipelines/github.mdx create mode 100644 src/content/docs/test/Pipelines/gitlab.mdx create mode 100644 src/content/docs/test/Pipelines/index.mdx rename src/content/docs/{guides/test/webdriver/example/setup.mdx => test/WebDriver/Example/index.mdx} (97%) rename src/content/docs/{guides/test/webdriver/example => test/WebDriver/Example}/selenium.mdx (93%) rename src/content/docs/{guides/test/webdriver/example => test/WebDriver/Example}/webdriverio.mdx (98%) rename src/content/docs/{guides/test/webdriver => test/WebDriver}/ci.md (96%) rename src/content/docs/{guides/test/webdriver => test/WebDriver}/index.mdx (90%) create mode 100644 src/content/docs/test/index.mdx rename src/content/docs/{guides => }/test/mocking.md (99%) diff --git a/.gitmodules b/.gitmodules index 38e58fd313..0d1e3b836f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,13 +1,10 @@ -[submodule "packages/tauri-v2"] - path = packages/tauri-v2 - url = https://github.com/tauri-apps/tauri.git [submodule "packages/plugins-workspace"] path = packages/plugins-workspace url = https://github.com/tauri-apps/plugins-workspace.git branch = v2 -[submodule "packages/tauri-v1"] - path = packages/tauri-v1 - url = https://github.com/tauri-apps/tauri.git [submodule "packages/awesome-tauri"] path = packages/awesome-tauri url = https://github.com/tauri-apps/awesome-tauri +[submodule "packages/tauri"] + path = packages/tauri + url = https://github.com/tauri-apps/tauri.git diff --git a/astro.config.mjs b/astro.config.mjs index 84904d62e1..5a9ad78491 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -93,6 +93,12 @@ export default defineConfig({ tag: 'meta', attrs: { property: 'twitter:image', content: site + '/og.png?v=1' }, }, + { + tag: 'script', + attrs: { + src: '/navigate.js' + } + }, ], // TODO: Be sure this is updated when the branch is switched editLink: { @@ -102,175 +108,44 @@ export default defineConfig({ sidebar: [ { label: 'Quick Start', - translations: { - 'zh-CN': '快速开始', - }, collapsed: true, - items: [ - { - label: 'What is Tauri?', - translations: { - 'zh-CN': '什么是 Tauri?', - }, - link: 'guides', - }, - { - label: 'Prerequisites', - translations: { - es: 'Prerrequisitos', - 'zh-CN': '前置条件', - }, - link: 'guides/prerequisites', - }, - { - label: 'Create a Project', - translations: { - 'zh-CN': '创建项目', - }, - link: 'guides/create', - }, - { - label: 'Frontend Configuration', - translations: { - es: 'Configuración del Frontend', - 'zh-CN': '前端配置', - }, - link: 'guides/frontend', - }, - { - label: 'Upgrade & Migrate', - translations: { - 'zh-CN': '升级和迁移', - }, - link: 'guides/upgrade-migrate', - }, - { - label: 'Core Concepts', - translations: { - 'zh-CN': '核心概念', - }, - link: 'concepts', - }, - { - label: 'Troubleshooting', - translations: { - 'zh-CN': '故障排除', - }, - link: 'guides/troubleshoot', - }, - ], + autogenerate: { directory: 'start' }, }, { - label: 'Guides', - translations: { - 'zh-CN': '指引', - }, + label: 'Core Concepts', collapsed: true, - items: [ - { - label: 'Develop', - translations: { - 'zh-CN': '开发', - }, - link: 'guides/develop/', - }, - { - label: 'Debug', - translations: { - 'zh-CN': '调试', - }, - link: 'guides/debug/', - }, - { - label: 'Test', - translations: { - 'zh-CN': '测试', - }, - link: 'guides/test', - }, - { - label: 'Build', - translations: { - 'zh-CN': '构建', - }, - link: 'guides/build', - }, - { - label: 'Distribute', - translations: { - 'zh-CN': '分发', - }, - link: 'guides/distribute', - }, - { - label: 'Plugin Development', - translations: { - 'zh-CN': '插件开发', - }, - link: 'guides/plugins', - }, - ], + autogenerate: { directory: 'concepts' }, }, { - label: 'References', - translations: { - 'zh-CN': '参考', - }, + label: 'Security', + collapsed: true, + autogenerate: { directory: 'security' }, + }, + { + label: 'Develop', + collapsed: true, + autogenerate: { directory: 'develop' }, + }, + { + label: 'Test', + collapsed: true, + autogenerate: { directory: 'test' }, + }, + { + label: 'Distribute', collapsed: true, - items: [ - { - label: 'List of References', - translations: { - 'zh-CN': '参考列表', - }, - link: '/references', - }, - { - label: 'Tauri Configuration', - translations: { - 'zh-CN': 'Tauri 配置', - }, - link: '/references/v2/config', - }, - { - label: 'Access Control List', - translations: { - 'zh-CN': '访问控制列表(ACL)', - }, - link: '/references/v2/acl', - }, - { - label: 'Command Line Interface (CLI)', - translations: { - 'zh-CN': '命令行接口(CLI)', - }, - link: '/references/v2/cli', - }, - { - label: 'JavaScript API', - translations: { - 'zh-CN': 'JavaScript 接口', - }, - link: '/references/v2/js', - }, - { - label: 'Rust API (via Docs.rs)', - translations: { - 'zh-CN': 'Rust 接口', - }, - // TODO: Is there a way to link this to the latest pre-released version? - link: 'https://docs.rs/tauri/~2.0.0-beta', - }, - ], + autogenerate: { directory: 'distribute' }, }, { label: 'Features & Recipes', - translations: { - 'zh-CN': '功能和秘诀', - }, collapsed: true, autogenerate: { directory: 'features' }, }, + { + label: 'References', + collapsed: true, + autogenerate: { directory: 'references' }, + }, ], locales, lastUpdated: true, @@ -331,7 +206,7 @@ export default defineConfig({ ...i18nRedirect('/v1/guides/testing/webdriver/introduction', '/guides/test/webdriver/'), ...i18nRedirect( '/v1/guides/testing/webdriver/example/setup', - '/guides/test/webdriver/example/setup' + '/guides/test/webdriver/example/' ), ...i18nRedirect( '/v1/guides/testing/webdriver/example/selenium', @@ -339,7 +214,7 @@ export default defineConfig({ ), ...i18nRedirect( '/v1/guides/testing/webdriver/example/webdriverio', - '/guides/test/webdriver/example/webdriverio' + '/test/webdriver/example/webdriverio' ), // v1 /references diff --git a/package.json b/package.json index 749ca2ec8e..25eb874fef 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,9 @@ "version": "0.0.1", "scripts": { "dev:setup:submodules": "git submodule update --init", - "dev:setup:tauri-v1": "yarn --cwd packages/tauri-v1/tooling/api", - "dev:setup:tauri-v2": "yarn --cwd packages/tauri-v2/tooling/api", + "dev:setup:tauri": "yarn --cwd packages/tauri/tooling/api", "dev:setup:plugins-workspace": "pnpm --prefix packages/plugins-workspace install", - "dev:setup": "pnpm dev:setup:submodules && pnpm dev:setup:tauri-v1 && pnpm dev:setup:tauri-v2 && pnpm dev:setup:plugins-workspace", + "dev:setup": "pnpm dev:setup:submodules && pnpm dev:setup:tauri && pnpm dev:setup:plugins-workspace", "dev": "astro dev", "format": "prettier -w --cache --plugin prettier-plugin-astro .", "build:references": "pnpm --filter js-api-generator run build", diff --git a/packages/config-generator/build.ts b/packages/config-generator/build.ts index 68986ae73b..343c56626e 100644 --- a/packages/config-generator/build.ts +++ b/packages/config-generator/build.ts @@ -3,12 +3,8 @@ import { existsSync, writeFileSync } from 'node:fs'; import { slug } from 'github-slugger'; buildConfig( - '../tauri-v1/core/tauri-config-schema/schema.json', - '../../src/content/docs/references/v1/config.md' -); -buildConfig( - '../tauri-v2/core/tauri-config-schema/schema.json', - '../../src/content/docs/references/v2/config.md' + '../tauri/core/tauri-config-schema/schema.json', + '../../src/content/docs/references/config.md' ); async function buildConfig(schemaFile: string, outputFile: string) { @@ -19,7 +15,7 @@ async function buildConfig(schemaFile: string, outputFile: string) { let schema: JSONSchema7 = (await import(schemaFile)).default; const output = [ - '---\n# NOTE: This file is auto-generated in packages/config-generator/build.ts\n# For corrections please edit https://github.com/tauri-apps/tauri/blob/dev/core/tauri-utils/src/config.rs directly\n\ntitle: Configuration\n---', + '---\n# NOTE: This file is auto-generated in packages/config-generator/build.ts\n# For corrections please edit https://github.com/tauri-apps/tauri/blob/dev/core/tauri-utils/src/config.rs directly\n\ntitle: Configuration\nsidebar:\n order: 1\n---', ]; output.push( diff --git a/packages/js-api-generator/build.ts b/packages/js-api-generator/build.ts index d2d5eaba0e..2482c86405 100644 --- a/packages/js-api-generator/build.ts +++ b/packages/js-api-generator/build.ts @@ -45,28 +45,12 @@ const typeDocConfigBaseOptions: Partial = { }; async function generator() { - if (existsSync('../tauri-v1/tooling/api/node_modules')) { + if (existsSync('../tauri/tooling/api/node_modules')) { const coreJsOptions: Partial = { - entryPoints: ['../tauri-v1/tooling/api/src/index.ts'], - tsconfig: '../tauri-v1/tooling/api/tsconfig.json', - gitRevision: '1.x', - baseUrl: '/references/v1/js/', - ...typeDocConfigBaseOptions, - }; - - await generateDocs(coreJsOptions); - } else { - console.log( - 'Tauri V1 submodule is not initialized, respective API routes will not be rendered.' - ); - } - - if (existsSync('../tauri-v2/tooling/api/node_modules')) { - const coreJsOptions: Partial = { - entryPoints: ['../tauri-v2/tooling/api/src/index.ts'], - tsconfig: '../tauri-v2/tooling/api/tsconfig.json', + entryPoints: ['../tauri/tooling/api/src/index.ts'], + tsconfig: '../tauri/tooling/api/tsconfig.json', gitRevision: 'dev', - baseUrl: '/references/v2/js/core/', + baseUrl: '/references/javascript/api/', ...typeDocConfigBaseOptions, }; @@ -111,7 +95,7 @@ async function generator() { entryPoints: [`../plugins-workspace/plugins/${plugin}/guest-js/index.ts`], tsconfig: `../plugins-workspace/plugins/${plugin}/tsconfig.json`, gitRevision: 'v2', - baseUrl: `/references/v2/js/${plugin}`, + baseUrl: `/references/javascript/${plugin}`, ...typeDocConfigBaseOptions, }; diff --git a/packages/tauri b/packages/tauri new file mode 160000 index 0000000000..198f11ae7b --- /dev/null +++ b/packages/tauri @@ -0,0 +1 @@ +Subproject commit 198f11ae7b33e505aaeb1d95a81b4be41bdd61eb diff --git a/packages/tauri-v1 b/packages/tauri-v1 deleted file mode 160000 index 5966812735..0000000000 --- a/packages/tauri-v1 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 59668127352ee4990e1ff0c200fe2476b7cc72c6 diff --git a/packages/tauri-v2 b/packages/tauri-v2 deleted file mode 160000 index 1b2d31c71a..0000000000 --- a/packages/tauri-v2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1b2d31c71a3898a0050d2137dd95689904309479 diff --git a/public/navigate.js b/public/navigate.js new file mode 100644 index 0000000000..b876205cd6 --- /dev/null +++ b/public/navigate.js @@ -0,0 +1,45 @@ +async function chapterNavigation() { + let navigating = false + document.addEventListener("keydown", function (e) { + if (navigating) return + if (e.altKey || e.ctrlKey || e.metaKey) { + return; + } + if (window.search && document.activeElement === window.search) { + return; + } + + switch (e.key) { + case "ArrowLeft": + e.preventDefault(); + let previousButton = document.querySelector('a[rel="prev"]'); + if (!previousButton && window.location.pathname !== '/') previousButton = { href: '/' } + + if (document.referrer.includes(window.location.host)) + if (previousButton) { + window.location.href = previousButton.href; + navigating = true; + } + break; + case "ArrowRight": + e.preventDefault(); + let nextButton = document.querySelector('a[rel="next"]'); + if (!nextButton && window.location.pathname === '/') nextButton = { href: "/start/" } + + if (nextButton) { + window.location.href = nextButton.href; + navigating = true; + } + break; + } + }); + }; + + window.addEventListener('DOMContentLoaded', () => { + chapterNavigation() + }) + + window.onload = function () { + document.body.setAttribute('tabindex', '-1'); + document.body.focus(); + }; \ No newline at end of file diff --git a/src/content/docs/es/guides/prerequisites/visual-studio-build-tools-installer.png b/src/assets/img/start/prerequisites/visual-studio-build-tools-installer.png similarity index 100% rename from src/content/docs/es/guides/prerequisites/visual-studio-build-tools-installer.png rename to src/assets/img/start/prerequisites/visual-studio-build-tools-installer.png diff --git a/src/content/docs/es/features/dialog.mdx b/src/content/docs/_es/features/dialog.mdx similarity index 98% rename from src/content/docs/es/features/dialog.mdx rename to src/content/docs/_es/features/dialog.mdx index a1f7a999ec..a7f25df353 100644 --- a/src/content/docs/es/features/dialog.mdx +++ b/src/content/docs/_es/features/dialog.mdx @@ -80,7 +80,7 @@ en Rust: ### JavaScript -Consulta todas las [Opciones de diálogo](/references/v2/js/dialog/) en la referencia de la API de JavaScript. +Consulta todas las [Opciones de diálogo](/references/javascript/dialog/) en la referencia de la API de JavaScript. {/* ASK */} diff --git a/src/content/docs/es/features/index.mdx b/src/content/docs/_es/features/index.mdx similarity index 100% rename from src/content/docs/es/features/index.mdx rename to src/content/docs/_es/features/index.mdx diff --git a/src/content/docs/es/guides/frontend/index.mdx b/src/content/docs/_es/guides/frontend/index.mdx similarity index 77% rename from src/content/docs/es/guides/frontend/index.mdx rename to src/content/docs/_es/guides/frontend/index.mdx index 1bf9a5642f..55e4cce919 100644 --- a/src/content/docs/es/guides/frontend/index.mdx +++ b/src/content/docs/_es/guides/frontend/index.mdx @@ -18,21 +18,21 @@ Si un framework no aparece en esta lista puede que funcione con Tauri sin necesi ## JavaScript - - - - - - + + + + + + ## Rust - - - - + + + + ## Checklist de Configuración diff --git a/src/content/docs/es/guides/frontend/nextjs.mdx b/src/content/docs/_es/guides/frontend/nextjs.mdx similarity index 100% rename from src/content/docs/es/guides/frontend/nextjs.mdx rename to src/content/docs/_es/guides/frontend/nextjs.mdx diff --git a/src/content/docs/es/guides/frontend/nuxt.mdx b/src/content/docs/_es/guides/frontend/nuxt.mdx similarity index 100% rename from src/content/docs/es/guides/frontend/nuxt.mdx rename to src/content/docs/_es/guides/frontend/nuxt.mdx diff --git a/src/content/docs/es/guides/frontend/trunk.mdx b/src/content/docs/_es/guides/frontend/trunk.mdx similarity index 100% rename from src/content/docs/es/guides/frontend/trunk.mdx rename to src/content/docs/_es/guides/frontend/trunk.mdx diff --git a/src/content/docs/es/guides/prerequisites/index.mdx b/src/content/docs/_es/guides/prerequisites/index.mdx similarity index 95% rename from src/content/docs/es/guides/prerequisites/index.mdx rename to src/content/docs/_es/guides/prerequisites/index.mdx index 76712f0d7f..983aee662f 100644 --- a/src/content/docs/es/guides/prerequisites/index.mdx +++ b/src/content/docs/_es/guides/prerequisites/index.mdx @@ -191,7 +191,7 @@ Aquí está el archivo como un script plano: [rustup.sh](https://sh.rustup.rs/) Asegúrate de reiniciar tu Terminal (y en algunos casos tu sistema) para que los cambios surtan efecto. -Siguiente: [Configurar para Móvil](#configurar-para-móvil) si deseas construir para Android e iOS. De lo contrario, [Crea un Proyecto](/guides/create/). +Siguiente: [Configurar para Móvil](#configurar-para-móvil) si deseas construir para Android e iOS. De lo contrario, [Crea un Proyecto](/start/create-project). ## Configurar para Móvil @@ -291,7 +291,7 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro -Siguiente: [Configurar para iOS](#ios) o [Crear un proyecto](/guides/create/). +Siguiente: [Configurar para iOS](#ios) o [Crear un proyecto](/start/create-project). ### iOS @@ -319,14 +319,14 @@ Asegúrate de haber instalado Xcode y no Xcode Command Line Tools en la [secció brew install cocoapods ``` -Siguiente: [Crear un proyecto](/guides/create/). +Siguiente: [Crear un proyecto](/start/create-project). ## Solución de Problemas -Si tienes algún problema durante la instalación, asegúrate de revisar la [Guía de Solución de Problemas](/guides/troubleshoot) o comunícate en el [Discord de Tauri](https://discord.com/invite/tauri). +Si tienes algún problema durante la instalación, asegúrate de revisar la [Guía de Solución de Problemas](/develop/debug) o comunícate en el [Discord de Tauri](https://discord.com/invite/tauri). -¡Ahora que has instalado todos los prerequisitos estás listo para [crear tu primer proyecto Tauri](/guides/create/)! +¡Ahora que has instalado todos los prerequisitos estás listo para [crear tu primer proyecto Tauri](/start/create-project)! diff --git a/src/content/docs/guides/prerequisites/visual-studio-build-tools-installer.png b/src/content/docs/_es/guides/prerequisites/visual-studio-build-tools-installer.png similarity index 100% rename from src/content/docs/guides/prerequisites/visual-studio-build-tools-installer.png rename to src/content/docs/_es/guides/prerequisites/visual-studio-build-tools-installer.png diff --git a/src/content/docs/es/index.mdx b/src/content/docs/_es/index.mdx similarity index 100% rename from src/content/docs/es/index.mdx rename to src/content/docs/_es/index.mdx diff --git a/src/content/docs/fr/features/index.mdx b/src/content/docs/_fr/features/index.mdx similarity index 100% rename from src/content/docs/fr/features/index.mdx rename to src/content/docs/_fr/features/index.mdx diff --git a/src/content/docs/fr/features/notification.mdx b/src/content/docs/_fr/features/notification.mdx similarity index 100% rename from src/content/docs/fr/features/notification.mdx rename to src/content/docs/_fr/features/notification.mdx diff --git a/src/content/docs/fr/guides/debug/application.mdx b/src/content/docs/_fr/guides/debug/application.mdx similarity index 98% rename from src/content/docs/fr/guides/debug/application.mdx rename to src/content/docs/_fr/guides/debug/application.mdx index 79ad6103e6..1308e165c5 100644 --- a/src/content/docs/fr/guides/debug/application.mdx +++ b/src/content/docs/_fr/guides/debug/application.mdx @@ -102,6 +102,6 @@ tauri = { version = "...", features = ["...", "devtools"] } Le processus Core est alimenté par Rust, vous pouvez donc utiliser GDB ou LLDB pour le déboguer. Vous pouvez suivre le guide [Débogage dans VS Code][] pour apprendre à utiliser l'extension LLDB VS Code pour déboguer le processus principal des applications Tauri. -[Débogage dans VS Code]: /fr/guides/debug/vs-code +[Débogage dans VS Code]: /fr/develop/debug/vscode [`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools [`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools diff --git a/src/content/docs/fr/guides/debug/index.mdx b/src/content/docs/_fr/guides/debug/index.mdx similarity index 80% rename from src/content/docs/fr/guides/debug/index.mdx rename to src/content/docs/_fr/guides/debug/index.mdx index 7b4d5d8a41..2ac71dff64 100644 --- a/src/content/docs/fr/guides/debug/index.mdx +++ b/src/content/docs/_fr/guides/debug/index.mdx @@ -10,6 +10,6 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components'; title="Débogage de l'application" href="/fr/guides/debug/application/" /> - + diff --git a/src/content/docs/fr/guides/debug/vs-code.mdx b/src/content/docs/_fr/guides/debug/vs-code.mdx similarity index 100% rename from src/content/docs/fr/guides/debug/vs-code.mdx rename to src/content/docs/_fr/guides/debug/vs-code.mdx diff --git a/src/content/docs/fr/guides/develop/development-cycle.mdx b/src/content/docs/_fr/guides/develop/development-cycle.mdx similarity index 100% rename from src/content/docs/fr/guides/develop/development-cycle.mdx rename to src/content/docs/_fr/guides/develop/development-cycle.mdx diff --git a/src/content/docs/fr/guides/develop/index.mdx b/src/content/docs/_fr/guides/develop/index.mdx similarity index 100% rename from src/content/docs/fr/guides/develop/index.mdx rename to src/content/docs/_fr/guides/develop/index.mdx diff --git a/src/content/docs/fr/guides/develop/updating-dependencies.mdx b/src/content/docs/_fr/guides/develop/updating-dependencies.mdx similarity index 100% rename from src/content/docs/fr/guides/develop/updating-dependencies.mdx rename to src/content/docs/_fr/guides/develop/updating-dependencies.mdx diff --git a/src/content/docs/fr/guides/frontend/index.mdx b/src/content/docs/_fr/guides/frontend/index.mdx similarity index 72% rename from src/content/docs/fr/guides/frontend/index.mdx rename to src/content/docs/_fr/guides/frontend/index.mdx index aedc21e2d0..c0ae6de128 100644 --- a/src/content/docs/fr/guides/frontend/index.mdx +++ b/src/content/docs/_fr/guides/frontend/index.mdx @@ -19,21 +19,21 @@ Un framework manque à la liste ? Il peut fonctionner avec Tauri sans configurat ## JavaScript - - - - - - + + + + + + ## Rust - - - - + + + + ## Instructions de Configuration diff --git a/src/content/docs/fr/guides/frontend/nextjs.mdx b/src/content/docs/_fr/guides/frontend/nextjs.mdx similarity index 100% rename from src/content/docs/fr/guides/frontend/nextjs.mdx rename to src/content/docs/_fr/guides/frontend/nextjs.mdx diff --git a/src/content/docs/fr/guides/frontend/nuxt.mdx b/src/content/docs/_fr/guides/frontend/nuxt.mdx similarity index 100% rename from src/content/docs/fr/guides/frontend/nuxt.mdx rename to src/content/docs/_fr/guides/frontend/nuxt.mdx diff --git a/src/content/docs/fr/guides/frontend/trunk.mdx b/src/content/docs/_fr/guides/frontend/trunk.mdx similarity index 100% rename from src/content/docs/fr/guides/frontend/trunk.mdx rename to src/content/docs/_fr/guides/frontend/trunk.mdx diff --git a/src/content/docs/fr/guides/prerequisites/index.mdx b/src/content/docs/_fr/guides/prerequisites/index.mdx similarity index 95% rename from src/content/docs/fr/guides/prerequisites/index.mdx rename to src/content/docs/_fr/guides/prerequisites/index.mdx index 76471ec399..41b6bf024f 100644 --- a/src/content/docs/fr/guides/prerequisites/index.mdx +++ b/src/content/docs/_fr/guides/prerequisites/index.mdx @@ -194,7 +194,7 @@ Voici le fichier contenant le script: [rustup.sh](https://sh.rustup.rs/) Assurez-vous de relancer votre terminal (et parfois votre système) pour que les modifications prennent effet. -Suivant: [Configuration pour Mobile](#configuration-pour-mobile) si vous voulez construire une application pour Android et iOS. Dans le cas contraire, [Create a Project](/guides/create/). +Suivant: [Configuration pour Mobile](#configuration-pour-mobile) si vous voulez construire une application pour Android et iOS. Dans le cas contraire, [Create a Project](/start/create-project). ## Configuration pour Mobile @@ -286,7 +286,7 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro -Suivant: [Installation pour Android](#ios) ou [Create a project](/guides/create/). +Suivant: [Installation pour Android](#ios) ou [Create a project](/start/create-project). ### iOS @@ -302,14 +302,14 @@ rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim Assurez-vous d'avoir installé Xcode et non Xcode Command Line Tools dans la section [Dépendances systèmes macOS](#macos). -Suivant: [Create a project](/guides/create/). +Suivant: [Create a project](/start/create-project). ## Problèmes -Si vous rencontrez un problème durant l'installation, assurez-vous de consulter le [guide de résolution de problèmes](/guides/troubleshoot/) ou rejoignez le [Discord de Tauri](https://discord.com/invite/tauri) +Si vous rencontrez un problème durant l'installation, assurez-vous de consulter le [guide de résolution de problèmes](/develop/debug/) ou rejoignez le [Discord de Tauri](https://discord.com/invite/tauri) -Maintenant que vous avez installé tous les prérequis, vous êtes fin prêt pour [créer votre premier projet Tauri](/guides/create/) ! +Maintenant que vous avez installé tous les prérequis, vous êtes fin prêt pour [créer votre premier projet Tauri](/start/create-project) ! diff --git a/src/content/docs/fr/guides/prerequisites/visual-studio-build-tools-installer.png b/src/content/docs/_fr/guides/prerequisites/visual-studio-build-tools-installer.png similarity index 100% rename from src/content/docs/fr/guides/prerequisites/visual-studio-build-tools-installer.png rename to src/content/docs/_fr/guides/prerequisites/visual-studio-build-tools-installer.png diff --git a/src/content/docs/fr/guides/upgrade-migrate/from-tauri-1.mdx b/src/content/docs/_fr/guides/upgrade-migrate/from-tauri-1.mdx similarity index 99% rename from src/content/docs/fr/guides/upgrade-migrate/from-tauri-1.mdx rename to src/content/docs/_fr/guides/upgrade-migrate/from-tauri-1.mdx index 9d898088a9..2c7aa59aad 100644 --- a/src/content/docs/fr/guides/upgrade-migrate/from-tauri-1.mdx +++ b/src/content/docs/_fr/guides/upgrade-migrate/from-tauri-1.mdx @@ -26,7 +26,7 @@ Tauri v2 contient la commande `migrate` qui simplifie votre migration: {/* TODO: 2.0 */} -Apprenez-en plus à-propos de la commande `migrate` dans l'[interface de référence des commandes](/references/v2/cli#migrate) +Apprenez-en plus à-propos de la commande `migrate` dans l'[interface de référence des commandes](/references/cli#migrate) ## Sommaire des Changements @@ -42,7 +42,7 @@ Voici ci-dessous un sommaire des changement entre Tauri 1.0 et Tauri 2.0: - `tauri > updater > endpoints` déplacé vers `plugins > updater`. - `tauri > systemTray` renomé en `tauri > trayIcon`. -[Référence de l'API de configuration de Tauri 2.0](/references/v2/config) +[Référence de l'API de configuration de Tauri 2.0](/references/config) ### Nouvelles Fonctionnalités de Cargo diff --git a/src/content/docs/fr/index.mdx b/src/content/docs/_fr/index.mdx similarity index 100% rename from src/content/docs/fr/index.mdx rename to src/content/docs/_fr/index.mdx diff --git a/src/content/docs/_ko/guides/debug/application.mdx b/src/content/docs/_ko/guides/debug/application.mdx index 344f78a0f4..8dd7743ff0 100644 --- a/src/content/docs/_ko/guides/debug/application.mdx +++ b/src/content/docs/_ko/guides/debug/application.mdx @@ -103,6 +103,6 @@ tauri = { version = "...", features = ["...", "devtools"] } 핵심 프로세스는 Rust로 구동되므로 GDB 또는 LLDB를 사용하여 디버깅할 수 있습니다. [VS Code에서 디버깅][] 가이드에 따라 LLDB VS Code 확장을 사용하여 Tauri 애플리케이션의 핵심 프로세스를 디버깅하는 방법을 알아볼 수 있습니다. -[VS Code에서 디버깅]: /ko/guides/debug/vs-code +[VS Code에서 디버깅]: /ko/develop/debug/vscode [`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools [`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools diff --git a/src/content/docs/_ko/guides/test/index.mdx b/src/content/docs/_ko/guides/test/index.mdx index b61f2d4aa3..7eb70aef56 100644 --- a/src/content/docs/_ko/guides/test/index.mdx +++ b/src/content/docs/_ko/guides/test/index.mdx @@ -9,5 +9,5 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - + diff --git a/src/content/docs/_ko/guides/test/webdriver/ci.md b/src/content/docs/_ko/guides/test/webdriver/ci.md index 08b24ebfa4..96c6dc051d 100644 --- a/src/content/docs/_ko/guides/test/webdriver/ci.md +++ b/src/content/docs/_ko/guides/test/webdriver/ci.md @@ -91,7 +91,7 @@ jobs: working-directory: webdriver/webdriverio ``` -[previously built together]: /ko/guides/test/webdriver/example/webdriverio +[previously built together]: /ko/test/webdriver/example/webdriverio [webdriver]: https://www.w3.org/TR/webdriver/ [`tauri-driver`]: https://crates.io/crates/tauri-driver [webdriverio]: https://webdriver.io/ diff --git a/src/content/docs/_ko/guides/test/webdriver/example/selenium.mdx b/src/content/docs/_ko/guides/test/webdriver/example/selenium.mdx index 5c8d58fb34..c6dd4c24a3 100644 --- a/src/content/docs/_ko/guides/test/webdriver/example/selenium.mdx +++ b/src/content/docs/_ko/guides/test/webdriver/example/selenium.mdx @@ -64,7 +64,7 @@ simply with ## Testing -Unlike the [WebdriverIO Test Suite](/ko/guides/test/webdriver/example/webdriverio#config), Selenium does not come out of the box with a Test Suite and +Unlike the [WebdriverIO Test Suite](/ko/test/webdriver/example/webdriverio#config), Selenium does not come out of the box with a Test Suite and leaves it up to the developer to build those out. We chose [Mocha], which is pretty neutral and not related to WebDrivers, so our script will need to do a bit of work to set up everything for us in the correct order. [Mocha] expects a testing file at `test/test.js` by default, so let's create that file now. @@ -156,7 +156,7 @@ describe('Hello Tauri', () => { If you are familiar with JS testing frameworks, `describe`, `it`, and `expect` should look familiar. We also have semi-complex `before()` and `after()` callbacks to set up and teardown mocha. Lines that are not the tests themselves have comments explaining the setup and teardown code. If you were familiar with the Spec file from the -[WebdriverIO example](/ko/guides/test/webdriver/example/webdriverio#spec), you notice a lot more code that isn't tests, as we have to set up a few +[WebdriverIO example](/ko/test/webdriver/example/webdriverio#spec), you notice a lot more code that isn't tests, as we have to set up a few more WebDriver related items. ## Running the Test Suite @@ -190,7 +190,7 @@ tests! With [Selenium] and some hooking up to a test suite, we just enabled e2e testing without modifying our Tauri application at all! -[example application setup]: /ko/guides/test/webdriver/example/setup +[example application setup]: /ko/test/webdriver/example/ [selenium]: https://selenium.dev/ [finished example project]: https://github.com/chippers/hello_tauri [mocha]: https://mochajs.org/ diff --git a/src/content/docs/_ko/guides/test/webdriver/index.mdx b/src/content/docs/_ko/guides/test/webdriver/index.mdx index ded0f35301..ac14f5346e 100644 --- a/src/content/docs/_ko/guides/test/webdriver/index.mdx +++ b/src/content/docs/_ko/guides/test/webdriver/index.mdx @@ -40,14 +40,14 @@ Make sure to grab the version of [Microsoft Edge Driver][] that matches your Win import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - + @@ -55,7 +55,7 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components'; The above examples also comes with a CI script to test with GitHub actions, but you may still be interested in the below WebDriver CI guide as it explains the concept a bit more. - + [webdriver]: https://www.w3.org/TR/webdriver/ [`tauri-driver`]: https://crates.io/crates/tauri-driver diff --git a/src/content/docs/zh-cn/features/autostart.mdx b/src/content/docs/_zh-cn/features/autostart.mdx similarity index 98% rename from src/content/docs/zh-cn/features/autostart.mdx rename to src/content/docs/_zh-cn/features/autostart.mdx index aa02cf2918..8512357a7d 100644 --- a/src/content/docs/zh-cn/features/autostart.mdx +++ b/src/content/docs/_zh-cn/features/autostart.mdx @@ -120,7 +120,7 @@ fn run() { 默认情况下,所有插件命令都被阻止,无法访问。 你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" { diff --git a/src/content/docs/zh-cn/features/barcode-scanner.mdx b/src/content/docs/_zh-cn/features/barcode-scanner.mdx similarity index 98% rename from src/content/docs/zh-cn/features/barcode-scanner.mdx rename to src/content/docs/_zh-cn/features/barcode-scanner.mdx index 1b7400709a..da7ae3291c 100644 --- a/src/content/docs/zh-cn/features/barcode-scanner.mdx +++ b/src/content/docs/_zh-cn/features/barcode-scanner.mdx @@ -85,7 +85,7 @@ scan({ windowed: true, formats: [Format.QRCode] }); 默认情况下,所有插件命令都被阻止,无法访问。 你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/mobile.json" { diff --git a/src/content/docs/zh-cn/features/cli.mdx b/src/content/docs/_zh-cn/features/cli.mdx similarity index 99% rename from src/content/docs/zh-cn/features/cli.mdx rename to src/content/docs/_zh-cn/features/cli.mdx index 37dd117784..20216e448b 100644 --- a/src/content/docs/zh-cn/features/cli.mdx +++ b/src/content/docs/_zh-cn/features/cli.mdx @@ -260,7 +260,7 @@ fn run() { 默认情况下,所有插件命令都被阻止,无法访问。 你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={6} { diff --git a/src/content/docs/zh-cn/features/clipboard.mdx b/src/content/docs/_zh-cn/features/clipboard.mdx similarity index 100% rename from src/content/docs/zh-cn/features/clipboard.mdx rename to src/content/docs/_zh-cn/features/clipboard.mdx diff --git a/src/content/docs/zh-cn/features/commands.mdx b/src/content/docs/_zh-cn/features/commands.mdx similarity index 100% rename from src/content/docs/zh-cn/features/commands.mdx rename to src/content/docs/_zh-cn/features/commands.mdx diff --git a/src/content/docs/zh-cn/features/deep-linking.mdx b/src/content/docs/_zh-cn/features/deep-linking.mdx similarity index 98% rename from src/content/docs/zh-cn/features/deep-linking.mdx rename to src/content/docs/_zh-cn/features/deep-linking.mdx index 5e4bbd1e20..f295f706ab 100644 --- a/src/content/docs/zh-cn/features/deep-linking.mdx +++ b/src/content/docs/_zh-cn/features/deep-linking.mdx @@ -197,7 +197,7 @@ fn run() { 默认情况下,所有插件命令都被阻止,无法访问。 你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={9} { diff --git a/src/content/docs/zh-cn/features/dialog.mdx b/src/content/docs/_zh-cn/features/dialog.mdx similarity index 99% rename from src/content/docs/zh-cn/features/dialog.mdx rename to src/content/docs/_zh-cn/features/dialog.mdx index 58e33c0f90..fec42dba9b 100644 --- a/src/content/docs/zh-cn/features/dialog.mdx +++ b/src/content/docs/_zh-cn/features/dialog.mdx @@ -80,7 +80,7 @@ import CommandTabs from '@components/CommandTabs.astro'; ### JavaScript -可以在 JavaScript API 参考中查看所有 [Dialog 选项](/references/v2/js/dialog/)。 +可以在 JavaScript API 参考中查看所有 [Dialog 选项](/references/javascript/dialog/)。 {/* ASK */} diff --git a/src/content/docs/zh-cn/features/file-system.mdx b/src/content/docs/_zh-cn/features/file-system.mdx similarity index 99% rename from src/content/docs/zh-cn/features/file-system.mdx rename to src/content/docs/_zh-cn/features/file-system.mdx index 07a5ea0c4d..815bfcd6b2 100644 --- a/src/content/docs/zh-cn/features/file-system.mdx +++ b/src/content/docs/_zh-cn/features/file-system.mdx @@ -115,13 +115,13 @@ fn run() { 这个模块阻止路径遍历,不允许绝对路径或父目录组件(即 `/usr/path/to/file` 或 `../path/to/file` 路径是不允许的)。使用这个 API 访问的路径必须相对于一个基本目录,因此如果你需要访问任意的文件系统路径,你必须在核心层上编写这样的逻辑。 -更多信息请参见 [@tauri-apps/plugin-fs - Security](/references/v2/js/fs/#security)。 +更多信息请参见 [@tauri-apps/plugin-fs - Security](/references/javascript/fs/#security)。 ## 权限 默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={7-11} { diff --git a/src/content/docs/zh-cn/features/global-shortcut.mdx b/src/content/docs/_zh-cn/features/global-shortcut.mdx similarity index 98% rename from src/content/docs/zh-cn/features/global-shortcut.mdx rename to src/content/docs/_zh-cn/features/global-shortcut.mdx index f048c197d6..4301390f5f 100644 --- a/src/content/docs/zh-cn/features/global-shortcut.mdx +++ b/src/content/docs/_zh-cn/features/global-shortcut.mdx @@ -124,7 +124,7 @@ fn run() { 默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={7-9} { diff --git a/src/content/docs/zh-cn/features/http-client.mdx b/src/content/docs/_zh-cn/features/http-client.mdx similarity index 96% rename from src/content/docs/zh-cn/features/http-client.mdx rename to src/content/docs/_zh-cn/features/http-client.mdx index 6a829ad2d9..5dfeba6015 100644 --- a/src/content/docs/zh-cn/features/http-client.mdx +++ b/src/content/docs/_zh-cn/features/http-client.mdx @@ -62,7 +62,7 @@ http 插件既有 JavaScript API 版本,也有 Rust [reqwest](https://docs.rs/ ### JavaScript -1. 为了保证你的应用安全,请配置允许的作用域。更多信息请参阅 [JavaScript API 参考](/references/v2/js/http/#security)。 +1. 为了保证你的应用安全,请配置允许的作用域。更多信息请参阅 [JavaScript API 参考](/references/javascript/http/#security)。 ```json //tauri.conf.json diff --git a/src/content/docs/zh-cn/features/index.mdx b/src/content/docs/_zh-cn/features/index.mdx similarity index 100% rename from src/content/docs/zh-cn/features/index.mdx rename to src/content/docs/_zh-cn/features/index.mdx diff --git a/src/content/docs/zh-cn/features/localhost.mdx b/src/content/docs/_zh-cn/features/localhost.mdx similarity index 100% rename from src/content/docs/zh-cn/features/localhost.mdx rename to src/content/docs/_zh-cn/features/localhost.mdx diff --git a/src/content/docs/zh-cn/features/logging.mdx b/src/content/docs/_zh-cn/features/logging.mdx similarity index 98% rename from src/content/docs/zh-cn/features/logging.mdx rename to src/content/docs/_zh-cn/features/logging.mdx index 29de03aa6e..bf59d65be6 100644 --- a/src/content/docs/zh-cn/features/logging.mdx +++ b/src/content/docs/_zh-cn/features/logging.mdx @@ -116,7 +116,7 @@ detach(); 默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={6} { diff --git a/src/content/docs/zh-cn/features/notification.mdx b/src/content/docs/_zh-cn/features/notification.mdx similarity index 100% rename from src/content/docs/zh-cn/features/notification.mdx rename to src/content/docs/_zh-cn/features/notification.mdx diff --git a/src/content/docs/zh-cn/features/os-info.mdx b/src/content/docs/_zh-cn/features/os-info.mdx similarity index 93% rename from src/content/docs/zh-cn/features/os-info.mdx rename to src/content/docs/_zh-cn/features/os-info.mdx index 22e1cdbe39..a56b781120 100644 --- a/src/content/docs/zh-cn/features/os-info.mdx +++ b/src/content/docs/_zh-cn/features/os-info.mdx @@ -58,7 +58,7 @@ import CommandTabs from '@components/CommandTabs.astro'; ## 用法 -通过这个插件,您可以查询当前操作系统的多个信息。请参阅 [JavaScript API](/references/v2/js/os/) 或 [Rust API](https://docs.rs/tauri-plugin-os/) 参考资料中的所有可用函数。 +通过这个插件,您可以查询当前操作系统的多个信息。请参阅 [JavaScript API](/references/javascript/os/) 或 [Rust API](https://docs.rs/tauri-plugin-os/) 参考资料中的所有可用函数。 {/* TODO: Link to which language to use, frontend vs. backend guide when it's made */} diff --git a/src/content/docs/zh-cn/features/persisted-scope.mdx b/src/content/docs/_zh-cn/features/persisted-scope.mdx similarity index 100% rename from src/content/docs/zh-cn/features/persisted-scope.mdx rename to src/content/docs/_zh-cn/features/persisted-scope.mdx diff --git a/src/content/docs/zh-cn/features/positioner.mdx b/src/content/docs/_zh-cn/features/positioner.mdx similarity index 98% rename from src/content/docs/zh-cn/features/positioner.mdx rename to src/content/docs/_zh-cn/features/positioner.mdx index 49ce257908..91bb747d97 100644 --- a/src/content/docs/zh-cn/features/positioner.mdx +++ b/src/content/docs/_zh-cn/features/positioner.mdx @@ -129,7 +129,7 @@ let _ = win.as_ref().window().move_window(Position::TopRight); 默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={4} { diff --git a/src/content/docs/zh-cn/features/process.mdx b/src/content/docs/_zh-cn/features/process.mdx similarity index 100% rename from src/content/docs/zh-cn/features/process.mdx rename to src/content/docs/_zh-cn/features/process.mdx diff --git a/src/content/docs/zh-cn/features/shell.mdx b/src/content/docs/_zh-cn/features/shell.mdx similarity index 98% rename from src/content/docs/zh-cn/features/shell.mdx rename to src/content/docs/_zh-cn/features/shell.mdx index 02fccb5c67..1f4aa97c71 100644 --- a/src/content/docs/zh-cn/features/shell.mdx +++ b/src/content/docs/_zh-cn/features/shell.mdx @@ -117,7 +117,7 @@ if output.status.success() { 默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={6-23} { diff --git a/src/content/docs/zh-cn/features/single-instance.mdx b/src/content/docs/_zh-cn/features/single-instance.mdx similarity index 100% rename from src/content/docs/zh-cn/features/single-instance.mdx rename to src/content/docs/_zh-cn/features/single-instance.mdx diff --git a/src/content/docs/zh-cn/features/sql.mdx b/src/content/docs/_zh-cn/features/sql.mdx similarity index 100% rename from src/content/docs/zh-cn/features/sql.mdx rename to src/content/docs/_zh-cn/features/sql.mdx diff --git a/src/content/docs/zh-cn/features/store.mdx b/src/content/docs/_zh-cn/features/store.mdx similarity index 98% rename from src/content/docs/zh-cn/features/store.mdx rename to src/content/docs/_zh-cn/features/store.mdx index 4577ecc723..1b283550c2 100644 --- a/src/content/docs/zh-cn/features/store.mdx +++ b/src/content/docs/_zh-cn/features/store.mdx @@ -138,7 +138,7 @@ pub fn run() { 默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={6-11} { diff --git a/src/content/docs/zh-cn/features/stronghold.mdx b/src/content/docs/_zh-cn/features/stronghold.mdx similarity index 99% rename from src/content/docs/zh-cn/features/stronghold.mdx rename to src/content/docs/_zh-cn/features/stronghold.mdx index cf73c67442..646de54947 100644 --- a/src/content/docs/zh-cn/features/stronghold.mdx +++ b/src/content/docs/_zh-cn/features/stronghold.mdx @@ -190,7 +190,7 @@ await store.remove(key); 默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={8-14} { diff --git a/src/content/docs/zh-cn/features/upload.mdx b/src/content/docs/_zh-cn/features/upload.mdx similarity index 100% rename from src/content/docs/zh-cn/features/upload.mdx rename to src/content/docs/_zh-cn/features/upload.mdx diff --git a/src/content/docs/zh-cn/features/websocket.mdx b/src/content/docs/_zh-cn/features/websocket.mdx similarity index 97% rename from src/content/docs/zh-cn/features/websocket.mdx rename to src/content/docs/_zh-cn/features/websocket.mdx index d440088300..d93b8cb885 100644 --- a/src/content/docs/zh-cn/features/websocket.mdx +++ b/src/content/docs/_zh-cn/features/websocket.mdx @@ -95,7 +95,7 @@ await ws.disconnect(); 默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={6} { diff --git a/src/content/docs/zh-cn/features/window-customization.mdx b/src/content/docs/_zh-cn/features/window-customization.mdx similarity index 97% rename from src/content/docs/zh-cn/features/window-customization.mdx rename to src/content/docs/_zh-cn/features/window-customization.mdx index 4583f913d5..8b95df65ad 100644 --- a/src/content/docs/zh-cn/features/window-customization.mdx +++ b/src/content/docs/_zh-cn/features/window-customization.mdx @@ -12,8 +12,8 @@ Tauri 提供了许多自定义应用程序窗口外观的选项。您可以创 有三种方法可以修改 Window 的配置。 -- [通过 tauri.conf.json](/references/v2/config/#windowconfig) -- [通过 JavaScript API](/references/v2/js/core/namespacewindow/#window) +- [通过 tauri.conf.json](/references/config/#windowconfig) +- [通过 JavaScript API](/references/javascript/api/namespacewindow/#window) - [通过 Rust 的 Window](https://docs.rs/tauri/2.0.0-beta/tauri/window/struct.Window.html) ## 用法 @@ -50,7 +50,7 @@ Tauri 提供了许多自定义应用程序窗口外观的选项。您可以创 默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={7-8} { diff --git a/src/content/docs/zh-cn/features/window-state.mdx b/src/content/docs/_zh-cn/features/window-state.mdx similarity index 98% rename from src/content/docs/zh-cn/features/window-state.mdx rename to src/content/docs/_zh-cn/features/window-state.mdx index 0f704e509f..0b53fc92b6 100644 --- a/src/content/docs/zh-cn/features/window-state.mdx +++ b/src/content/docs/_zh-cn/features/window-state.mdx @@ -122,7 +122,7 @@ window.restore_state(StateFlags::all()); // 将从磁盘恢复窗口的状态 默认情况下,所有插件命令都被阻止,无法访问。 你必须在你的 `capabilities` 配置中定义一个权限列表。 -更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。 +更多信息请参见[访问控制列表](/zh-cn/references/acl)。 ```json title="src-tauri/capabilities/main.json" ins={4-5} { diff --git a/src/content/docs/zh-cn/guides/debug/application.mdx b/src/content/docs/_zh-cn/guides/debug/application.mdx similarity index 98% rename from src/content/docs/zh-cn/guides/debug/application.mdx rename to src/content/docs/_zh-cn/guides/debug/application.mdx index d16078a75e..7b57641b99 100644 --- a/src/content/docs/zh-cn/guides/debug/application.mdx +++ b/src/content/docs/_zh-cn/guides/debug/application.mdx @@ -108,6 +108,6 @@ tauri = { version = "...", features = ["...", "devtools"] } 核心进程由 Rust 支持,因此您可以使用 GDB 或 LLDB 进行调试。您可以按照[在 VS Code 中调试]指南学习如何使用 LLDB VS 代码扩展来调试 Tauri 应用程序的核心进程。 -[在 VS Code 中调试]: /guides/debug/vs-code +[在 VS Code 中调试]: /develop/debug/vscode [`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools [`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools diff --git a/src/content/docs/zh-cn/guides/debug/index.mdx b/src/content/docs/_zh-cn/guides/debug/index.mdx similarity index 61% rename from src/content/docs/zh-cn/guides/debug/index.mdx rename to src/content/docs/_zh-cn/guides/debug/index.mdx index 56a9d1e398..24f1d641c7 100644 --- a/src/content/docs/zh-cn/guides/debug/index.mdx +++ b/src/content/docs/_zh-cn/guides/debug/index.mdx @@ -7,6 +7,6 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - - + + diff --git a/src/content/docs/zh-cn/guides/debug/vs-code.mdx b/src/content/docs/_zh-cn/guides/debug/vs-code.mdx similarity index 100% rename from src/content/docs/zh-cn/guides/debug/vs-code.mdx rename to src/content/docs/_zh-cn/guides/debug/vs-code.mdx diff --git a/src/content/docs/zh-cn/guides/develop/development-cycle.mdx b/src/content/docs/_zh-cn/guides/develop/development-cycle.mdx similarity index 100% rename from src/content/docs/zh-cn/guides/develop/development-cycle.mdx rename to src/content/docs/_zh-cn/guides/develop/development-cycle.mdx diff --git a/src/content/docs/zh-cn/guides/develop/index.mdx b/src/content/docs/_zh-cn/guides/develop/index.mdx similarity index 100% rename from src/content/docs/zh-cn/guides/develop/index.mdx rename to src/content/docs/_zh-cn/guides/develop/index.mdx diff --git a/src/content/docs/zh-cn/guides/develop/updating-dependencies.mdx b/src/content/docs/_zh-cn/guides/develop/updating-dependencies.mdx similarity index 100% rename from src/content/docs/zh-cn/guides/develop/updating-dependencies.mdx rename to src/content/docs/_zh-cn/guides/develop/updating-dependencies.mdx diff --git a/src/content/docs/zh-cn/guides/frontend/index.mdx b/src/content/docs/_zh-cn/guides/frontend/index.mdx similarity index 67% rename from src/content/docs/zh-cn/guides/frontend/index.mdx rename to src/content/docs/_zh-cn/guides/frontend/index.mdx index 36ce073aeb..f40824ea90 100644 --- a/src/content/docs/zh-cn/guides/frontend/index.mdx +++ b/src/content/docs/_zh-cn/guides/frontend/index.mdx @@ -18,21 +18,21 @@ Tauri 与前端无关,支持大多数开箱即用的前端框架。但是, ## JavaScript - - - - - - + + + + + + ## Rust - - - - + + + + ## 配置清单 diff --git a/src/content/docs/zh-cn/guides/frontend/nextjs.mdx b/src/content/docs/_zh-cn/guides/frontend/nextjs.mdx similarity index 100% rename from src/content/docs/zh-cn/guides/frontend/nextjs.mdx rename to src/content/docs/_zh-cn/guides/frontend/nextjs.mdx diff --git a/src/content/docs/zh-cn/guides/frontend/nuxt.mdx b/src/content/docs/_zh-cn/guides/frontend/nuxt.mdx similarity index 100% rename from src/content/docs/zh-cn/guides/frontend/nuxt.mdx rename to src/content/docs/_zh-cn/guides/frontend/nuxt.mdx diff --git a/src/content/docs/zh-cn/guides/frontend/trunk.mdx b/src/content/docs/_zh-cn/guides/frontend/trunk.mdx similarity index 100% rename from src/content/docs/zh-cn/guides/frontend/trunk.mdx rename to src/content/docs/_zh-cn/guides/frontend/trunk.mdx diff --git a/src/content/docs/zh-cn/guides/index.mdx b/src/content/docs/_zh-cn/guides/index.mdx similarity index 86% rename from src/content/docs/zh-cn/guides/index.mdx rename to src/content/docs/_zh-cn/guides/index.mdx index b697f667c8..efb6506f25 100644 --- a/src/content/docs/zh-cn/guides/index.mdx +++ b/src/content/docs/_zh-cn/guides/index.mdx @@ -11,7 +11,7 @@ i18nReady: true Tauri 是一个构建适用于所有主流桌面和移动平台的轻快二进制文件的框架。开发者们可以集成任何用于创建用户界面的可以被编译成 HTML、JavaScript 和 CSS 的前端框架,同时可以在必要时使用 Rust、Swift 和 Kotlin 等语言编写后端逻辑。 -你可以使用下面的任意一个命令以利用 [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) 创建一个新的项目。请务必参考[前置要求文档](/zh-cn/guides/prerequisites/)安装所有 Tauri 必须的依赖,并阅读[前端配置指南](/zh-cn/guides/frontend/)了解推荐的前端配置方案。 +你可以使用下面的任意一个命令以利用 [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) 创建一个新的项目。请务必参考[前置要求文档](/zh-cn/start/prerequisites/)安装所有 Tauri 必须的依赖,并阅读[前端配置指南](/zh-cn/start/frontend-configuration/)了解推荐的前端配置方案。 import Cta from '../../_fragments/cta.mdx'; @@ -45,9 +45,9 @@ Tauri 利用了已经存在于每一个用户系统的 webview。Tauri 应用中 ### 灵活的架构 -由于 Tauri 使用了 web 技术,这也意味着几乎所有的前端框架都与 Tauri 兼容。[前端配置指南](/zh-cn/guides/frontend/)中涵盖了热门前端框架的通用配置;[渲染概念](/concepts/rendering)中讨论了哪些渲染技术(如单页应用 SPA 和服务端生成 SSG)最适合 Tauri。 +由于 Tauri 使用了 web 技术,这也意味着几乎所有的前端框架都与 Tauri 兼容。[前端配置指南](/zh-cn/start/frontend-configuration/)中涵盖了热门前端框架的通用配置;[渲染概念](/concepts/rendering)中讨论了哪些渲染技术(如单页应用 SPA 和服务端生成 SSG)最适合 Tauri。 -开发者可以在 JavaScript 中使用 `invoke` 函数实现 JavaScript 与 Rust 绑定,而 Swift 和 Kotlin 绑定则是作为 [Tauri 插件](/zh-cn/guides/plugins/) +开发者可以在 JavaScript 中使用 `invoke` 函数实现 JavaScript 与 Rust 绑定,而 Swift 和 Kotlin 绑定则是作为 [Tauri 插件](/zh-cn/develop/plugins/) [TAO](https://github.com/tauri-apps/tao) 被用于管理 Tauri 窗口创建,[WRY](https://github.com/tauri-apps/wry) 则被用于管理 webview 渲染。这些库由 Tauri 维护,并且如果需要 Tauri 没有暴露的更深入的系统集成时可以直接使用。 diff --git a/src/content/docs/zh-cn/guides/plugins/develop-mobile.mdx b/src/content/docs/_zh-cn/guides/plugins/develop-mobile.mdx similarity index 94% rename from src/content/docs/zh-cn/guides/plugins/develop-mobile.mdx rename to src/content/docs/_zh-cn/guides/plugins/develop-mobile.mdx index 400aa02fc5..fe82cd3bff 100644 --- a/src/content/docs/zh-cn/guides/plugins/develop-mobile.mdx +++ b/src/content/docs/_zh-cn/guides/plugins/develop-mobile.mdx @@ -5,7 +5,7 @@ i18nReady: true :::tip[插件开发] -确保你已经熟悉[插件开发](/zh-cn/guides/plugins)中的概念,因为本指南大量使用基于那篇文章的概念。 +确保你已经熟悉[插件开发](/zh-cn/develop/plugins)中的概念,因为本指南大量使用基于那篇文章的概念。 ::: @@ -14,7 +14,7 @@ i18nReady: true ## 初始化插件项目 -按照[插件开发](/zh-cn/guides/plugins/#初始化插件项目)中的步骤初始化新的插件项目。 +按照[插件开发](/zh-cn/develop/plugins/#初始化插件项目)中的步骤初始化新的插件项目。 如果你有一个现有的插件,并且想添加安卓或 iOS 的功能,你可以使用 `plugin android init` 和 `plugin ios init`来添加构建移动端插件项目,并指导你完成所需的更改。 @@ -49,7 +49,7 @@ Tauri 使用 Kotlin 作为默认的安卓插件实现,但是你也可以使用 ## 插件配置 -前往插件开发指南的[插件配置](/zh-cn/guides/plugins/#插件配置)章节以获取更多关于插件开发的配置信息。 +前往插件开发指南的[插件配置](/zh-cn/develop/plugins/#插件配置)章节以获取更多关于插件开发的配置信息。 移动设备上的插件实例具有用于插件配置的获取器: @@ -86,7 +86,7 @@ class ExamplePlugin: Plugin { - [`load`](#load):当插件被加载到 webview 中时触发 - [`onNewIntent`](#onnewintent):(仅安卓)当活动被重启时触发 -在插件开发指南中还有一些其他[插件生命周期事件](/zh-cn/guides/plugins#生命周期事件)的介绍。 +在插件开发指南中还有一些其他[插件生命周期事件](/zh-cn/develop/plugins#生命周期事件)的介绍。 ### `load` @@ -368,7 +368,7 @@ class ExamplePlugin: Plugin { -辅助函数可以通过使用 [`addPluginListener`](/references/v2/js/core/namespacecore/#addpluginlistener) 函数在 NPM 包中找到并使用。 +辅助函数可以通过使用 [`addPluginListener`](/references/javascript/api/namespacecore/#addpluginlistener) 函数在 NPM 包中找到并使用。 ```javascript import { addPluginListener, PluginListener } from '@tauri-apps/api/tauri'; diff --git a/src/content/docs/zh-cn/guides/plugins/index.mdx b/src/content/docs/_zh-cn/guides/plugins/index.mdx similarity index 94% rename from src/content/docs/zh-cn/guides/plugins/index.mdx rename to src/content/docs/_zh-cn/guides/plugins/index.mdx index 18345442be..7474c76ffb 100644 --- a/src/content/docs/zh-cn/guides/plugins/index.mdx +++ b/src/content/docs/_zh-cn/guides/plugins/index.mdx @@ -22,7 +22,7 @@ Tauri 提供了一个基于 webview 功能的视窗系统,一个在 Rust 进 一个 Tauri 插件由一个 Cargo 包和一个可选的 NPM 包(用于提供命令和事件 API 绑定)构成。 同时,一个插件项目可以包含一个 Android 库项目和/或一个用于 iOS 的 Swift 包。 -你可以查阅[移动端插件开发指南](/zh-cn/guides/plugins/develop-mobile)以获取更多关于开发安卓或 iOS 插件的信息。 +你可以查阅[移动端插件开发指南](/zh-cn/develop/plugins/develop-mobile)以获取更多关于开发安卓或 iOS 插件的信息。 {/* TODO: https://github.com/tauri-apps/tauri/issues/7749 */} @@ -31,7 +31,7 @@ Tauri 提供了一个基于 webview 功能的视窗系统,一个在 Rust 进 {/* TODO: Add link to allowlist */} Tauri 插件具有一个前缀(Rust 包使用 `tauri-plugin-` 前缀,NPM 包使用 `@tauri-apps/plugin-` 前缀),随后是插件名称。 -插件名称由插件配置中的 [`tauri.conf.json > plugin`](/references/v2/config/#pluginconfig) 和许可列表中的配置确定。 +插件名称由插件配置中的 [`tauri.conf.json > plugin`](/references/config/#pluginconfig) 和许可列表中的配置确定。 默认情况下,Tauri 会在你的插件 crate 前面加上 `tauri-plugin-`。这有助于你的插件被 Tauri 社区发现,但不是必须的。初始化新插件项目时,必须提供其名称。生成包名称将为 `tauri-plugin-{plugin-name}`,JavaScript NPM 包名称为 `tauri-plugin-{plugin-name}-api`(尽管我们建议使用 [NPM 范围](https://docs.npmjs.com/about-scopes)如果可能的话)。NPM 包的 Tauri 命名约定是 `@scope-name/plugin-{plugin-name}`。 @@ -71,7 +71,7 @@ Tauri 插件具有一个前缀(Rust 包使用 `tauri-plugin-` 前缀,NPM 包 插件可以运行用 Kotlin(或 Java)和 Swift 编写的本地移动代码。默认的插件模板包括一个使用 Kotlin 的 Android 库项目和一个 Swift 包。它包括一个示例移动端命令,展示了如何从 Rust 代码触发其执行。 -在[移动端插件开发指南](/guides/plugins/develop-mobile)中阅读更多关于开发移动端插件的信息。 +在[移动端插件开发指南](/develop/plugins/develop-mobile)中阅读更多关于开发移动端插件的信息。 ## 插件配置 @@ -124,7 +124,7 @@ pub fn init() -> TauriPlugin { - [`on_event`](#on_event): 事件循环 - [`on_drop`](#on_drop): 插件被析构时 -还有一些特定的[移动端插件生命周期事件](/zh-cn/guides/plugins/develop-mobile#生命周期事件)。 +还有一些特定的[移动端插件生命周期事件](/zh-cn/develop/plugins/develop-mobile#生命周期事件)。 ### `setup` @@ -265,7 +265,7 @@ tauri::Builder::default() ## 添加命令 命令在 `command.rs` 文件中定义。它们是常规的 Tauri 应用程序命令。它们可以直接访问 `AppHandle` 和 `Window` 实例,获取状态,并以与应用命令同样的方式获取输入。 -阅读[命令指南](/features/commands/)以获取更多关于 Tauri 命令的信息。 +阅读[命令指南](/develop/calling-rust/)以获取更多关于 Tauri 命令的信息。 这个命令展示了如何使用依赖注入访问 `AppHandle` 和 `Window` 实例,并接受两个输入参数(`on_progress` 和 `url`): @@ -304,4 +304,4 @@ export async function upload(url: string, onProgressHandler: (progress: number) ## 管理状态 -插件可以像 Tauri 应用程序一样管理状态。阅读[状态管理指南](/guides/state-management)以获取更多信息。 +插件可以像 Tauri 应用程序一样管理状态。阅读[状态管理指南](/develop/state-management)以获取更多信息。 diff --git a/src/content/docs/zh-cn/guides/prerequisites/index.mdx b/src/content/docs/_zh-cn/guides/prerequisites/index.mdx similarity index 95% rename from src/content/docs/zh-cn/guides/prerequisites/index.mdx rename to src/content/docs/_zh-cn/guides/prerequisites/index.mdx index bb61c236ba..cbdca43ac9 100644 --- a/src/content/docs/zh-cn/guides/prerequisites/index.mdx +++ b/src/content/docs/_zh-cn/guides/prerequisites/index.mdx @@ -193,7 +193,7 @@ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh 请务必重新启动终端(在某些情况下重新启动系统)以使更改生效。 -下一步:如果你想要在 Android 或 iOS 上开发应用,前往[配置移动端](#移动端配置)。否则前往[创建新项目](/guides/create/)。 +下一步:如果你想要在 Android 或 iOS 上开发应用,前往[配置移动端](#移动端配置)。否则前往[创建新项目](/start/create-project)。 ## 移动端配置 @@ -285,7 +285,7 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro -下一步:[配置 iOS](#ios)或[创建新项目](/guides/create/)。 +下一步:[配置 iOS](#ios)或[创建新项目](/start/create-project)。 ### iOS @@ -313,14 +313,14 @@ rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim brew install cocoapods ``` -下一步:[创建新项目](/guides/create/)。 +下一步:[创建新项目](/start/create-project)。 ## 故障排除 -如果你在安装过程中遇到任何问题,请务必查看[故障诊断指南](/guides/troubleshoot/)或联系 [Tauri Discord](https://discord.com/invite/tauri) 以寻求帮助。 +如果你在安装过程中遇到任何问题,请务必查看[故障诊断指南](/develop/debug/)或联系 [Tauri Discord](https://discord.com/invite/tauri) 以寻求帮助。 -现在,你已经安装了所有前置要求,你可以准备好[创建你的第一个 Tauri 应用程序](/guides/create/)! +现在,你已经安装了所有前置要求,你可以准备好[创建你的第一个 Tauri 应用程序](/start/create-project)! diff --git a/src/content/docs/zh-cn/guides/prerequisites/visual-studio-build-tools-installer.png b/src/content/docs/_zh-cn/guides/prerequisites/visual-studio-build-tools-installer.png similarity index 100% rename from src/content/docs/zh-cn/guides/prerequisites/visual-studio-build-tools-installer.png rename to src/content/docs/_zh-cn/guides/prerequisites/visual-studio-build-tools-installer.png diff --git a/src/content/docs/zh-cn/guides/test/index.mdx b/src/content/docs/_zh-cn/guides/test/index.mdx similarity index 79% rename from src/content/docs/zh-cn/guides/test/index.mdx rename to src/content/docs/_zh-cn/guides/test/index.mdx index e8046e3b3f..cb5240a97b 100644 --- a/src/content/docs/zh-cn/guides/test/index.mdx +++ b/src/content/docs/_zh-cn/guides/test/index.mdx @@ -9,5 +9,5 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - + diff --git a/src/content/docs/zh-cn/guides/test/mocking.md b/src/content/docs/_zh-cn/guides/test/mocking.md similarity index 100% rename from src/content/docs/zh-cn/guides/test/mocking.md rename to src/content/docs/_zh-cn/guides/test/mocking.md diff --git a/src/content/docs/zh-cn/guides/test/webdriver/ci.md b/src/content/docs/_zh-cn/guides/test/webdriver/ci.md similarity index 97% rename from src/content/docs/zh-cn/guides/test/webdriver/ci.md rename to src/content/docs/_zh-cn/guides/test/webdriver/ci.md index 22602d3c2d..7f17449016 100644 --- a/src/content/docs/zh-cn/guides/test/webdriver/ci.md +++ b/src/content/docs/_zh-cn/guides/test/webdriver/ci.md @@ -91,7 +91,7 @@ jobs: working-directory: webdriver/webdriverio ``` -[previously built together]: /zh-cn/guides/test/webdriver/example/webdriverio +[previously built together]: /zh-cn/test/webdriver/example/webdriverio [webdriver]: https://www.w3.org/TR/webdriver/ [`tauri-driver`]: https://crates.io/crates/tauri-driver [webdriverio]: https://webdriver.io/ diff --git a/src/content/docs/zh-cn/guides/test/webdriver/example/selenium.mdx b/src/content/docs/_zh-cn/guides/test/webdriver/example/selenium.mdx similarity index 98% rename from src/content/docs/zh-cn/guides/test/webdriver/example/selenium.mdx rename to src/content/docs/_zh-cn/guides/test/webdriver/example/selenium.mdx index d73eda8189..7c9ae4742d 100644 --- a/src/content/docs/zh-cn/guides/test/webdriver/example/selenium.mdx +++ b/src/content/docs/_zh-cn/guides/test/webdriver/example/selenium.mdx @@ -186,7 +186,7 @@ tests! With [Selenium] and some hooking up to a test suite, we just enabled e2e testing without modifying our Tauri application at all! -[示例应用程序设置]: /guides/test/webdriver/example/setup +[示例应用程序设置]: /test/webdriver/example/ [Selenium]: https://selenium.dev/ [已完成的示例项目]: https://github.com/chippers/hello_tauri [Mocha]: https://mochajs.org/ diff --git a/src/content/docs/zh-cn/guides/test/webdriver/index.mdx b/src/content/docs/_zh-cn/guides/test/webdriver/index.mdx similarity index 92% rename from src/content/docs/zh-cn/guides/test/webdriver/index.mdx rename to src/content/docs/_zh-cn/guides/test/webdriver/index.mdx index 19ab68da88..32edb18419 100644 --- a/src/content/docs/zh-cn/guides/test/webdriver/index.mdx +++ b/src/content/docs/_zh-cn/guides/test/webdriver/index.mdx @@ -40,14 +40,14 @@ Make sure to grab the version of [Microsoft Edge Driver][] that matches your Win import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - + @@ -55,7 +55,7 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components'; The above examples also comes with a CI script to test with GitHub actions, but you may still be interested in the below WebDriver CI guide as it explains the concept a bit more. - + [webdriver]: https://www.w3.org/TR/webdriver/ [`tauri-driver`]: https://crates.io/crates/tauri-driver diff --git a/src/content/docs/zh-cn/guides/upgrade-migrate/from-tauri-1.mdx b/src/content/docs/_zh-cn/guides/upgrade-migrate/from-tauri-1.mdx similarity index 99% rename from src/content/docs/zh-cn/guides/upgrade-migrate/from-tauri-1.mdx rename to src/content/docs/_zh-cn/guides/upgrade-migrate/from-tauri-1.mdx index 173c5ad88c..02e3170c03 100644 --- a/src/content/docs/zh-cn/guides/upgrade-migrate/from-tauri-1.mdx +++ b/src/content/docs/_zh-cn/guides/upgrade-migrate/from-tauri-1.mdx @@ -64,7 +64,7 @@ Tauri v2 的命令行工具包括一个 `migrate` 命令,可自动执行大部 {/* TODO: 2.0 */} -在[命令行界面参考](/references/v2/cli#migrate)中了解有关 `migrate` 命令的更多信息。 +在[命令行界面参考](/references/cli#migrate)中了解有关 `migrate` 命令的更多信息。 ## 变化摘要 @@ -94,7 +94,7 @@ Tauri v2 的命令行工具包括一个 `migrate` 命令,可自动执行大部 - `build > distDir` 被重命名为 `frontendDist`。 - `build > devPath` 被重命名为 `devUrl`。 -[Tauri 2.0 配置 API 参考资料](/references/v2/config) +[Tauri 2.0 配置 API 参考资料](/references/config) ### 全新的 Cargo 功能 @@ -1173,4 +1173,4 @@ tauri::Builder::default() `migrate` 命令行工具命令会自动解析你的授权许可列表 v1 并生成相关的许可配置文件。 -要了解有关权限和功能的更多信息,请参阅[该文档](/references/v2/acl)。 +要了解有关权限和功能的更多信息,请参阅[该文档](/references/acl)。 diff --git a/src/content/docs/zh-cn/guides/upgrade-migrate/index.mdx b/src/content/docs/_zh-cn/guides/upgrade-migrate/index.mdx similarity index 100% rename from src/content/docs/zh-cn/guides/upgrade-migrate/index.mdx rename to src/content/docs/_zh-cn/guides/upgrade-migrate/index.mdx diff --git a/src/content/docs/zh-cn/index.mdx b/src/content/docs/_zh-cn/index.mdx similarity index 100% rename from src/content/docs/zh-cn/index.mdx rename to src/content/docs/_zh-cn/index.mdx diff --git a/src/content/docs/zh-cn/references/v2/acl.mdx b/src/content/docs/_zh-cn/references/v2/acl.mdx similarity index 96% rename from src/content/docs/zh-cn/references/v2/acl.mdx rename to src/content/docs/_zh-cn/references/v2/acl.mdx index ee99a5331d..fe0b6ebac8 100644 --- a/src/content/docs/zh-cn/references/v2/acl.mdx +++ b/src/content/docs/_zh-cn/references/v2/acl.mdx @@ -2,7 +2,7 @@ title: 访问控制列表 --- -每个 Tauri [命令](/features/commands)都向 JavaScript 层公开一个 Rust 函数,该函数可以使用操作系统 API 执行任意操作,默认情况下,该层使用 Web 标准进行沙箱化。 +每个 Tauri [命令](/develop/calling-rust)都向 JavaScript 层公开一个 Rust 函数,该函数可以使用操作系统 API 执行任意操作,默认情况下,该层使用 Web 标准进行沙箱化。 如果攻击者可以执行访问 Tauri 命令的代码,这将给您的应用程序带来风险。 为了缓解这种情况,Tauri 使用访问控制列表(Access Control List;ACL)来限制插件命令的访问。默认情况下,所有插件命令都被阻止,无法访问。若要启用对应用程序所需命令的访问,必须定义需要访问的权限列表。 diff --git a/src/content/docs/about/index.mdx b/src/content/docs/about/index.mdx index f874742d92..7cd425e530 100644 --- a/src/content/docs/about/index.mdx +++ b/src/content/docs/about/index.mdx @@ -4,7 +4,7 @@ title: About Tauri :::tip -If you're looking for a quick technical overview and to start building an app then visit the [What is Tauri page](/guides). If you'd like to learn more about the project's philosophy then keep reading. +If you're looking for a quick technical overview and to start building an app then visit the [What is Tauri page](/start). If you'd like to learn more about the project's philosophy then keep reading. ::: diff --git a/src/content/docs/blog/tauri-1-4.mdx b/src/content/docs/blog/tauri-1-4.mdx index 7819fe8c50..333fa01ccf 100644 --- a/src/content/docs/blog/tauri-1-4.mdx +++ b/src/content/docs/blog/tauri-1-4.mdx @@ -46,7 +46,7 @@ The 1.4.0 release includes several NSIS bundle enhancements: - If your application is installed via WiX, the installer will prompt the user to uninstall it - Improved support to updater install modes -See the [installer customization guide](https://tauri.app/v1/guides/building/windows#customizing-the-nsis-installer-template) and [installer internationalization](https://tauri.app/v1/guides/building/windows#internationalization) for more information. +See the [installer customization guide](https://tauri.app/v1/guides/developing/windows#customizing-the-nsis-installer-template) and [installer internationalization](https://tauri.app/v1/guides/developing/windows#internationalization) for more information. ### MSRV change diff --git a/src/content/docs/concepts/inter-process-communication/brownfield.md b/src/content/docs/concepts/Inter-Process Communication/brownfield.md similarity index 97% rename from src/content/docs/concepts/inter-process-communication/brownfield.md rename to src/content/docs/concepts/Inter-Process Communication/brownfield.md index fcc4411449..a03c2f074f 100644 --- a/src/content/docs/concepts/inter-process-communication/brownfield.md +++ b/src/content/docs/concepts/Inter-Process Communication/brownfield.md @@ -1,5 +1,9 @@ --- title: Brownfield Pattern +sidebar: + badge: + text: WIP + variant: caution --- _**This is the default pattern.**_ diff --git a/src/content/docs/concepts/inter-process-communication/index.mdx b/src/content/docs/concepts/Inter-Process Communication/index.mdx similarity index 96% rename from src/content/docs/concepts/inter-process-communication/index.mdx rename to src/content/docs/concepts/Inter-Process Communication/index.mdx index c094854990..2c849ace92 100644 --- a/src/content/docs/concepts/inter-process-communication/index.mdx +++ b/src/content/docs/concepts/Inter-Process Communication/index.mdx @@ -1,5 +1,11 @@ --- title: Inter-Process Communication +sidebar: + label: Overview + order: 1 + badge: + text: WIP + variant: caution --- import { CardGrid, LinkCard } from '@astrojs/starlight/components'; diff --git a/src/content/docs/concepts/inter-process-communication/isolation.md b/src/content/docs/concepts/Inter-Process Communication/isolation.md similarity index 97% rename from src/content/docs/concepts/inter-process-communication/isolation.md rename to src/content/docs/concepts/Inter-Process Communication/isolation.md index 18da24a26a..d728f91aa8 100644 --- a/src/content/docs/concepts/inter-process-communication/isolation.md +++ b/src/content/docs/concepts/Inter-Process Communication/isolation.md @@ -1,5 +1,9 @@ --- title: Isolation Pattern +sidebar: + badge: + text: WIP + variant: caution --- The Isolation pattern is a way to intercept and modify Tauri API messages sent by the frontend before they get to Tauri Core, all with JavaScript. The secure JavaScript code that is injected by the Isolation pattern is referred to as the Isolation application. @@ -105,8 +109,8 @@ Let's assume that our main frontend `distDir` is set to `../dist`. We also outpu ``` [transport_layer_security]: https://en.wikipedia.org/wiki/Transport_Layer_Security -[security: threat models]: /concepts/security/development -[events]: /references/v2/js/core/namespaceevent +[security: threat models]: /security/development +[events]: /references/javascript/api/namespaceevent [subtlecrypto]: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto [brownfield pattern]: /concepts/inter-process-communication/brownfield -[integration testing with webdriver]: /guides/test/webdriver +[integration testing with webdriver]: /test/webdriver diff --git a/src/content/docs/concepts/architecture.mdx b/src/content/docs/concepts/architecture.mdx index 253b2d35d6..631d65bb44 100644 --- a/src/content/docs/concepts/architecture.mdx +++ b/src/content/docs/concepts/architecture.mdx @@ -1,12 +1,17 @@ --- title: Tauri Architecture +sidebar: + order: 0 + badge: + text: WIP + variant: caution --- ## Introduction Tauri is a polyglot and generic toolkit that is very composable and allows engineers to make a wide variety of applications. It is used for building applications for desktop computers using a combination of Rust tools and HTML rendered in a Webview. Apps built with Tauri can ship with any number of pieces of an optional JS API and Rust API so that webviews can control the system via message passing. Developers can extend the default API with their own functionality and bridge the Webview and Rust-based backend easily. -Tauri apps can have [custom menus](../../guides/features/menu) and [tray-type interfaces](../../guides/features/system-tray). They can be [updated](../../guides/distribution/updater) and are managed by the user's operating system as expected. They are very small because they use the OS's webview. They do not ship a runtime since the final binary is compiled from Rust. This makes the [reversing of Tauri apps not a trivial task](/concepts/security). +Tauri apps can have [custom menus](../../guides/features/menu) and [tray-type interfaces](../../guides/features/system-tray). They can be [updated](../../guides/distribution/updater) and are managed by the user's operating system as expected. They are very small because they use the OS's webview. They do not ship a runtime since the final binary is compiled from Rust. This makes the [reversing of Tauri apps not a trivial task](/security). ### What Tauri is Not @@ -22,7 +27,7 @@ Tauri is not a VM or virtualized environment. Instead, it is an application tool [View on GitHub](https://github.com/tauri-apps/tauri/tree/dev/core/tauri) -This is the major crate that holds everything together. It brings the runtimes, macros, utilities and API into one final product. It reads the [`tauri.conf.json`](/references/v2/config) file at compile time to bring in features and undertake the actual configuration of the app (and even the `Cargo.toml` file in the project's folder). It handles script injection (for polyfills / prototype revision) at runtime, hosts the API for systems interaction, and even manages the updating process. +This is the major crate that holds everything together. It brings the runtimes, macros, utilities and API into one final product. It reads the [`tauri.conf.json`](/references/config) file at compile time to bring in features and undertake the actual configuration of the app (and even the `Cargo.toml` file in the project's folder). It handles script injection (for polyfills / prototype revision) at runtime, hosts the API for systems interaction, and even manages the updating process. ### tauri-runtime @@ -52,7 +57,7 @@ Applies the macros at build-time to rig some special features needed by `cargo`. [View on GitHub](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-codegen) -Embeds, hashes, and compresses assets, including icons for the app as well as the system tray. Parses [`tauri.conf.json`](/references/v2/config) at compile time and generates the Config struct. +Embeds, hashes, and compresses assets, including icons for the app as well as the system tray. Parses [`tauri.conf.json`](/references/config) at compile time and generates the Config struct. ### tauri-runtime-wry @@ -131,7 +136,7 @@ Allows you to very quickly install Tauri in a vue-cli project. ## Plugins -[Tauri Plugin Guide](/guides/plugins) +[Tauri Plugin Guide](/develop/plugins) Generally speaking, plugins are authored by third parties (even though there may be official, supported plugins). A plugin generally does 3 things: diff --git a/src/content/docs/concepts/index.mdx b/src/content/docs/concepts/index.mdx index 28bf4fce00..c57c115497 100644 --- a/src/content/docs/concepts/index.mdx +++ b/src/content/docs/concepts/index.mdx @@ -1,5 +1,11 @@ --- -title: Concepts +title: Core Concepts +sidebar: + order: 0 + label: Overview + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; @@ -18,7 +24,7 @@ import { CardGrid, LinkCard } from '@astrojs/starlight/components'; title="Inter-Process Communication (IPC)" href="/concepts/inter-process-communication" /> - + diff --git a/src/content/docs/concepts/process-model.md b/src/content/docs/concepts/process-model.md index 96865628b6..f0619fa3dd 100644 --- a/src/content/docs/concepts/process-model.md +++ b/src/content/docs/concepts/process-model.md @@ -1,5 +1,10 @@ --- title: Process Model +sidebar: + order: 0 + badge: + text: WIP + variant: caution --- Tauri employs a multi-process architecture similar to Electron or many modern web browsers. This guide explores the reasons behind the design choice and why it is key to writing secure applications. diff --git a/src/content/docs/concepts/rendering.mdx b/src/content/docs/concepts/rendering.mdx index 0d1d78b6e6..4a6e9d3ee8 100644 --- a/src/content/docs/concepts/rendering.mdx +++ b/src/content/docs/concepts/rendering.mdx @@ -1,5 +1,10 @@ --- title: Rendering +sidebar: + order: 0 + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/concepts/size.mdx b/src/content/docs/concepts/size.mdx index 6aff96675a..64995be08d 100644 --- a/src/content/docs/concepts/size.mdx +++ b/src/content/docs/concepts/size.mdx @@ -1,5 +1,10 @@ --- title: App Size +sidebar: + order: 0 + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/guides/debug/application.mdx b/src/content/docs/develop/Debug/application.mdx similarity index 97% rename from src/content/docs/guides/debug/application.mdx rename to src/content/docs/develop/Debug/application.mdx index 1d6274c4fb..033337b9f6 100644 --- a/src/content/docs/guides/debug/application.mdx +++ b/src/content/docs/develop/Debug/application.mdx @@ -1,5 +1,9 @@ --- title: Application Debug +sidebar: + badge: + text: WIP + variant: caution --- {/* TODO: REVISE COPY TO V2 */} @@ -109,6 +113,6 @@ tauri = { version = "...", features = ["...", "devtools"] } The Core process is powered by Rust so you can use GDB or LLDB to debug it. You can follow the [Debugging in VS Code] guide to learn how to use the LLDB VS Code Extension to debug the Core Process of Tauri applications. -[debugging in vs code]: /guides/debug/vs-code +[debugging in vs code]: /develop/debug/vscode [`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools [`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools diff --git a/src/content/docs/develop/Debug/crabnebula-cloud.mdx b/src/content/docs/develop/Debug/crabnebula-cloud.mdx new file mode 100644 index 0000000000..afcbaa490b --- /dev/null +++ b/src/content/docs/develop/Debug/crabnebula-cloud.mdx @@ -0,0 +1,13 @@ +--- +title: CrabNebula Cloud +sidebar: + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + + \ No newline at end of file diff --git a/src/content/docs/develop/Debug/index.mdx b/src/content/docs/develop/Debug/index.mdx new file mode 100644 index 0000000000..404e6f6410 --- /dev/null +++ b/src/content/docs/develop/Debug/index.mdx @@ -0,0 +1,14 @@ +--- +title: Debug +sidebar: + label: Overview + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + + \ No newline at end of file diff --git a/src/content/docs/guides/debug/clion.mdx b/src/content/docs/develop/Debug/intellij.mdx similarity index 97% rename from src/content/docs/guides/debug/clion.mdx rename to src/content/docs/develop/Debug/intellij.mdx index 11eeaf58d6..14137de3da 100644 --- a/src/content/docs/guides/debug/clion.mdx +++ b/src/content/docs/develop/Debug/intellij.mdx @@ -1,5 +1,9 @@ --- -title: Debug in CLion +title: Debug in IntelliJ +sidebar: + badge: + text: WIP + variant: caution --- {/* TODO: REVISE COPY TO V2 */} diff --git a/src/content/docs/guides/debug/vs-code.mdx b/src/content/docs/develop/Debug/vscode.mdx similarity index 98% rename from src/content/docs/guides/debug/vs-code.mdx rename to src/content/docs/develop/Debug/vscode.mdx index 43812a621b..0524f4d118 100644 --- a/src/content/docs/guides/debug/vs-code.mdx +++ b/src/content/docs/develop/Debug/vscode.mdx @@ -1,5 +1,9 @@ --- title: Debug in VS Code +sidebar: + badge: + text: WIP + variant: caution --- {/* TODO: REVISE COPY TO V2 */} diff --git a/src/content/docs/guides/plugins/develop-mobile.mdx b/src/content/docs/develop/Plugins/develop-mobile.mdx similarity index 94% rename from src/content/docs/guides/plugins/develop-mobile.mdx rename to src/content/docs/develop/Plugins/develop-mobile.mdx index 30e77d79b2..94a1a60068 100644 --- a/src/content/docs/guides/plugins/develop-mobile.mdx +++ b/src/content/docs/develop/Plugins/develop-mobile.mdx @@ -5,7 +5,7 @@ i18nReady: true :::tip[Plugin Development] -Be sure that you're familiar with the concepts covered in the [Plugin Development guide](/guides/plugins) as many concepts in this guide build on top of foundations covered there. +Be sure that you're familiar with the concepts covered in the [Plugin Development guide](/develop/plugins) as many concepts in this guide build on top of foundations covered there. ::: @@ -13,7 +13,7 @@ Plugins can run native mobile code written in Kotlin (or Java) and Swift. The de ## Initialize Plugin Project -Follow the steps in the [Plugin Development guide](/guides/plugins#initialize-plugin-project) to initialize a new plugin project. +Follow the steps in the [Plugin Development guide](/develop/plugins#initialize-plugin-project) to initialize a new plugin project. If you have an existing plugin and would like to add Android or iOS capabilities to it, you can use `plugin android init` and `plugin ios init` to bootstrap the mobile library projects and guide you through the changes needed. @@ -48,7 +48,7 @@ The plugin is defined as a [Swift package](https://www.swift.org/package-manager ## Plugin Configuration -Refer to the [Plugin Configuration section](/guides/plugins/#plugin-configuration) of the Plugin Development guide for more details on developing plugin configurations. +Refer to the [Plugin Configuration section](/develop/plugins/#plugin-configuration) of the Plugin Development guide for more details on developing plugin configurations. The plugin instance on mobile has a getter for the plugin configuration: @@ -89,7 +89,7 @@ Plugins can hook into several lifecycle events: - [load](#load): When the plugin is loaded into the web view - [onNewIntent](#onnewintent): Android only, when the activity is re-launched -There are also the additional [lifecycle events for plugins](/guides/plugins#lifecycle-events) in the Plugin Development guide. +There are also the additional [lifecycle events for plugins](/develop/plugins#lifecycle-events) in the Plugin Development guide. ### load @@ -455,7 +455,7 @@ class ExamplePlugin: Plugin { -The helper functionss can then be called from the NPM package by using the [`addPluginListener`](/references/v2/js/core/namespacecore/#addpluginlistener) helper function: +The helper functionss can then be called from the NPM package by using the [`addPluginListener`](/references/javascript/api/namespacecore/#addpluginlistener) helper function: ```javascript import { addPluginListener, PluginListener } from '@tauri-apps/api/tauri'; diff --git a/src/content/docs/guides/plugins/index.mdx b/src/content/docs/develop/Plugins/index.mdx similarity index 96% rename from src/content/docs/guides/plugins/index.mdx rename to src/content/docs/develop/Plugins/index.mdx index 8a41bd42b6..5b655787b5 100644 --- a/src/content/docs/guides/plugins/index.mdx +++ b/src/content/docs/develop/Plugins/index.mdx @@ -1,6 +1,8 @@ --- title: Plugin Development i18nReady: true +sidebar: + label: Overview --- {/* TODO: Add a CLI section */} @@ -19,7 +21,7 @@ Plugins are able to hook into the Tauri lifecycle, expose Rust code that relies Tauri offers a windowing system with web view functionality, a way to send messages between the Rust process and the web view, and an event system along with several tools to enhance the development experience. By design, the Tauri core does not contain features not needed by everyone. Instead it offers a mechanism to add external functionalities into a Tauri application called plugins. -A Tauri plugin is composed of a Cargo crate and an optional NPM package that provides API bindings for its commands and events. Additionally, a plugin project can include an Android library project and a Swift package for iOS. You can learn more about developing plugins for Android and iOS in the [Mobile Plugin Development guide](/guides/plugins/develop-mobile). +A Tauri plugin is composed of a Cargo crate and an optional NPM package that provides API bindings for its commands and events. Additionally, a plugin project can include an Android library project and a Swift package for iOS. You can learn more about developing plugins for Android and iOS in the [Mobile Plugin Development guide](/develop/plugins/develop-mobile). {/* TODO: https://github.com/tauri-apps/tauri/issues/7749 */} @@ -27,7 +29,7 @@ A Tauri plugin is composed of a Cargo crate and an optional NPM package that pro {/* TODO: Add link to allowlist */} -Tauri plugins have a prefix (`tauri-plugin-` prefix for the Rust crate name and `@tauri-apps/plugin-` for the NPM package) followed by the plugin name. The plugin name is specified on the plugin configuration under [`tauri.conf.json > plugin`](/references/v2/config/#pluginconfig) and on the allowlist configuration. +Tauri plugins have a prefix (`tauri-plugin-` prefix for the Rust crate name and `@tauri-apps/plugin-` for the NPM package) followed by the plugin name. The plugin name is specified on the plugin configuration under [`tauri.conf.json > plugin`](/references/config/#pluginconfig) and on the allowlist configuration. By default Tauri prefixes your plugin crate with `tauri-plugin-`. This helps your plugin to be discovered by the Tauri community, but is not not a requirement. When initializing a new plugin project, you must provide its name. The generated crate name will be `tauri-plugin-{plugin-name}` and the JavaScript NPM package name will be `tauri-plugin-{plugin-name}-api` (although we recommend using an [NPM scope](https://docs.npmjs.com/about-scopes) if possible). The Tauri naming convention for NPM packages is `@scope-name/plugin-{plugin-name}`. @@ -70,7 +72,7 @@ If you have an existing plugin and would like to add Android or iOS capabilities Plugins can run native mobile code written in Kotlin (or Java) and Swift. The default plugin template includes an Android library project using Kotlin and a Swift package. It includes an example mobile command showing how to trigger its execution from Rust code. -Read more about developing plugins for mobile in the [Mobile Plugin Development guide](/guides/plugins/develop-mobile). +Read more about developing plugins for mobile in the [Mobile Plugin Development guide](/develop/plugins/develop-mobile). ## Plugin Configuration @@ -122,7 +124,7 @@ Plugins can hook into several lifecycle events: - [on_event](#on_event): Event loop events - [on_drop](#on_drop): Plugin is being deconstructed -There are additional [lifecycle events for mobile plugins](/guides/plugins/develop-mobile#lifecycle-events). +There are additional [lifecycle events for mobile plugins](/develop/plugins/develop-mobile#lifecycle-events). ### setup @@ -261,7 +263,7 @@ tauri::Builder::default() ## Adding Commands -Commands are defined in the `commands.rs` file. They are regular Tauri applications commands. They can access the AppHandle and Window instances directly, access state, and take input the same way as application commands. Read the [Commands guide](/features/commands) for more details on Tauri commands. +Commands are defined in the `commands.rs` file. They are regular Tauri applications commands. They can access the AppHandle and Window instances directly, access state, and take input the same way as application commands. Read the [Commands guide](/develop/calling-rust) for more details on Tauri commands. This command shows how to get access to the `AppHandle` and `Window` instance via dependency injection, and takes two input parameters (`on_progress` and `url`): @@ -340,7 +342,7 @@ pub struct Entry { ###### Command Scope -Your plugin consumer can define a scope for a specific command in their capability file (see the [documentation](/references/v2/acl#scopes)). +Your plugin consumer can define a scope for a specific command in their capability file (see the [documentation](/references/acl#scopes)). You can read the command-specific scope with the [`tauri::ipc::CommandScope`](https://docs.rs/tauri/2.0.0-beta/tauri/ipc/struct.CommandScope.html) struct: ```rust title="src/commands.rs" @@ -454,8 +456,8 @@ fn main() { } ``` -See the [Access Control List](/references/v2/acl) documentation for more information. +See the [Access Control List](/references/acl) documentation for more information. ## Managing State -A plugin can manage state in the same way a Tauri application does. Read the [State Management guide](/guides/state-management) for more information. +A plugin can manage state in the same way a Tauri application does. Read the [State Management guide](/develop/state-management) for more information. diff --git a/src/content/docs/features/commands.mdx b/src/content/docs/develop/calling-rust.mdx similarity index 99% rename from src/content/docs/features/commands.mdx rename to src/content/docs/develop/calling-rust.mdx index 59cd067d7c..f6ac1b0cd1 100644 --- a/src/content/docs/features/commands.mdx +++ b/src/content/docs/develop/calling-rust.mdx @@ -1,5 +1,10 @@ --- title: Calling Rust from the Frontend +sidebar: + order: 1 + badge: + text: WIP + variant: caution --- Tauri provides a simple yet powerful `command` system for calling Rust functions from your web app. diff --git a/src/content/docs/references/configuration-files.md b/src/content/docs/develop/configuration-files.md similarity index 90% rename from src/content/docs/references/configuration-files.md rename to src/content/docs/develop/configuration-files.md index 22ed719115..c26a445579 100644 --- a/src/content/docs/references/configuration-files.md +++ b/src/content/docs/develop/configuration-files.md @@ -1,5 +1,10 @@ --- title: Configuration Files +sidebar: + order: 1 + badge: + text: WIP + variant: caution --- Since Tauri is a toolkit for building applications there can be many files to configure project settings. Some common files that you may run across are `tauri.conf.json`, `package.json` and `Cargo.toml`. We briefly explain each on this page to help point you in the right direction for which file to modify. @@ -8,7 +13,7 @@ Since Tauri is a toolkit for building applications there can be many files to co The file can be either `tauri.conf.json`, `tauri.conf.json5`, or `Tauri.toml`. The default is `tauri.conf.json`. See the note below for more information. -This is the file used by the Tauri process. You can define build settings (such as the [command run before `tauri build`][before-build-command] or [`tauri dev`][before-dev-command]), set the [name](/references/v2/config#productname), [version of your app](/references/v2/config#version), [control the Tauri process][/references/v2/config#configuration-structure], and configure any plugin settings. You can find all of the options in the [`tauri.conf.json` API reference]. +This is the file used by the Tauri process. You can define build settings (such as the [command run before `tauri build`][before-build-command] or [`tauri dev`][before-dev-command]), set the [name](/references/config#productname), [version of your app](/references/config#version), [control the Tauri process][/references/config#configuration-structure], and configure any plugin settings. You can find all of the options in the [`tauri.conf.json` API reference]. :::note @@ -108,11 +113,11 @@ In addition to the `package.json` file you may see either a `yarn.lock` file or To learn more about `package.json` you can read more in the [official documentation][npm-package]. -[`tauri.conf.json` api reference]: /references/v2/config -[before-build-command]: /references/v2/config#beforebuildcommand +[`tauri.conf.json` api reference]: /references/config +[before-build-command]: /references/config#beforebuildcommand [semantic versioning]: https://semver.org [cargo-manifest]: https://doc.rust-lang.org/cargo/reference/manifest.html [npm-package]: https://docs.npmjs.com/cli/v8/configuring-npm/package-json -[before-dev-command]: /references/v2/config#beforedevcommand-1 -[package-config]: /references/v2/config#packageconfig -[tauri-config]: /references/v2/config#tauriconfig +[before-dev-command]: /references/config#beforedevcommand-1 +[package-config]: /references/config#packageconfig +[tauri-config]: /references/config#tauriconfig diff --git a/src/content/docs/guides/develop/development-cycle.mdx b/src/content/docs/develop/development-cycle.mdx similarity index 96% rename from src/content/docs/guides/develop/development-cycle.mdx rename to src/content/docs/develop/development-cycle.mdx index 8d91f64a76..e8ff9a4cc2 100644 --- a/src/content/docs/guides/develop/development-cycle.mdx +++ b/src/content/docs/develop/development-cycle.mdx @@ -1,5 +1,10 @@ --- title: Development Cycle +sidebar: + order: 1 + badge: + text: WIP + variant: caution --- {/* TODO: REVISE COPY TO V2 */} diff --git a/src/content/docs/develop/index.mdx b/src/content/docs/develop/index.mdx new file mode 100644 index 0000000000..75f783f07c --- /dev/null +++ b/src/content/docs/develop/index.mdx @@ -0,0 +1,16 @@ +--- +title: Develop +description: Core concepts for developing with Tauri. +sidebar: + order: 0 + label: Overview + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + + \ No newline at end of file diff --git a/src/content/docs/guides/state-management.mdx b/src/content/docs/develop/state-management.mdx similarity index 95% rename from src/content/docs/guides/state-management.mdx rename to src/content/docs/develop/state-management.mdx index f08342fcfc..301a949123 100644 --- a/src/content/docs/guides/state-management.mdx +++ b/src/content/docs/develop/state-management.mdx @@ -1,5 +1,7 @@ --- title: State Management +sidebar: + order: 1 --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/guides/develop/updating-dependencies.mdx b/src/content/docs/develop/updating-dependencies.mdx similarity index 96% rename from src/content/docs/guides/develop/updating-dependencies.mdx rename to src/content/docs/develop/updating-dependencies.mdx index 28b6dfb4d3..abc02f14ad 100644 --- a/src/content/docs/guides/develop/updating-dependencies.mdx +++ b/src/content/docs/develop/updating-dependencies.mdx @@ -1,5 +1,10 @@ --- title: Updating Dependencies +sidebar: + order: 1 + badge: + text: WIP + variant: caution --- {/* TODO: REVISE COPY TO V2 */} diff --git a/src/content/docs/distribute/Pipelines/github.mdx b/src/content/docs/distribute/Pipelines/github.mdx new file mode 100644 index 0000000000..aa3f057ee3 --- /dev/null +++ b/src/content/docs/distribute/Pipelines/github.mdx @@ -0,0 +1,12 @@ +--- +title: GitHub +sidebar: + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/distribute/Pipelines/gitlab.mdx b/src/content/docs/distribute/Pipelines/gitlab.mdx new file mode 100644 index 0000000000..7d109ee55a --- /dev/null +++ b/src/content/docs/distribute/Pipelines/gitlab.mdx @@ -0,0 +1,12 @@ +--- +title: GitLab +sidebar: + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/distribute/Pipelines/index.mdx b/src/content/docs/distribute/Pipelines/index.mdx new file mode 100644 index 0000000000..e735c050d2 --- /dev/null +++ b/src/content/docs/distribute/Pipelines/index.mdx @@ -0,0 +1,13 @@ +--- +title: Overview +sidebar: + order: 10 + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/distribute/app-store.mdx b/src/content/docs/distribute/app-store.mdx new file mode 100644 index 0000000000..1b1aee4078 --- /dev/null +++ b/src/content/docs/distribute/app-store.mdx @@ -0,0 +1,13 @@ +--- +title: App Store +sidebar: + order: 1 + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/distribute/debian.mdx b/src/content/docs/distribute/debian.mdx new file mode 100644 index 0000000000..97414c317a --- /dev/null +++ b/src/content/docs/distribute/debian.mdx @@ -0,0 +1,13 @@ +--- +title: Debian +sidebar: + order: 1 + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/distribute/index.mdx b/src/content/docs/distribute/index.mdx new file mode 100644 index 0000000000..babed8ca3e --- /dev/null +++ b/src/content/docs/distribute/index.mdx @@ -0,0 +1,14 @@ +--- +title: Distribute +sidebar: + order: 0 + label: Overview + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/distribute/play-store.mdx b/src/content/docs/distribute/play-store.mdx new file mode 100644 index 0000000000..2313d0ee51 --- /dev/null +++ b/src/content/docs/distribute/play-store.mdx @@ -0,0 +1,13 @@ +--- +title: Play Store +sidebar: + order: 1 + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/distribute/steam.mdx b/src/content/docs/distribute/steam.mdx new file mode 100644 index 0000000000..be89fe7923 --- /dev/null +++ b/src/content/docs/distribute/steam.mdx @@ -0,0 +1,13 @@ +--- +title: Steam +sidebar: + order: 1 + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/features/_authenticator.mdx b/src/content/docs/features/_authenticator.mdx index 734dd9cd4e..f768848262 100644 --- a/src/content/docs/features/_authenticator.mdx +++ b/src/content/docs/features/_authenticator.mdx @@ -10,6 +10,6 @@ import PluginLinks from '@components/PluginLinks.astro'; -Based on https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/authenticator +Based on https://github.com/tauri-apps/plugins-workspace/tree/plugins/authenticator diff --git a/src/content/docs/features/autostart.mdx b/src/content/docs/features/autostart.mdx index 54e4778b4c..5430de0beb 100644 --- a/src/content/docs/features/autostart.mdx +++ b/src/content/docs/features/autostart.mdx @@ -1,6 +1,10 @@ --- title: Autostart description: Automatically launch your app at system startup. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -124,7 +128,7 @@ fn run() { By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" { diff --git a/src/content/docs/features/barcode-scanner.mdx b/src/content/docs/features/barcode-scanner.mdx index ba3aa6489f..3adadacadc 100644 --- a/src/content/docs/features/barcode-scanner.mdx +++ b/src/content/docs/features/barcode-scanner.mdx @@ -89,7 +89,7 @@ scan({ windowed: true, formats: [Format.QRCode] }); By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/mobile.json" { diff --git a/src/content/docs/features/biometric.mdx b/src/content/docs/features/biometric.mdx index e8496bffe7..55002b0a21 100644 --- a/src/content/docs/features/biometric.mdx +++ b/src/content/docs/features/biometric.mdx @@ -1,6 +1,10 @@ --- title: Biometric description: Prompt the user for biometric authentication on Android and iOS. +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; @@ -10,6 +14,6 @@ import PluginLinks from '@components/PluginLinks.astro'; -Based on https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/biometric +Based on https://github.com/tauri-apps/plugins-workspace/tree/plugins/biometric diff --git a/src/content/docs/features/cli.mdx b/src/content/docs/features/cli.mdx index e326a1372a..75e4066b11 100644 --- a/src/content/docs/features/cli.mdx +++ b/src/content/docs/features/cli.mdx @@ -1,6 +1,10 @@ --- title: Command Line Interface (CLI) description: Parse arguments from the command line interface. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -264,7 +268,7 @@ fn run() { By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={6} { diff --git a/src/content/docs/features/clipboard.mdx b/src/content/docs/features/clipboard.mdx index 2e4ddb29fa..6c9e181bf8 100644 --- a/src/content/docs/features/clipboard.mdx +++ b/src/content/docs/features/clipboard.mdx @@ -1,6 +1,10 @@ --- title: Clipboard description: Read and write to the system clipboard. +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/features/deep-linking.mdx b/src/content/docs/features/deep-linking.mdx index 542c6d8d27..b36aa841bd 100644 --- a/src/content/docs/features/deep-linking.mdx +++ b/src/content/docs/features/deep-linking.mdx @@ -201,7 +201,7 @@ fn run() { By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={9} { diff --git a/src/content/docs/features/dialog.mdx b/src/content/docs/features/dialog.mdx index 82d96836ad..22d9f78150 100644 --- a/src/content/docs/features/dialog.mdx +++ b/src/content/docs/features/dialog.mdx @@ -83,7 +83,7 @@ in Rust: ### JavaScript -See all [Dialog Options](/references/v2/js/dialog/) at the JavaScript API reference. +See all [Dialog Options](/references/javascript/dialog/) at the JavaScript API reference. {/* ASK */} diff --git a/src/content/docs/features/file-system.mdx b/src/content/docs/features/file-system.mdx index 97dcb785be..8e0614d7ef 100644 --- a/src/content/docs/features/file-system.mdx +++ b/src/content/docs/features/file-system.mdx @@ -1,6 +1,10 @@ --- title: File System description: Access the file system. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -119,13 +123,13 @@ fn run() { This module prevents path traversal, not allowing absolute paths or parent dir components (i.e. `/usr/path/to/file` or `../path/to/file` paths are not allowed). Paths accessed with this API must be relative to one of the base directories so if you need access to arbitrary file system paths, you must write such logic on the core layer instead. -See [@tauri-apps/plugin-fs - Security](/references/v2/js/fs/#security) for more information. +See [@tauri-apps/plugin-fs - Security](/references/javascript/fs/#security) for more information. ## Permissions By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={7-11} { diff --git a/src/content/docs/features/global-shortcut.mdx b/src/content/docs/features/global-shortcut.mdx index bd9f93835e..fff32947f2 100644 --- a/src/content/docs/features/global-shortcut.mdx +++ b/src/content/docs/features/global-shortcut.mdx @@ -1,6 +1,10 @@ --- title: Global Shortcut description: Register global shortcuts. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -128,7 +132,7 @@ fn run() { By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={7-9} { diff --git a/src/content/docs/features/http-client.mdx b/src/content/docs/features/http-client.mdx index a237a2f6b4..494c61e979 100644 --- a/src/content/docs/features/http-client.mdx +++ b/src/content/docs/features/http-client.mdx @@ -1,6 +1,10 @@ --- title: HTTP Client description: Access the HTTP client written in Rust. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -81,7 +85,7 @@ The http plugin is available in both as an JavaScript API and in Rust as a [reqw } ``` - For more information, please see the documentation for [Access Control Lists](/references/v2/acl/) + For more information, please see the documentation for [Access Control Lists](/references/acl/) 2. Send a request diff --git a/src/content/docs/features/index.mdx b/src/content/docs/features/index.mdx index 9909851fad..30e426f954 100644 --- a/src/content/docs/features/index.mdx +++ b/src/content/docs/features/index.mdx @@ -1,6 +1,8 @@ --- -title: List of Features & Recipes +title: Features & Recipes i18nReady: true +sidebar: + label: Overview --- import { LinkCard } from '@astrojs/starlight/components'; diff --git a/src/content/docs/features/localhost.mdx b/src/content/docs/features/localhost.mdx index 6e57386ae8..100077e78b 100644 --- a/src/content/docs/features/localhost.mdx +++ b/src/content/docs/features/localhost.mdx @@ -1,6 +1,10 @@ --- title: Localhost description: Use a localhost server in production apps. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; diff --git a/src/content/docs/features/logging.mdx b/src/content/docs/features/logging.mdx index 632bae7c7f..3f2b4c0430 100644 --- a/src/content/docs/features/logging.mdx +++ b/src/content/docs/features/logging.mdx @@ -1,6 +1,10 @@ --- title: Logging description: Configurable logging. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -124,7 +128,7 @@ Install the log plugin to get started. By default, all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={6} { diff --git a/src/content/docs/features/nfc.mdx b/src/content/docs/features/nfc.mdx index 91d3f7d8c5..12c6900f5c 100644 --- a/src/content/docs/features/nfc.mdx +++ b/src/content/docs/features/nfc.mdx @@ -1,6 +1,10 @@ --- title: NFC description: Read and write NFC tags on Android and iOS. +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; @@ -10,6 +14,6 @@ import PluginLinks from '@components/PluginLinks.astro'; -Based on https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/nfc +Based on https://github.com/tauri-apps/plugins-workspace/tree/plugins/nfc diff --git a/src/content/docs/features/os-info.mdx b/src/content/docs/features/os-info.mdx index 2b6b6baa82..304f987d77 100644 --- a/src/content/docs/features/os-info.mdx +++ b/src/content/docs/features/os-info.mdx @@ -1,6 +1,10 @@ --- title: OS Information description: Read information about the operating system. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -60,7 +64,7 @@ Install the OS Information plugin to get started. ## Usage -With this plugin you can query multiple information from current operational system. See all available functions in the [JavaScript API](/references/v2/js/os/) or [Rust API](https://docs.rs/tauri-plugin-os/) references. +With this plugin you can query multiple information from current operational system. See all available functions in the [JavaScript API](/references/javascript/os/) or [Rust API](https://docs.rs/tauri-plugin-os/) references. {/* TODO: Link to which language to use, frontend vs. backend guide when it's made */} @@ -96,7 +100,7 @@ println!("Platform: {}", platform); By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={4-6} { diff --git a/src/content/docs/features/persisted-scope.mdx b/src/content/docs/features/persisted-scope.mdx index 32c73e53ec..979dac21a4 100644 --- a/src/content/docs/features/persisted-scope.mdx +++ b/src/content/docs/features/persisted-scope.mdx @@ -1,6 +1,10 @@ --- title: Persisted Scope description: Persist runtime scope changes on the filesystem. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; diff --git a/src/content/docs/features/positioner.mdx b/src/content/docs/features/positioner.mdx index b5a6ff5e59..ab21231e74 100644 --- a/src/content/docs/features/positioner.mdx +++ b/src/content/docs/features/positioner.mdx @@ -1,6 +1,10 @@ --- title: Positioner description: Move windows to common locations. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -130,7 +134,7 @@ let _ = win.as_ref().window().move_window(Position::TopRight); By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={4} { diff --git a/src/content/docs/features/process.mdx b/src/content/docs/features/process.mdx index af8edcd123..963ad27fc8 100644 --- a/src/content/docs/features/process.mdx +++ b/src/content/docs/features/process.mdx @@ -1,6 +1,10 @@ --- title: Process description: Access the current process. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; diff --git a/src/content/docs/features/shell.mdx b/src/content/docs/features/shell.mdx index ce75e741d9..a8c749514b 100644 --- a/src/content/docs/features/shell.mdx +++ b/src/content/docs/features/shell.mdx @@ -1,6 +1,10 @@ --- title: Shell description: Access the system shell to manage files and URLs using their default application and to spawn child processes. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -117,7 +121,7 @@ if output.status.success() { By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={6-23} { diff --git a/src/content/docs/features/single-instance.mdx b/src/content/docs/features/single-instance.mdx index 387d885116..6d62726420 100644 --- a/src/content/docs/features/single-instance.mdx +++ b/src/content/docs/features/single-instance.mdx @@ -1,6 +1,10 @@ --- title: Single Instance description: Ensure that a single instance of your Tauri app is running at a time. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; diff --git a/src/content/docs/features/sql.mdx b/src/content/docs/features/sql.mdx index b22dd3994f..cc628ca0b1 100644 --- a/src/content/docs/features/sql.mdx +++ b/src/content/docs/features/sql.mdx @@ -1,6 +1,10 @@ --- title: SQL description: Tauri Plugin providing an interface for the frontend to communicate with SQL databases through sqlx. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; diff --git a/src/content/docs/features/store.mdx b/src/content/docs/features/store.mdx index 4c0c843b41..0c3e83e98f 100644 --- a/src/content/docs/features/store.mdx +++ b/src/content/docs/features/store.mdx @@ -1,6 +1,10 @@ --- title: Store description: Persistent key value storage. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -138,7 +142,7 @@ pub fn run() { By default, all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={6-11} { diff --git a/src/content/docs/features/stronghold.mdx b/src/content/docs/features/stronghold.mdx index d250e4df10..5d5d401bf7 100644 --- a/src/content/docs/features/stronghold.mdx +++ b/src/content/docs/features/stronghold.mdx @@ -1,6 +1,10 @@ --- title: Stronghold description: Encrypted, secure database. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -190,7 +194,7 @@ await store.remove(key); By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={8-14} { diff --git a/src/content/docs/features/updater.mdx b/src/content/docs/features/updater.mdx index 0c694d4b0e..9087382efc 100644 --- a/src/content/docs/features/updater.mdx +++ b/src/content/docs/features/updater.mdx @@ -1,6 +1,10 @@ --- title: Updater description: In-app updates for Tauri applications. +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; @@ -10,5 +14,5 @@ import PluginLinks from '@components/PluginLinks.astro'; Based on - https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/updater + https://github.com/tauri-apps/plugins-workspace/tree/plugins/updater diff --git a/src/content/docs/features/upload.mdx b/src/content/docs/features/upload.mdx index ff6958de26..0c26cd3f3c 100644 --- a/src/content/docs/features/upload.mdx +++ b/src/content/docs/features/upload.mdx @@ -1,6 +1,10 @@ --- title: Upload description: File uploads through HTTP. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; diff --git a/src/content/docs/features/websocket.mdx b/src/content/docs/features/websocket.mdx index e8493f364a..97e54cfa18 100644 --- a/src/content/docs/features/websocket.mdx +++ b/src/content/docs/features/websocket.mdx @@ -1,6 +1,10 @@ --- title: Websocket description: Open a WebSocket connection using a Rust client in JavaScript. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -95,7 +99,7 @@ await ws.disconnect(); By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={6} { diff --git a/src/content/docs/features/window-customization.mdx b/src/content/docs/features/window-customization.mdx index 873437f0e3..ca7fc06bd2 100644 --- a/src/content/docs/features/window-customization.mdx +++ b/src/content/docs/features/window-customization.mdx @@ -2,6 +2,10 @@ title: Window Customization tableOfContents: maxHeadingLevel: 4 +sidebar: + badge: + text: WIP + variant: caution --- import { Icon } from '@astrojs/starlight/components'; @@ -12,8 +16,8 @@ Tauri provides lots of options for customizing the look and feel of your app's w There are three ways to change the window configuration: -- [Through tauri.conf.json](/references/v2/config/#windowconfig) -- [Through the JavaScript API](/references/v2/js/core/namespacewindow/#window) +- [Through tauri.conf.json](/references/config/#windowconfig) +- [Through the JavaScript API](/references/javascript/api/namespacewindow/#window) - [Through the Window in Rust](https://docs.rs/tauri/2.0.0-beta/tauri/window/struct.Window.html) ## Usage @@ -49,7 +53,7 @@ Add window permissions in capability file. By default, all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={7-8} { diff --git a/src/content/docs/features/window-state.mdx b/src/content/docs/features/window-state.mdx index 5b336507b2..487dff6b2f 100644 --- a/src/content/docs/features/window-state.mdx +++ b/src/content/docs/features/window-state.mdx @@ -1,6 +1,10 @@ --- title: Window State description: Persist window sizes and positions. +sidebar: + badge: + text: WIP + variant: caution --- import PluginLinks from '@components/PluginLinks.astro'; @@ -126,7 +130,7 @@ window.restore_state(StateFlags::all()); // will restore the window's state from By default all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. -See [Access Control List](/references/v2/acl) for more information. +See [Access Control List](/references/acl) for more information. ```json title="src-tauri/capabilities/main.json" ins={4-5} { diff --git a/src/content/docs/guides/TEMPLATE.md b/src/content/docs/guides/TEMPLATE.md deleted file mode 100644 index fab034eeac..0000000000 --- a/src/content/docs/guides/TEMPLATE.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Guide Template -draft: true ---- diff --git a/src/content/docs/guides/build.mdx b/src/content/docs/guides/build.mdx deleted file mode 100644 index 6598541f03..0000000000 --- a/src/content/docs/guides/build.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Building ---- - -import Stub from '@components/Stub.astro'; - - - -- Building & Code Signing for... - - Linux - - macOS - - Windows - - Android `pnpm tauri [ios|android] build` - - iOS -- Updater (link to recipe) - - diff --git a/src/content/docs/guides/create/existing-project.mdx b/src/content/docs/guides/create/existing-project.mdx deleted file mode 100644 index ac4cfb1205..0000000000 --- a/src/content/docs/guides/create/existing-project.mdx +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Existing Project ---- - -import Stub from '@components/Stub.astro'; - - diff --git a/src/content/docs/guides/create/index.mdx b/src/content/docs/guides/create/index.mdx deleted file mode 100644 index 4b53c33e69..0000000000 --- a/src/content/docs/guides/create/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -title: Create a Project ---- - -import { Card, Steps } from '@astrojs/starlight/components'; -import Stub from '@components/Stub.astro'; -import Cta from '../../_fragments/cta.mdx'; -import CommandTabs from '@components/CommandTabs.astro'; - - - -{/* - Create a new app using `create-tauri-app` */} -{/* - Manually create the app using the Tauri CLI */} - -- Add mobile to an existing project (revise what's here [integrate mobile](/guides/create/mobile)) -- Frontend framework-specific guides (right now limiting to React, Angular, Vue, Svelte, and Solid) - - - -One thing that makes Tauri so flexible is it's ability to work with virtually any frontend framework. We've created the [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) utility to help you create a new Tauri project using one of the officially maintained framework templates. - -`create-tauri-app` currently includes templates for vanilla (HTML, CSS and JavaScript without a framework), [Vue.js](https://vuejs.org), [Svelte](https://svelte.dev), [React](https://reactjs.org/), [SolidJS](https://www.solidjs.com/), [Angular](https://angular.io/), [Preact](https://preactjs.com/), [Yew](https://yew.rs/), [Leptos](https://github.com/leptos-rs/leptos), and [Sycamore](https://sycamore-rs.netlify.app/). You can also find or add your own community templates and frameworks in the [Awesome Tauri repo](https://github.com/tauri-apps/awesome-tauri). - -Alternatively, you can [add Tauri to an existing project](/guides/create/existing-project) to quickly turn your existing codebase into a Tauri app. - -## Using `create-tauri-app` - -To get started using `create-tauri-app` run one of the below commands in the folder you'd like to setup your project. If you're not sure which command to use we recommend the Bash command on Linux and macOS and the PowerShell command on Windows. - - - -Follow along with the prompts to choose your project name, frontend language, package manager, and frontend framework, and frontend framework options if applicable. - -:::tip[Not sure what to choose?] - -We recommend starting with the vanilla template (HTML, CSS, and JavaScript without a frontend framework) to get started. You can always [integrate a frontend framework](/guides/create/existing-project) later. - -- Choose which language to use for your frontend: `TypeScript / JavaScript` -- Choose your package manager: `pnpm` -- Choose your UI template: `Vanilla` -- Choose your UI flavor: `TypeScript` - -::: - -{/* TODO: Can CTA offer to install the deps? */} - -After `create-tauri-app` has complete you can navigate into your project's folder, install dependencies, then use the [Tauri CLI](/references/v2/cli) to start the development server: - - - -You'll now see a new window open with your app running. - -**Congratulations!** You've made your Tauri app! 🚀 - -## Manual Setup using the Tauri CLI - -To get started manually creating a new Tauri project using the Tauri CLI, follow the steps below: - - - - 1. First install Tauri's CLI tool globally using your package manager of choice: - - - - 2. Create a new directory for your project and initialize a your app. You can use any frontend framework you prefer, such as Next.js, Nuxt, Svelte, Yew, Leptos, or just plain HTML, CSS, and JavaScript. - - - - 3. In your project directory, initialize Tauri: - - ```bash - tauri init - ``` - - After running the command it will display a prompt asking you for different options. Here you have an example: - - ```md - ✔ What is your app name? my-tauri-app - ✔ What should the window title be? my-tauri-app - ✔ Where are your web assets (HTML/CSS/JS) located, relative to the "/src-tauri/tauri.conf.json" file that will be created? ../build - ✔ What is the url of your dev server? http://localhost:3000 - ✔ What is your frontend dev command? pnpm run dev - ✔ What is your frontend build command? pnpm run build - ``` - - :::tip - Make sure that the url of the dev server is the same as the one you use to run your frontend app. - ::: - - This will create a `src-tauri` directory in your project with the necessary Tauri configuration files. - - 4. Develop your frontend application as you would normally. Tauri acts as a backend, so your main focus will be on the web technologies. - - 5. Edit `src-tauri/tauri.conf.json` to configure Tauri. You can set application window size, permissions, and other settings here. - - 6. Verify your Tauri app is working by running the development server: - - - - This command will compile the Rust code and open a window with your web content. - - - -**Congratulations!** You've created a new Tauri project using the Tauri CLI! 🚀 - -## Next Steps - -- [Add and Configure a Frontend Framework](/guides/frontend) -- [Tauri Command Line Interface (CLI) Reference](/references/v2/cli) -- [Learn how to build your Tauri app](/guides/build) -- [Discover additional features and recipes to extend Tauri](/features) - - - -List to best practices, blog posts, etc. - - diff --git a/src/content/docs/guides/create/mobile.mdx b/src/content/docs/guides/create/mobile.mdx deleted file mode 100644 index e04a7f12f5..0000000000 --- a/src/content/docs/guides/create/mobile.mdx +++ /dev/null @@ -1,217 +0,0 @@ ---- -title: Integrate ---- - -If you have a desktop Tauri project and want to target mobile platforms using the same code, you must configure your Rust crate. - -## Change your crate type - -The Rust crate must output a library that will be embedded in the Android and iOS packages. Add the following section to your `Cargo.toml` file: - -```toml title=src-tauri/Cargo.toml -[lib] -crate-type = ["staticlib", "cdylib", "rlib"] -``` - -## Create the library source code - -The default entry point for the Rust library is the `lib.rs` file. -Let's write a `tauri::Builder` wrapper that will be reused by both the desktop and mobile targets. - -```rust title=src-tauri/src/lib.rs -use tauri::App; - -#[cfg(mobile)] -mod mobile; -#[cfg(mobile)] -pub use mobile::*; - -pub type SetupHook = Box Result<(), Box> + Send>; - -#[derive(Default)] -pub struct AppBuilder { - setup: Option, -} - -impl AppBuilder { - pub fn new() -> Self { - Self::default() - } - - #[must_use] - pub fn setup(mut self, setup: F) -> Self - where - F: FnOnce(&mut App) -> Result<(), Box> + Send + 'static, - { - self.setup.replace(Box::new(setup)); - self - } - - pub fn run(self) { - let setup = self.setup; - tauri::Builder::default() - .setup(move |app| { - if let Some(setup) = setup { - (setup)(app)?; - } - Ok(()) - }) - .run(tauri::generate_context!()) - .expect("error while running tauri application"); - } -} -``` - -In this example, the `AppBuilder::run` function is where you write all the shared logic. Custom mobile/desktop code can be defined in the AppBuilder methods, such as the setup method. - -Now let's create the mobile module that will have the entry point for iOS and Android and consume the shared AppBuilder logic: - -```rust title=src-tauri/src/mobile.rs -#[tauri::mobile_entry_point] -fn main() { - super::AppBuilder::new().run(); -} -``` - -The default Tauri project has the binary source code under `src-tauri/src/main.rs`. Let's change it to use the AppBuilder struct: - -```rust title=src-tauri/src/main.rs -#![cfg_attr( - all(not(debug_assertions), target_os = "windows"), - windows_subsystem = "windows" -)] - -pub fn main() { - app::AppBuilder::new().run(); -} - -``` - -## Frontend Configuration - -To develop mobile Tauri applications, your frontend must serve the assets listening on your public network address. -The network address can be found using the `internal-ip` NPM: - -:::note - -At the time of this writing, there is a [serious bug](https://github.com/sindresorhus/internal-ip/issues/48) in `8.0.0`. This is why `7.0.0` is specified explicitly. - -::: - -```shell -npm install --save-dev internal-ip@7.0.0 -``` - -```shell -yarn add -D internal-ip@7.0.0 -``` - -```shell -pnpm add -D internal-ip@7.0.0 -``` - -Then you need to configure your framework to use the internal IP. - -### Vite - -For Vite, you need to change your configuration to be defined using the `defineConfig` helper with an async closure. -Then, resolve the internal IP address and set it to the [server object][vite server]. - -```javascript title=vite.config.js -import { defineConfig } from 'vite'; -import { internalIpV4 } from 'internal-ip'; - -// https://vitejs.dev/config/ -export default defineConfig(async () => { - const host = await internalIpV4(); - - /** @type {import('vite').UserConfig} */ - const config = { - server: { - host: '0.0.0.0', // listen on all addresses - port: 5173, - strictPort: true, - hmr: { - protocol: 'ws', - host, - port: 5183, - }, - }, - }; - - return config; -}); -``` - -### Next.js - -For Next.js, you need to configure the [assetPrefix] to use the internal IP so the server properly resolves your assets. - -```typescript title=next.config.js -const isProd = process.env.NODE_ENV === 'production'; -module.exports = async (phase, { defaultConfig }) => { - let internalHost = null; - if (!isProd) { - const { internalIpV4 } = await import('internal-ip'); - internalHost = await internalIpV4(); - } - /** - * @type {import('next').NextConfig} - */ - const nextConfig = { - reactStrictMode: true, - swcMinify: true, - // Note: This experimental feature is required to use NextJS Image in SSG mode. - // See https://nextjs.org/docs/messages/export-image-api for different workarounds. - images: { - unoptimized: true, - }, - assetPrefix: isProd ? null : `http://${internalHost}:3000`, - }; - return nextConfig; -}; -``` - -Currently, there is no configuration option to configure Next.js to use the internal IP address, only the CLI allows changing it. -So you need to append `--hostname $HOST` to the [beforeDevCommand]. - -### Webpack - -Webpack has a built-in option to use the local IP address as the host for the development server: - -```typescript title=webpack.config.js -export default { - devServer: { - host: 'local-ipv4', - }, -}; -``` - -[vite server]: https://vitejs.dev/config/server-options.html -[assetprefix]: https://nextjs.org/docs/api-reference/next.config.js/cdn-support-with-asset-prefix -[beforedevcommand]: /references/v2/config#beforedevcommand-1 -[tauri releases on github]: https://github.com/tauri-apps/tauri/releases - -## Conditional compilation - -The `#[cfg(desktop)]` and `#[cfg(mobile)]` conditional checks can be used to conditionally compile code for each target. - -```rust title=lib.rs -#[cfg(mobile)] -fn do_something() { - println!("Hello from Mobile!"); -} - -#[cfg(desktop)] -fn do_something() { - println!("Hello from Desktop!"); -} - -fn run() { - if cfg!(mobile) { - println!("Hello from Mobile!"); - } else { - println!("Hello from Desktop!"); - } -} -``` diff --git a/src/content/docs/guides/debug/index.mdx b/src/content/docs/guides/debug/index.mdx deleted file mode 100644 index 1f0e268dc5..0000000000 --- a/src/content/docs/guides/debug/index.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Debug -description: Tips and tricks for your debugging workflow ---- - -import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - - - - - - diff --git a/src/content/docs/guides/develop/index.mdx b/src/content/docs/guides/develop/index.mdx deleted file mode 100644 index a2ae3b2f4f..0000000000 --- a/src/content/docs/guides/develop/index.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Develop -description: Core concepts for developing with Tauri. ---- - -import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - - - - - diff --git a/src/content/docs/guides/distribute.mdx b/src/content/docs/guides/distribute.mdx deleted file mode 100644 index 6729e608fa..0000000000 --- a/src/content/docs/guides/distribute.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Distributing ---- - -import Stub from '@components/Stub.astro'; - - - -- Distribution and Code Signing for... - - Linux - - macOS - - Windows - - Android `pnpm tauri [ios|android] build` - - iOS -- Updater (link to recipe) - - diff --git a/src/content/docs/guides/test/index.mdx b/src/content/docs/guides/test/index.mdx deleted file mode 100644 index 010335a7c8..0000000000 --- a/src/content/docs/guides/test/index.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Test -description: Techniques for testing inside and outside the Tauri runtime ---- - -Techniques for testing inside and outside the Tauri runtime - -import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - - - - - diff --git a/src/content/docs/guides/troubleshoot.mdx b/src/content/docs/guides/troubleshoot.mdx deleted file mode 100644 index 316dbe0dcb..0000000000 --- a/src/content/docs/guides/troubleshoot.mdx +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Troubleshooting ---- - -import Stub from '@components/Stub.astro'; - - diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 2e81328e03..581b7b330e 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -12,7 +12,7 @@ hero: file: ../../assets/logo-outline.svg actions: - text: Get Started - link: /guides/ + link: /start/ icon: right-arrow variant: primary - text: Contribution Guidelines @@ -23,10 +23,6 @@ hero: link: https://tauri.app icon: external variant: minimal -banner: - content: | - You're on the prerelease site for Tauri 2.0 - - Go to the Tauri 1.0 site --- import { Card, CardGrid } from '@astrojs/starlight/components'; diff --git a/src/content/docs/references/.gitignore b/src/content/docs/references/.gitignore index a105ff5be1..df95c733f1 100644 --- a/src/content/docs/references/.gitignore +++ b/src/content/docs/references/.gitignore @@ -1,7 +1,3 @@ -v1/config.md -v1/js/* -!v1/js/index.mdx - -v2/config.md -v2/js/* -!v2/js/index.mdx \ No newline at end of file +config.md +javascript/* +!javascript/index.mdx diff --git a/src/content/docs/references/v2/acl.mdx b/src/content/docs/references/acl.mdx similarity index 95% rename from src/content/docs/references/v2/acl.mdx rename to src/content/docs/references/acl.mdx index 8ce5950558..a8bb8248a5 100644 --- a/src/content/docs/references/v2/acl.mdx +++ b/src/content/docs/references/acl.mdx @@ -1,8 +1,10 @@ --- title: Access Control List +sidebar: + order: 1 --- -Each Tauri [command](/features/commands) exposes a Rust function that can perform arbitrary actions using operating system APIs to the JavaScript layer, which is sandboxed by default using Web standards. +Each Tauri [command](/develop/calling-rust) exposes a Rust function that can perform arbitrary actions using operating system APIs to the JavaScript layer, which is sandboxed by default using Web standards. This introduces a risk to your application if an attacker can perform code execution accessing Tauri commands. To mitigate this, Tauri uses an Access Control List (ACL) to restrict access of plugin commands. By default all plugin commands are blocked and cannot be accessed. diff --git a/src/content/docs/references/v2/cli.mdx b/src/content/docs/references/cli.mdx similarity index 99% rename from src/content/docs/references/v2/cli.mdx rename to src/content/docs/references/cli.mdx index 66f254a64a..239bd771ab 100644 --- a/src/content/docs/references/v2/cli.mdx +++ b/src/content/docs/references/cli.mdx @@ -1,5 +1,7 @@ --- title: Command Line Interface (CLI) +sidebar: + order: 1 --- import { Tabs, TabItem } from '@astrojs/starlight/components'; @@ -19,7 +21,7 @@ You can add the Tauri CLI to your current project using your package manager of :::tip[Developing a Plugin] -For CLI commands related to developing plugins visit the [Develop a Tauri Plugin guide](/guides/plugins). +For CLI commands related to developing plugins visit the [Develop a Tauri Plugin guide](/develop/plugins). ::: diff --git a/src/content/docs/references/environment-variables.mdx b/src/content/docs/references/environment-variables.mdx index 35beb18940..d77b1ee947 100644 --- a/src/content/docs/references/environment-variables.mdx +++ b/src/content/docs/references/environment-variables.mdx @@ -1,5 +1,10 @@ --- title: Environment Variables +sidebar: + order: 1 + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/references/index.mdx b/src/content/docs/references/index.mdx index 611f2cf466..e76427c5c5 100644 --- a/src/content/docs/references/index.mdx +++ b/src/content/docs/references/index.mdx @@ -1,30 +1,24 @@ --- title: References +sidebar: + order: 0 + label: Overview --- import { LinkCard, CardGrid } from '@astrojs/starlight/components'; -## Tauri v2 API References +## Core References - - - + + + -## Tauri v1 API References - - - - - - - - ## Additional References diff --git a/src/content/docs/references/v1/cli.mdx b/src/content/docs/references/v1/cli.mdx deleted file mode 100644 index 0d5261e2d8..0000000000 --- a/src/content/docs/references/v1/cli.mdx +++ /dev/null @@ -1,402 +0,0 @@ ---- -title: Command Line Interface (CLI) ---- - -import { Tabs, TabItem } from '@astrojs/starlight/components'; -import CommandTabs from '@components/CommandTabs.astro'; - -## `info` - - - -``` -Usage: cargo-tauri info [OPTIONS] - -Options: - --interactive Interactive mode to apply automatic fixes - -v, --verbose... Enables verbose logging - -h, --help Print help - -V, --version Print version -``` - -It shows a concise list of information about the environment, Rust, Node.js and their versions as well as some relevant configurations. - -:::note - -This command is pretty helpful when you need to have a quick overview of your application. When requesting some help, it can be useful that you share this report with us. - -::: - -## `init` - - - -``` -Usage: cargo-tauri init [OPTIONS] - -Options: - --ci - Skip prompting for values - -v, --verbose... - Enables verbose logging - -f, --force - Force init to overwrite the src-tauri folder - -l, --log - Enables logging - -d, --directory - Set target directory for init [default: /home/runner/work/tauri-docs/tauri-docs] - -t, --tauri-path - Path of the Tauri project to use (relative to the cwd) - -A, --app-name - Name of your Tauri application - -W, --window-title - Window title of your Tauri application - -D, --dist-dir - Web assets location, relative to /src-tauri - -P, --dev-path - Url of your dev server - --before-dev-command - A shell command to run before `tauri dev` kicks in - --before-build-command - A shell command to run before `tauri build` kicks in - -h, --help - Print help - -V, --version - Print version -``` - -## `plugin init` - - - -``` -Usage: cargo-tauri plugin init [OPTIONS] --name - -Options: - -n, --name Name of your Tauri plugin - -v, --verbose... Enables verbose logging - --api Initializes a Tauri plugin with TypeScript API - -d, --directory Set target directory for init [default: /home/runner/work/tauri-docs/tauri-docs] - -t, --tauri-path Path of the Tauri project to use (relative to the cwd) - -a, --author Author name - -h, --help Print help - -V, --version Print version -``` - -## `dev` - - - -``` -Usage: cargo-tauri dev [OPTIONS] [ARGS]... - -Arguments: - [ARGS]... Command line arguments passed to the runner. Use `--` to explicitly mark the start of the arguments. Arguments after a second `--` are passed to the application e.g. `tauri dev -- [runnerArgs] -- [appArgs]` - -Options: - -r, --runner Binary to use to run the application - -v, --verbose... Enables verbose logging - -t, --target Target triple to build against - -f, --features [...] List of cargo features to activate - -e, --exit-on-panic Exit on panic - -c, --config JSON string or path to JSON file to merge with tauri.conf.json - --release Run the code in release mode - --no-watch Disable the file watcher - --no-dev-server Disable the dev server for static files - --port Specify port for the dev server for static files. Defaults to 1430 Can also be set using `TAURI_DEV_SERVER_PORT` env var - -h, --help Print help - -V, --version Print version -``` - -This command will open the WebView in development mode. It makes use of the `build.devPath` property from your `src-tauri/tauri.conf.json` file. - -If you have entered a command to the `build.beforeDevCommand` property, this one will be executed before the `dev` command. - -**[See more about the configuration.](./config#build)** - -:::caution Troubleshooting - -If you're not using `build.beforeDevCommand`, make sure your `build.devPath` is correct and, if using a development server, that it's started before using this command. - -::: - -## `build` - - - -``` -Usage: cargo-tauri build [OPTIONS] [ARGS]... - -Arguments: - [ARGS]... - Command line arguments passed to the runner. Use `--` to explicitly mark the start of the arguments - -Options: - -r, --runner - Binary to use to build the application, defaults to `cargo` - - -v, --verbose... - Enables verbose logging - - -d, --debug - Builds with the debug flag - - -t, --target - Target triple to build against. - - It must be one of the values outputted by `$rustc --print target-list` or `universal-apple-darwin` for an universal macOS application. - - Note that compiling an universal macOS application requires both `aarch64-apple-darwin` and `x86_64-apple-darwin` targets to be installed. - - -f, --features [...] - Space or comma separated list of features to activate - - -b, --bundles [...] - Space or comma separated list of bundles to package. - - Each bundle must be one of `deb`, `appimage`, `msi`, `app` or `dmg` on MacOS and `updater` on all platforms. If `none` is specified, the bundler will be skipped. - - Note that the `updater` bundle is not automatically added so you must specify it if the updater is enabled. - - -c, --config - JSON string or path to JSON file to merge with tauri.conf.json - - --ci - Skip prompting for values - - -h, --help - Print help (see a summary with '-h') - - -V, --version - Print version -``` - -This command will bundle your application, either in production mode or debug mode if you used the `--debug` flag. It makes use of the `build.distDir` property from your `src-tauri/tauri.conf.json` file. - -If you have entered a command to the `build.beforeBuildCommand` property, this one will be executed before the `build` command. - -**[See more about the configuration.](./config#build)** - -## `icon` - - - -``` -Usage: cargo-tauri icon [OPTIONS] [INPUT] - -Arguments: - [INPUT] Path to the source icon (png, 1024x1024px with transparency) [default: ./app-icon.png] - -Options: - -o, --output Output directory. Default: 'icons' directory next to the tauri.conf.json file - -v, --verbose... Enables verbose logging - -p, --png Custom PNG icon sizes to generate. When set, the default icons are not generated - -h, --help Print help - -V, --version Print version -``` - -For more information, check out the complete [Tauri Icon Guide](../guides/features/icons). - -## `completions` - - - -``` -Usage: cargo-tauri completions [OPTIONS] --shell - -Options: - -s, --shell Shell to generate a completion script for. [possible values: bash, elvish, fish, powershell, zsh] - -v, --verbose... Enables verbose logging - -o, --output Output file for the shell completions. By default the completions are printed to stdout - -h, --help Print help - -V, --version Print version -``` - -The Tauri CLI can generate shell completions for Bash, Zsh, PowerShell and Fish. - -Here are some instructions to configure Bash, Zsh and PowerShell. If you face an issue, please follow your shell's instructions instead. Note that it is recommended to check the generated completions script before executing it for security reasons. - -### Bash - -Get the Bash completions and move to a known folder: - - - - -```shell -npm run tauri completions -- --shell bash > tauri.sh -mv tauri.sh /usr/local/etc/bash_completion.d/tauri.bash -``` - - - - -```shell -yarn tauri completions --shell bash > tauri.sh -mv tauri.sh /usr/local/etc/bash_completion.d/tauri.bash -``` - - - - -```shell -pnpm tauri completions --shell bash > tauri.sh -mv tauri.sh /usr/local/etc/bash_completion.d/tauri.bash -``` - - - - -```shell -cargo tauri completions --shell bash > tauri.sh -mv tauri.sh /usr/local/etc/bash_completion.d/tauri.bash -``` - - - - -Load the completions script by adding the following to `.bashrc`: - -```shell -source /usr/local/etc/bash_completion.d/tauri.bash -``` - -### Zsh - -Get the Zsh completions and move to a known folder: - - - - -```shell -npm run tauri completions -- --shell zsh > completions.zsh -mv completions.zsh $HOME/.completions/_tauri -``` - - - - -```shell -yarn tauri completions --shell zsh > completions.zsh -mv completions.zsh $HOME/.completions/_tauri -``` - - - - -```shell -pnpm tauri completions --shell zsh > completions.zsh -mv completions.zsh $HOME/.completions/_tauri -``` - - - - -```shell -cargo tauri completions --shell zsh > completions.zsh -mv completions.zsh $HOME/.completions/_tauri -``` - - - - -Load the completions folder using fpath adding the following to `.zshrc`: - -```shell -fpath=(~/.completions $fpath) -autoload -U compinit -``` - -### PowerShell - -Get the PowerShell completions and add it to the `$profile` file to execute it on all sessions: - - - - -```powershell -npm run tauri completions -- --shell powershell > ((Split-Path -Path $profile)+"\_tauri.ps1") -Add-Content -Path $profile -Value '& "$PSScriptRoot\_tauri.ps1"' -``` - - - - -```powershell -yarn tauri completions --shell powershell > ((Split-Path -Path $profile)+"\_tauri.ps1") -Add-Content -Path $profile -Value '& "$PSScriptRoot\_tauri.ps1"' -``` - - - - -```powershell -pnpm tauri completions --shell powershell > ((Split-Path -Path $profile)+"\_tauri.ps1") -Add-Content -Path $profile -Value '& "$PSScriptRoot\_tauri.ps1"' -``` - - - - -```powershell -cargo tauri completions --shell powershell > ((Split-Path -Path $profile)+"\_tauri.ps1") -Add-Content -Path $profile -Value '& "$PSScriptRoot\_tauri.ps1"' -``` - - - - -## `version` - - - -``` - Description - Returns the current version of tauri -``` - -This command will show the current version of Tauri. - -## CLI usage - -See more about the usage through this [complete guide](/guides/develop/development-cycle/). diff --git a/src/content/docs/references/v2/js/index.mdx b/src/content/docs/references/v2/js/index.mdx deleted file mode 100644 index d557396733..0000000000 --- a/src/content/docs/references/v2/js/index.mdx +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: JavaScript ---- - -import JavaScriptList from '@components/list/JavaScript.astro'; - - diff --git a/src/content/docs/references/webview-versions.md b/src/content/docs/references/webview-versions.md index cf12a43cc1..9b11427ef8 100644 --- a/src/content/docs/references/webview-versions.md +++ b/src/content/docs/references/webview-versions.md @@ -1,5 +1,7 @@ --- title: Webview Versions +sidebar: + order: 1 --- ## WebView2 (Windows) diff --git a/src/content/docs/concepts/security/best-practices.mdx b/src/content/docs/security/best-practices.mdx similarity index 97% rename from src/content/docs/concepts/security/best-practices.mdx rename to src/content/docs/security/best-practices.mdx index 141b54708d..551f8c4a81 100644 --- a/src/content/docs/concepts/security/best-practices.mdx +++ b/src/content/docs/security/best-practices.mdx @@ -1,5 +1,9 @@ --- title: Best Practices +sidebar: + badge: + text: WIP + variant: caution --- We gathered a number of best practices you should follow during your journey of building diff --git a/src/content/docs/concepts/security/capabilities.mdx b/src/content/docs/security/capabilities.mdx similarity index 96% rename from src/content/docs/concepts/security/capabilities.mdx rename to src/content/docs/security/capabilities.mdx index 07d1b329c0..3f3ac8f7b6 100644 --- a/src/content/docs/concepts/security/capabilities.mdx +++ b/src/content/docs/security/capabilities.mdx @@ -1,12 +1,16 @@ --- title: Capabilities +sidebar: + badge: + text: WIP + variant: caution --- Tauri provides application and plugin developers with a capabilities system, to granually enable and constrain the core exposure to the application frontend running in the system WebView. -Capabilities are a set of [permissions](/concepts/security/permissions) mapped +Capabilities are a set of [permissions](/security/permissions) mapped to application windows and webviews by their respective label. Capabilities can affect multiple windows and webviews and these can be referenced in multiple capabilities. @@ -27,7 +31,7 @@ them by identifier in the `tauri.conf.json` but it also possible to defined them directly in the `capabilities` field. For a full reference of the configuration scheme please see the -[references](/references/v2/config) section. +[references](/references/config) section. The following example JSON defines a capability that enables default functionality for core plugins and the `window.setTitle` API. @@ -52,7 +56,7 @@ for core plugins and the `window.setTitle` API. ``` These snippets are part of the -[Tauri configuration](/references/configuration-files#tauri-config) file. +[Tauri configuration](/develop/configuration-files#tauri-config) file. This is likely the most common configuration method, where the individual capabilities are inlined and only diff --git a/src/content/docs/concepts/security/csp.mdx b/src/content/docs/security/csp.mdx similarity index 97% rename from src/content/docs/concepts/security/csp.mdx rename to src/content/docs/security/csp.mdx index 78f4634c5a..13f069233c 100644 --- a/src/content/docs/concepts/security/csp.mdx +++ b/src/content/docs/security/csp.mdx @@ -1,5 +1,9 @@ --- title: Content Security Policy (CSP) +sidebar: + badge: + text: WIP + variant: caution --- Tauri restricts the [Content Security Policy] (CSP) of your HTML pages. diff --git a/src/content/docs/concepts/security/development.mdx b/src/content/docs/security/development.mdx similarity index 98% rename from src/content/docs/concepts/security/development.mdx rename to src/content/docs/security/development.mdx index 071e4fb7a1..2e3c8e560d 100644 --- a/src/content/docs/concepts/security/development.mdx +++ b/src/content/docs/security/development.mdx @@ -1,5 +1,9 @@ --- title: Application Lifecycle Threats +sidebar: + badge: + text: WIP + variant: caution --- Application development environment security is critical for every project, diff --git a/src/content/docs/concepts/security/ecosystem.mdx b/src/content/docs/security/ecosystem.mdx similarity index 96% rename from src/content/docs/concepts/security/ecosystem.mdx rename to src/content/docs/security/ecosystem.mdx index a25a2f823b..bacd1a88b1 100644 --- a/src/content/docs/concepts/security/ecosystem.mdx +++ b/src/content/docs/security/ecosystem.mdx @@ -1,5 +1,9 @@ --- title: Tauri Ecosystem Security +sidebar: + badge: + text: WIP + variant: caution --- Our Tauri organization ecosystem is hosted on GitHub and facilitates several diff --git a/src/content/docs/concepts/security/future.mdx b/src/content/docs/security/future.mdx similarity index 98% rename from src/content/docs/concepts/security/future.mdx rename to src/content/docs/security/future.mdx index 481a1307ea..f1eabdcc31 100644 --- a/src/content/docs/concepts/security/future.mdx +++ b/src/content/docs/security/future.mdx @@ -1,5 +1,9 @@ --- title: Future Work +sidebar: + badge: + text: WIP + variant: caution --- This section descibes topics we started or would like to tackle diff --git a/src/content/docs/concepts/security/index.mdx b/src/content/docs/security/index.mdx similarity index 87% rename from src/content/docs/concepts/security/index.mdx rename to src/content/docs/security/index.mdx index 0fd36d240b..d009a345e2 100644 --- a/src/content/docs/concepts/security/index.mdx +++ b/src/content/docs/security/index.mdx @@ -1,5 +1,11 @@ --- title: Security +sidebar: + order: 1 + label: Overview + badge: + text: WIP + variant: caution --- import { CardGrid, LinkCard } from '@astrojs/starlight/components'; @@ -42,12 +48,12 @@ in the capabilities configuration. Learn more about the individual components and boundary enforcement: - - - + + + @@ -58,7 +64,7 @@ of choice, but Tauri provides generic features to control and contain the attack - + - - + + ## Coordinated Disclosure diff --git a/src/content/docs/concepts/security/permissions.mdx b/src/content/docs/security/permissions.mdx similarity index 98% rename from src/content/docs/concepts/security/permissions.mdx rename to src/content/docs/security/permissions.mdx index 0805f8a4ed..4a991162f3 100644 --- a/src/content/docs/concepts/security/permissions.mdx +++ b/src/content/docs/security/permissions.mdx @@ -1,5 +1,9 @@ --- title: Permissions +sidebar: + badge: + text: WIP + variant: caution --- Permissions are descriptions of explicit privileges of commands. diff --git a/src/content/docs/concepts/security/runtime-authority.mdx b/src/content/docs/security/runtime-authority.mdx similarity index 93% rename from src/content/docs/concepts/security/runtime-authority.mdx rename to src/content/docs/security/runtime-authority.mdx index 7798cf74f7..df82fb25f4 100644 --- a/src/content/docs/concepts/security/runtime-authority.mdx +++ b/src/content/docs/security/runtime-authority.mdx @@ -1,5 +1,9 @@ --- title: Runtime Authority +sidebar: + badge: + text: WIP + variant: caution --- #### Runtime Authority diff --git a/src/content/docs/concepts/security/scope.mdx b/src/content/docs/security/scope.mdx similarity index 93% rename from src/content/docs/concepts/security/scope.mdx rename to src/content/docs/security/scope.mdx index f4cef9176a..b39e595d48 100644 --- a/src/content/docs/concepts/security/scope.mdx +++ b/src/content/docs/security/scope.mdx @@ -1,5 +1,9 @@ --- title: Command Scopes +sidebar: + badge: + text: WIP + variant: caution --- A scope is a granular way to define (dis)allowed behavior of a Tauri command. @@ -11,8 +15,8 @@ The scope type needs be of any [`serde`](https://docs.rs/serde/latest/serde/) se These types are plugin-specific in general. For scoped commands implemented in a Tauri application the scope type needs to be defined in the application and then enforced in the command implementation. -For instance, the [`Fs`](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/fs) plugin allows you to use scopes to allow or deny certain directories and files -and the [`http`](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/http) plugin uses scopes to filter URLs that are allowed to be reached. +For instance, the [`Fs`](https://github.com/tauri-apps/plugins-workspace/tree/plugins/fs) plugin allows you to use scopes to allow or deny certain directories and files +and the [`http`](https://github.com/tauri-apps/plugins-workspace/tree/plugins/http) plugin uses scopes to filter URLs that are allowed to be reached. The scope is passed to the command and handling or properly enforcing is implemented by the command itself. @@ -26,7 +30,7 @@ The scope validation implementation should be audited to ensure correctness. ## Examples -These examples are taken from the [`Fs`](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/fs) plugin permissions: +These examples are taken from the [`Fs`](https://github.com/tauri-apps/plugins-workspace/tree/plugins/fs) plugin permissions: The scope type in this plugin for all commands is a string, which contains a [`glob`](https://docs.rs/glob/latest/glob/) compatible path. diff --git a/src/content/docs/guides/frontend/index.mdx b/src/content/docs/start/Frontend Configuration/index.mdx similarity index 69% rename from src/content/docs/guides/frontend/index.mdx rename to src/content/docs/start/Frontend Configuration/index.mdx index 7705a08d09..59dc32f475 100644 --- a/src/content/docs/guides/frontend/index.mdx +++ b/src/content/docs/start/Frontend Configuration/index.mdx @@ -1,6 +1,9 @@ --- title: Frontend Configuration i18nReady: true +sidebar: + label: Overview + order: 10 --- import { LinkCard, CardGrid } from '@astrojs/starlight/components'; @@ -11,30 +14,10 @@ If a framework is not listed then it may work with Tauri with no additional conf :::tip[Framework Not Listed?] -Don't see a framework listed? It may work with Tauri without any additional configuration required. Read the [configuration checklist](#configuration-checklist) for any common configurations to check for. +Don't see a framework listed? It may work with Tauri without any additional configuration required. Read the [configuration checklist](/start/frontend-configuration/#configuration-checklist) for any common configurations to check for. ::: -## JavaScript - - - - - - - - - - -## Rust - - - - - - - - ## Configuration Checklist Conceptually Tauri acts as a static web host. You need to provide Tauri with a folder containing some mix of HTML, CSS, Javascript and possibly WASM that can be served to the webview Tauri provides. @@ -48,3 +31,24 @@ Below is a checklist of common scenarios needed to integrate a frontend with Tau - Use static site generation (SSG). Tauri doesn't officially support server based alternatives (such as SSR). - For mobile development, a development server of some kind is necessary that can host the frontend on your internal IP. - Use a proper client-server relationship between your app and your API's (no hybrid solutions with SSR). + + +## JavaScript + + + + + + + + + + +## Rust + + + + + + + diff --git a/src/content/docs/guides/frontend/leptos.mdx b/src/content/docs/start/Frontend Configuration/leptos.mdx similarity index 58% rename from src/content/docs/guides/frontend/leptos.mdx rename to src/content/docs/start/Frontend Configuration/leptos.mdx index 87986abf7e..cab6b7788d 100644 --- a/src/content/docs/guides/frontend/leptos.mdx +++ b/src/content/docs/start/Frontend Configuration/leptos.mdx @@ -1,5 +1,9 @@ --- title: Leptos +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/guides/frontend/nextjs.mdx b/src/content/docs/start/Frontend Configuration/nextjs.mdx similarity index 100% rename from src/content/docs/guides/frontend/nextjs.mdx rename to src/content/docs/start/Frontend Configuration/nextjs.mdx diff --git a/src/content/docs/guides/frontend/nuxt.mdx b/src/content/docs/start/Frontend Configuration/nuxt.mdx similarity index 100% rename from src/content/docs/guides/frontend/nuxt.mdx rename to src/content/docs/start/Frontend Configuration/nuxt.mdx diff --git a/src/content/docs/guides/frontend/qwik.mdx b/src/content/docs/start/Frontend Configuration/qwik.mdx similarity index 57% rename from src/content/docs/guides/frontend/qwik.mdx rename to src/content/docs/start/Frontend Configuration/qwik.mdx index 758566d764..4d2ed6e09e 100644 --- a/src/content/docs/guides/frontend/qwik.mdx +++ b/src/content/docs/start/Frontend Configuration/qwik.mdx @@ -1,5 +1,9 @@ --- title: Qwik +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/guides/frontend/svelte.mdx b/src/content/docs/start/Frontend Configuration/svelte.mdx similarity index 58% rename from src/content/docs/guides/frontend/svelte.mdx rename to src/content/docs/start/Frontend Configuration/svelte.mdx index e94db0fc8e..853e791fe4 100644 --- a/src/content/docs/guides/frontend/svelte.mdx +++ b/src/content/docs/start/Frontend Configuration/svelte.mdx @@ -1,5 +1,9 @@ --- title: Svelte +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/guides/frontend/sycamore.mdx b/src/content/docs/start/Frontend Configuration/sycamore.mdx similarity index 59% rename from src/content/docs/guides/frontend/sycamore.mdx rename to src/content/docs/start/Frontend Configuration/sycamore.mdx index 4560770065..bc773d67a7 100644 --- a/src/content/docs/guides/frontend/sycamore.mdx +++ b/src/content/docs/start/Frontend Configuration/sycamore.mdx @@ -1,5 +1,9 @@ --- title: Sycamore +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/guides/frontend/trunk.mdx b/src/content/docs/start/Frontend Configuration/trunk.mdx similarity index 100% rename from src/content/docs/guides/frontend/trunk.mdx rename to src/content/docs/start/Frontend Configuration/trunk.mdx diff --git a/src/content/docs/guides/frontend/vite.mdx b/src/content/docs/start/Frontend Configuration/vite.mdx similarity index 57% rename from src/content/docs/guides/frontend/vite.mdx rename to src/content/docs/start/Frontend Configuration/vite.mdx index 40abceaf01..6a7c7fca35 100644 --- a/src/content/docs/guides/frontend/vite.mdx +++ b/src/content/docs/start/Frontend Configuration/vite.mdx @@ -1,5 +1,9 @@ --- title: Vite +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/guides/frontend/webpack.mdx b/src/content/docs/start/Frontend Configuration/webpack.mdx similarity index 58% rename from src/content/docs/guides/frontend/webpack.mdx rename to src/content/docs/start/Frontend Configuration/webpack.mdx index 59c7da461b..a34ef3967b 100644 --- a/src/content/docs/guides/frontend/webpack.mdx +++ b/src/content/docs/start/Frontend Configuration/webpack.mdx @@ -1,5 +1,9 @@ --- title: Webpack +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/guides/frontend/yew.mdx b/src/content/docs/start/Frontend Configuration/yew.mdx similarity index 57% rename from src/content/docs/guides/frontend/yew.mdx rename to src/content/docs/start/Frontend Configuration/yew.mdx index 66d54db990..39263490fd 100644 --- a/src/content/docs/guides/frontend/yew.mdx +++ b/src/content/docs/start/Frontend Configuration/yew.mdx @@ -1,5 +1,9 @@ --- title: Yew +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/guides/upgrade-migrate/from-electron.mdx b/src/content/docs/start/Upgrade & Migrate/from-electron.mdx similarity index 58% rename from src/content/docs/guides/upgrade-migrate/from-electron.mdx rename to src/content/docs/start/Upgrade & Migrate/from-electron.mdx index cc13299b6f..a7e0e07a4c 100644 --- a/src/content/docs/guides/upgrade-migrate/from-electron.mdx +++ b/src/content/docs/start/Upgrade & Migrate/from-electron.mdx @@ -1,5 +1,10 @@ --- title: Migrate from Electron +sidebar: + order: 10 + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/start/Upgrade & Migrate/from-existing.mdx b/src/content/docs/start/Upgrade & Migrate/from-existing.mdx new file mode 100644 index 0000000000..441c048757 --- /dev/null +++ b/src/content/docs/start/Upgrade & Migrate/from-existing.mdx @@ -0,0 +1,12 @@ +--- +title: Upgrade Existing Project +sidebar: + order: 12 + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + diff --git a/src/content/docs/guides/upgrade-migrate/from-flutter.mdx b/src/content/docs/start/Upgrade & Migrate/from-flutter.mdx similarity index 58% rename from src/content/docs/guides/upgrade-migrate/from-flutter.mdx rename to src/content/docs/start/Upgrade & Migrate/from-flutter.mdx index 41c2e11f67..98d5cec947 100644 --- a/src/content/docs/guides/upgrade-migrate/from-flutter.mdx +++ b/src/content/docs/start/Upgrade & Migrate/from-flutter.mdx @@ -1,5 +1,10 @@ --- title: Migrate from Flutter +sidebar: + order: 11 + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/guides/upgrade-migrate/from-tauri-1.mdx b/src/content/docs/start/Upgrade & Migrate/from-tauri-1.mdx similarity index 99% rename from src/content/docs/guides/upgrade-migrate/from-tauri-1.mdx rename to src/content/docs/start/Upgrade & Migrate/from-tauri-1.mdx index e2f64b46e4..48a92a620e 100644 --- a/src/content/docs/guides/upgrade-migrate/from-tauri-1.mdx +++ b/src/content/docs/start/Upgrade & Migrate/from-tauri-1.mdx @@ -1,6 +1,8 @@ --- title: Upgrade from Tauri 1.0 i18nReady: true +sidebar: + order: 12 --- import { Tabs, TabItem } from '@astrojs/starlight/components'; @@ -63,7 +65,7 @@ The Tauri v2 CLI includes a `migrate` command that automates most of the process {/* TODO: 2.0 */} -Learn more about the `migrate` command in the [Command Line Interface reference](/references/v2/cli#migrate) +Learn more about the `migrate` command in the [Command Line Interface reference](/references/cli#migrate) ## Summary of Changes @@ -94,7 +96,7 @@ Below is a summary of the changes from Tauri 1.0 to Tauri 2.0: - `build > distDir` renamed to `frontendDist`. - `build > devPath` renamed to `devUrl`. -[Tauri 2.0 Configuration API reference](/references/v2/config) +[Tauri 2.0 Configuration API reference](/references/config) ### New Cargo Features @@ -1166,4 +1168,4 @@ To enable permissions for your app, you must create capability files inside the The `migrate` CLI command automatically parses your v1 allowlist and generates the associated capability file. -To learn more about permissions and capabilities, see [the documentation](/references/v2/acl). +To learn more about permissions and capabilities, see [the documentation](/references/acl). diff --git a/src/content/docs/guides/upgrade-migrate/index.mdx b/src/content/docs/start/Upgrade & Migrate/index.mdx similarity index 62% rename from src/content/docs/guides/upgrade-migrate/index.mdx rename to src/content/docs/start/Upgrade & Migrate/index.mdx index d771e4c66e..7ff692bef7 100644 --- a/src/content/docs/guides/upgrade-migrate/index.mdx +++ b/src/content/docs/start/Upgrade & Migrate/index.mdx @@ -1,5 +1,11 @@ --- title: Upgrade & Migrate +sidebar: + label: Overview + order: 10 + badge: + text: WIP + variant: caution --- Learn about common scenarios and steps to upgrade from Tauri 1.0 or migrate from another framework. @@ -9,14 +15,14 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components'; diff --git a/src/content/docs/start/create-project.mdx b/src/content/docs/start/create-project.mdx new file mode 100644 index 0000000000..12e70e1415 --- /dev/null +++ b/src/content/docs/start/create-project.mdx @@ -0,0 +1,83 @@ +--- +title: Create a Project +sidebar: + order: 3 + badge: + text: WIP + variant: caution +--- + +import { Card } from '@astrojs/starlight/components'; +import Stub from '@components/Stub.astro'; +import Cta from '@fragments/cta.mdx'; + + + +- Create a new app using `create-tauri-app` +- Manually create the app using the Tauri CLI +- Add mobile to an existing project (revise what's here [integrate mobile](/start/create-project)) +- Frontend framework-specific guides (right now limiting to React, Angular, Vue, Svelte, and Solid) + + + +One thing that makes Tauri so flexible is it's ability to work with virtually any frontend framework. We've created the [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) utility to help you create a new Tauri project using one of the officially maintained framework templates. + +`create-tauri-app` currently includes templates for vanilla (HTML, CSS and JavaScript without a framework), [Vue.js](https://vuejs.org), [Svelte](https://svelte.dev), [React](https://reactjs.org/), [SolidJS](https://www.solidjs.com/), [Angular](https://angular.io/), [Preact](https://preactjs.com/), [Yew](https://yew.rs/), [Leptos](https://github.com/leptos-rs/leptos), and [Sycamore](https://sycamore-rs.netlify.app/). You can also find or add your own community templates and frameworks in the [Awesome Tauri repo](https://github.com/tauri-apps/awesome-tauri). + +Alternatively, you can [add Tauri to an existing project](/start/create-project) to quickly turn your existing codebase into a Tauri app. + +## Using `create-tauri-app` + +To get started using `create-tauri-app` run one of the below commands in the folder you'd like to setup your project. If you're not sure which command to use we recommend the Bash command on Linux and macOS and the PowerShell command on Windows. + + + +Follow along with the prompts to choose your project name, frontend language, package manager, and frontend framework, and frontend framework options if applicable. + +:::tip[Not sure what to choose?] + +We recommend starting with the vanilla template (HTML, CSS, and JavaScript without a frontend framework) to get started. You can always [integrate a frontend framework](/start/create-project) later. + +- Choose which language to use for your frontend: `TypeScript / JavaScript` +- Choose your package manager: `pnpm` +- Choose your UI template: `Vanilla` +- Choose your UI flavor: `TypeScript` + +::: + +{/* TODO: Can CTA offer to install the deps? */} + +After `create-tauri-app` has complete you can navigate into your project's folder, install dependencies, then use the [Tauri CLI](/references/cli) to start the development server: + +import CommandTabs from '@components/CommandTabs.astro'; + + + +You'll now see a new window open with your app running. + +**Congratulations!** You've made your Tauri app! 🚀 + +## Next Steps + +- [Add and Configure a Frontend Framework](/start/frontend-configuration) +- [Tauri Command Line Interface (CLI) Reference](/references/cli) +- [Learn how to build your Tauri app](/develop) +- [Discover additional features and recipes to extend Tauri](/features) + + + +List to best practices, blog posts, etc. + + diff --git a/src/content/docs/guides/index.mdx b/src/content/docs/start/index.mdx similarity index 84% rename from src/content/docs/guides/index.mdx rename to src/content/docs/start/index.mdx index 273ddadf47..bd0bd9558b 100644 --- a/src/content/docs/guides/index.mdx +++ b/src/content/docs/start/index.mdx @@ -1,6 +1,8 @@ --- title: What is Tauri? i18nReady: true +sidebar: + order: 0 --- :::caution[Prerelease Software] @@ -11,7 +13,7 @@ This documentation is for the prereleased version of Tauri 2.0 and is subject to Tauri is a framework for building tiny, fast binaries for all major desktop and mobile platforms. Developers can integrate any frontend framework that compiles to HTML, JavaScript, and CSS for building their user experience while leveraging languages such as Rust, Swift, and Kotlin for backend logic when needed. -Get started building with [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) by using one of the below commands. Be sure to follow the [prerequisites guide](/guides/prerequisites/) to install all of the dependencies required by Tauri and then view the [Frontend Configuration guides](/guides/frontend/) for recommended frontend configurations. +Get started building with [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) by using one of the below commands. Be sure to follow the [prerequisites guide](/start/prerequisites/) to install all of the dependencies required by Tauri and then view the [Frontend Configuration guides](/start/frontend-configuration/) for recommended frontend configurations. import Cta from '../_fragments/cta.mdx'; @@ -45,9 +47,9 @@ Learn more about creating optimized apps in the [App Size concept](/concepts/siz ### Flexible Architecture -Since Tauri uses web technologies that means that virtually any frontend framework is compatible with Tauri. The [Frontend Configuration guide](/guides/frontend/) contains common configurations for popular frontend frameworks and the [Rendering concept](/concepts/rendering) discusses which rendering techniques work best with Tauri (such as SPAs and SSGs). +Since Tauri uses web technologies that means that virtually any frontend framework is compatible with Tauri. The [Frontend Configuration guide](/start/frontend-configuration/) contains common configurations for popular frontend frameworks and the [Rendering concept](/concepts/rendering) discusses which rendering techniques work best with Tauri (such as SPAs and SSGs). -Bindings between JavaScript and Rust are available to developers using the `invoke` function in JavaScript and Swift and Kotlin bindings are available for [Tauri Plugins](/guides/plugins/). +Bindings between JavaScript and Rust are available to developers using the `invoke` function in JavaScript and Swift and Kotlin bindings are available for [Tauri Plugins](/develop/plugins/). [TAO](https://github.com/tauri-apps/tao) is responsible for Tauri window creation and [WRY](https://github.com/tauri-apps/wry) is responsible for web view rendering. These are libraries maintained by Tauri and can be consumed directly if deeper system integration is required outside of what Tauri exposes. diff --git a/src/content/docs/guides/prerequisites/index.mdx b/src/content/docs/start/prerequisites.mdx similarity index 94% rename from src/content/docs/guides/prerequisites/index.mdx rename to src/content/docs/start/prerequisites.mdx index 1879418891..793565c0d2 100644 --- a/src/content/docs/guides/prerequisites/index.mdx +++ b/src/content/docs/start/prerequisites.mdx @@ -1,6 +1,8 @@ --- title: Prerequisites i18nReady: true +sidebar: + order: 0 --- import { Tabs, TabItem, Card } from '@astrojs/starlight/components'; @@ -146,7 +148,7 @@ Follow the steps below to install the required dependencies. 1. Download the [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) installer and open it to begin installation. 2. During installation check the "Desktop development with C++" option. -![Visual Studio C++ Build Tools installer screenshot](./visual-studio-build-tools-installer.png) +![Visual Studio C++ Build Tools installer screenshot](@assets/img/start/prerequisites/visual-studio-build-tools-installer.png) Next: [Install WebView2](#webview2). @@ -191,7 +193,7 @@ Here is the file as a plain script: [rustup.sh](https://sh.rustup.rs/) Be sure to restart your Terminal (and in some cases your system) for the changes to take affect. -Next: [Configure for Mobile Targets](#configure-for-mobile-targets) if you'd like to build for Android and iOS, or, if you'd like to use a JavaScript framework, [install Node](#nodejs). Otherwise [Create a Project](/guides/create/). +Next: [Configure for Mobile Targets](#configure-for-mobile-targets) if you'd like to build for Android and iOS, or, if you'd like to use a JavaScript framework, [install Node](#nodejs). Otherwise [Create a Project](/start/create-project). ## Node.js @@ -214,7 +216,7 @@ It's important to restart your Terminal to ensure it recognizes the new installa While npm is the default package manager for Node.js, you can also use others like pnpm or yarn. To enable these, run `corepack enable` in your Terminal. This step is optional and only needed if you prefer using a package manager other than npm. -Next: [Configure for Mobile Targets](#configure-for-mobile-targets) or [Create a project](/guides/create/). +Next: [Configure for Mobile Targets](#configure-for-mobile-targets) or [Create a project](/start/create-project). ## Configure for Mobile Targets @@ -314,7 +316,7 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro -Next: [Setup for iOS](#ios) or [Create a project](/guides/create/). +Next: [Setup for iOS](#ios) or [Create a project](/start/create-project). ### iOS @@ -340,14 +342,14 @@ rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim brew install cocoapods ``` -Next: [Create a project](/guides/create/). +Next: [Create a project](/start/create-project). ## Troubleshooting -If you run into any issues during installation be sure to check the [Troubleshooting Guide](/guides/troubleshoot) or reach out on the [Tauri Discord](https://discord.com/invite/tauri). +If you run into any issues during installation be sure to check the [Troubleshooting Guide](/develop/debug) or reach out on the [Tauri Discord](https://discord.com/invite/tauri). -Now that you've installed all of the prerequisistes you're ready to [create your first Tauri project](/guides/create/)! +Now that you've installed all of the prerequisistes you're ready to [create your first Tauri project](/start/create-project)! diff --git a/src/content/docs/test/Pipelines/github.mdx b/src/content/docs/test/Pipelines/github.mdx new file mode 100644 index 0000000000..aa3f057ee3 --- /dev/null +++ b/src/content/docs/test/Pipelines/github.mdx @@ -0,0 +1,12 @@ +--- +title: GitHub +sidebar: + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/test/Pipelines/gitlab.mdx b/src/content/docs/test/Pipelines/gitlab.mdx new file mode 100644 index 0000000000..7d109ee55a --- /dev/null +++ b/src/content/docs/test/Pipelines/gitlab.mdx @@ -0,0 +1,12 @@ +--- +title: GitLab +sidebar: + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/test/Pipelines/index.mdx b/src/content/docs/test/Pipelines/index.mdx new file mode 100644 index 0000000000..e409322a39 --- /dev/null +++ b/src/content/docs/test/Pipelines/index.mdx @@ -0,0 +1,13 @@ +--- +title: Overview +sidebar: + order: 10 + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/guides/test/webdriver/example/setup.mdx b/src/content/docs/test/WebDriver/Example/index.mdx similarity index 97% rename from src/content/docs/guides/test/webdriver/example/setup.mdx rename to src/content/docs/test/WebDriver/Example/index.mdx index ac9d535b74..ebb590cadb 100644 --- a/src/content/docs/guides/test/webdriver/example/setup.mdx +++ b/src/content/docs/test/WebDriver/Example/index.mdx @@ -1,7 +1,10 @@ --- -title: Setup Example +title: Setup sidebar: - order: 1 + order: 30 + badge: + text: WIP + variant: caution --- {/* TODO: REVISE COPY TO V2 */} @@ -191,4 +194,4 @@ _Note: If you are modifying the application and want to use the Devtools, then r Element" should be available in the right-click menu._ We should now be ready to start testing this application with some WebDriver frameworks. This guide will go over both -[WebdriverIO](/guides/test/webdriver/example/webdriverio) and [Selenium](/guides/test/webdriver/example/selenium) in that order. +[WebdriverIO](/test/webdriver/example/webdriverio) and [Selenium](/test/webdriver/example/selenium) in that order. diff --git a/src/content/docs/guides/test/webdriver/example/selenium.mdx b/src/content/docs/test/WebDriver/Example/selenium.mdx similarity index 93% rename from src/content/docs/guides/test/webdriver/example/selenium.mdx rename to src/content/docs/test/WebDriver/Example/selenium.mdx index 322e20886a..e69ba3b491 100644 --- a/src/content/docs/guides/test/webdriver/example/selenium.mdx +++ b/src/content/docs/test/WebDriver/Example/selenium.mdx @@ -1,7 +1,10 @@ --- title: Selenium sidebar: - order: 2 + order: 31 + badge: + text: WIP + variant: caution --- {/* TODO: REVISE COPY TO V2 */} @@ -72,7 +75,7 @@ simply with ## Testing -Unlike the [WebdriverIO Test Suite](/guides/test/webdriver/example/webdriverio#config), Selenium does not come out of the box with a Test Suite and +Unlike the [WebdriverIO Test Suite](/test/webdriver/example/webdriverio#config), Selenium does not come out of the box with a Test Suite and leaves it up to the developer to build those out. We chose [Mocha], which is pretty neutral and not related to WebDrivers, so our script will need to do a bit of work to set up everything for us in the correct order. [Mocha] expects a testing file at `test/test.js` by default, so let's create that file now. @@ -164,7 +167,7 @@ describe('Hello Tauri', () => { If you are familiar with JS testing frameworks, `describe`, `it`, and `expect` should look familiar. We also have semi-complex `before()` and `after()` callbacks to set up and teardown mocha. Lines that are not the tests themselves have comments explaining the setup and teardown code. If you were familiar with the Spec file from the -[WebdriverIO example](/guides/test/webdriver/example/webdriverio#spec), you notice a lot more code that isn't tests, as we have to set up a few +[WebdriverIO example](/test/webdriver/example/webdriverio#spec), you notice a lot more code that isn't tests, as we have to set up a few more WebDriver related items. ## Running the Test Suite @@ -198,7 +201,7 @@ tests! With [Selenium] and some hooking up to a test suite, we just enabled e2e testing without modifying our Tauri application at all! -[example application setup]: /guides/test/webdriver/example/setup +[example application setup]: /test/webdriver/example/ [selenium]: https://selenium.dev/ [finished example project]: https://github.com/chippers/hello_tauri [mocha]: https://mochajs.org/ diff --git a/src/content/docs/guides/test/webdriver/example/webdriverio.mdx b/src/content/docs/test/WebDriver/Example/webdriverio.mdx similarity index 98% rename from src/content/docs/guides/test/webdriver/example/webdriverio.mdx rename to src/content/docs/test/WebDriver/Example/webdriverio.mdx index a2d6a8b845..d3e221104a 100644 --- a/src/content/docs/guides/test/webdriver/example/webdriverio.mdx +++ b/src/content/docs/test/WebDriver/Example/webdriverio.mdx @@ -1,7 +1,10 @@ --- title: WebdriverIO sidebar: - order: 3 + order: 31 + badge: + text: WIP + variant: caution --- {/* TODO: REVISE COPY TO V2 */} @@ -215,7 +218,7 @@ We see the Spec Reporter tell us that all 3 tests from the `test/specs/example.e Using the [WebdriverIO] test suite, we just easily enabled e2e testing for our Tauri application from just a few lines of configuration and a single command to run it! Even better, we didn't have to modify the application at all. -[example application setup]: /guides/test/webdriver/example/setup +[example application setup]: /test/webdriver/example/ [webdriverio]: https://webdriver.io/ [finished example project]: https://github.com/chippers/hello_tauri [mocha]: https://mochajs.org/ diff --git a/src/content/docs/guides/test/webdriver/ci.md b/src/content/docs/test/WebDriver/ci.md similarity index 96% rename from src/content/docs/guides/test/webdriver/ci.md rename to src/content/docs/test/WebDriver/ci.md index f279c81f22..59bb16812b 100644 --- a/src/content/docs/guides/test/webdriver/ci.md +++ b/src/content/docs/test/WebDriver/ci.md @@ -1,6 +1,11 @@ --- title: Continuous Integration description: WebDriver Testing +sidebar: + order: 21 + badge: + text: WIP + variant: caution --- @@ -96,7 +101,7 @@ jobs: working-directory: webdriver/webdriverio ``` -[previously built together]: /guides/test/webdriver/example/webdriverio +[previously built together]: /test/webdriver/example/webdriverio [webdriver]: https://www.w3.org/TR/webdriver/ [`tauri-driver`]: https://crates.io/crates/tauri-driver [webdriverio]: https://webdriver.io/ diff --git a/src/content/docs/guides/test/webdriver/index.mdx b/src/content/docs/test/WebDriver/index.mdx similarity index 90% rename from src/content/docs/guides/test/webdriver/index.mdx rename to src/content/docs/test/WebDriver/index.mdx index 52db3a127d..b64c453a7e 100644 --- a/src/content/docs/guides/test/webdriver/index.mdx +++ b/src/content/docs/test/WebDriver/index.mdx @@ -1,6 +1,12 @@ --- title: WebDriver description: WebDriver Testing +sidebar: + order: 10 + label: Overview + badge: + text: WIP + variant: caution --- {/* TODO: REVISE COPY TO V2 */} @@ -54,11 +60,11 @@ can look at https://github.com/chippers/hello_tauri. import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - - + + @@ -68,7 +74,7 @@ The above examples also comes with a CI script to test with GitHub actions, but [webdriver]: https://www.w3.org/TR/webdriver/ diff --git a/src/content/docs/test/index.mdx b/src/content/docs/test/index.mdx new file mode 100644 index 0000000000..aa15667e3e --- /dev/null +++ b/src/content/docs/test/index.mdx @@ -0,0 +1,15 @@ +--- +title: Test +description: Techniques for testing inside and outside the Tauri runtime +sidebar: + order: 1 + label: Overview + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/guides/test/mocking.md b/src/content/docs/test/mocking.md similarity index 99% rename from src/content/docs/guides/test/mocking.md rename to src/content/docs/test/mocking.md index 604b114b8e..f4b7cfa076 100644 --- a/src/content/docs/guides/test/mocking.md +++ b/src/content/docs/test/mocking.md @@ -2,6 +2,9 @@ title: Mock Tauri APIs sidebar: order: 1 + badge: + text: WIP + variant: caution --- diff --git a/tsconfig.json b/tsconfig.json index 2b146b07f0..5cd1cc8491 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,8 @@ "baseUrl": ".", "paths": { "@components/*": ["src/components/*"], - "@assets/*": ["src/assets/*"] + "@assets/*": ["src/assets/*"], + "@fragments/*": ["src/content/docs/_fragments/*"], } } }