From 89cbf78892cb90e38cc5d59ce6106470b104d223 Mon Sep 17 00:00:00 2001 From: Simon Hyll Date: Mon, 22 Apr 2024 17:32:03 +0200 Subject: [PATCH] fix: link validation --- astro.config.mjs | 4 +- packages/config-generator/build.ts | 2 +- .../core/tauri-config-schema/schema.json | 4 +- packages/tauri/core/tauri-utils/src/config.rs | 2 +- packages/tauri/tooling/cli/schema.json | 4 +- .../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 +- .../Inter-Process Communication/brownfield.md | 4 + .../Inter-Process Communication/index.mdx | 3 + .../Inter-Process Communication/isolation.md | 8 +- src/content/docs/concepts/architecture.mdx | 7 +- src/content/docs/concepts/index.mdx | 5 +- src/content/docs/concepts/process-model.md | 3 + src/content/docs/concepts/rendering.mdx | 3 + src/content/docs/concepts/size.mdx | 3 + .../docs/develop/Debug/application.mdx | 2 +- .../docs/develop/Debug/crabnebula-cloud.mdx | 5 + src/content/docs/develop/Debug/index.mdx | 5 + .../docs/develop/Plugins/develop-mobile.mdx | 10 +- src/content/docs/develop/Plugins/index.mdx | 16 +- src/content/docs/develop/calling-rust.mdx | 4 + .../docs/develop/configuration-files.md | 15 +- src/content/docs/develop/index.mdx | 5 + src/content/docs/develop/state-management.mdx | 28 + .../docs/distribute/Pipelines/github.mdx | 5 + .../docs/distribute/Pipelines/gitlab.mdx | 5 + .../docs/distribute/Pipelines/index.mdx | 5 + src/content/docs/distribute/app-store.mdx | 5 + src/content/docs/distribute/debian.mdx | 5 + src/content/docs/distribute/index.mdx | 5 + src/content/docs/distribute/play-store.mdx | 5 + src/content/docs/distribute/steam.mdx | 5 + src/content/docs/features/autostart.mdx | 4 + src/content/docs/features/biometric.mdx | 4 + src/content/docs/features/cli.mdx | 4 + src/content/docs/features/clipboard.mdx | 4 + src/content/docs/features/file-system.mdx | 4 + src/content/docs/features/global-shortcut.mdx | 4 + src/content/docs/features/http-client.mdx | 6 +- src/content/docs/features/localhost.mdx | 4 + src/content/docs/features/logging.mdx | 4 + src/content/docs/features/nfc.mdx | 4 + src/content/docs/features/os-info.mdx | 4 + src/content/docs/features/persisted-scope.mdx | 4 + src/content/docs/features/positioner.mdx | 4 + src/content/docs/features/process.mdx | 4 + src/content/docs/features/shell.mdx | 4 + src/content/docs/features/single-instance.mdx | 4 + src/content/docs/features/sql.mdx | 4 + src/content/docs/features/store.mdx | 4 + src/content/docs/features/stronghold.mdx | 4 + src/content/docs/features/updater.mdx | 4 + src/content/docs/features/upload.mdx | 4 + src/content/docs/features/websocket.mdx | 4 + .../docs/features/window-customization.mdx | 4 + src/content/docs/features/window-state.mdx | 4 + src/content/docs/references/.gitignore | 10 +- src/content/docs/references/acl.mdx | 175 ++++++ src/content/docs/references/cli.mdx | 534 ++++++++++++++++++ src/content/docs/references/config.md | 4 +- .../docs/references/environment-variables.mdx | 3 + src/content/docs/security/best-practices.mdx | 4 + src/content/docs/security/capabilities.mdx | 8 +- src/content/docs/security/csp.mdx | 4 + src/content/docs/security/development.mdx | 4 + src/content/docs/security/ecosystem.mdx | 4 + src/content/docs/security/future.mdx | 4 + src/content/docs/security/index.mdx | 21 +- src/content/docs/security/permissions.mdx | 4 + .../docs/security/runtime-authority.mdx | 4 + src/content/docs/security/scope.mdx | 4 + .../start/Frontend Configuration/index.mdx | 24 +- .../start/Frontend Configuration/leptos.mdx | 4 + .../start/Frontend Configuration/qwik.mdx | 4 + .../start/Frontend Configuration/svelte.mdx | 4 + .../start/Frontend Configuration/sycamore.mdx | 4 + .../start/Frontend Configuration/vite.mdx | 4 + .../start/Frontend Configuration/webpack.mdx | 4 + .../docs/start/Frontend Configuration/yew.mdx | 4 + .../start/Upgrade & Migrate/from-electron.mdx | 4 + .../start/Upgrade & Migrate/from-existing.mdx | 11 + .../start/Upgrade & Migrate/from-flutter.mdx | 4 + .../docs/start/Upgrade & Migrate/index.mdx | 9 +- src/content/docs/start/create-project.mdx | 83 +++ src/content/docs/start/index.mdx | 6 +- src/content/docs/start/prerequisites.mdx | 12 +- src/content/docs/test/Pipelines/github.mdx | 5 + src/content/docs/test/Pipelines/gitlab.mdx | 5 + src/content/docs/test/Pipelines/index.mdx | 5 + .../docs/test/WebDriver/Example/index.mdx | 2 +- .../docs/test/WebDriver/Example/selenium.mdx | 6 +- .../test/WebDriver/Example/webdriverio.mdx | 2 +- src/content/docs/test/WebDriver/ci.md | 2 +- src/content/docs/test/WebDriver/index.mdx | 8 +- src/content/docs/test/index.mdx | 5 + tsconfig.json | 3 +- 177 files changed, 1313 insertions(+), 198 deletions(-) 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 => _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%) create mode 100644 src/content/docs/develop/state-management.mdx create mode 100644 src/content/docs/references/acl.mdx create mode 100644 src/content/docs/references/cli.mdx create mode 100644 src/content/docs/start/Upgrade & Migrate/from-existing.mdx create mode 100644 src/content/docs/start/create-project.mdx diff --git a/astro.config.mjs b/astro.config.mjs index 9dcd21881b..5a9ad78491 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -206,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', @@ -214,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/packages/config-generator/build.ts b/packages/config-generator/build.ts index 7bfd81e741..343c56626e 100644 --- a/packages/config-generator/build.ts +++ b/packages/config-generator/build.ts @@ -15,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/tauri/core/tauri-config-schema/schema.json b/packages/tauri/core/tauri-config-schema/schema.json index e8c2be4a7e..a6fe046d90 100644 --- a/packages/tauri/core/tauri-config-schema/schema.json +++ b/packages/tauri/core/tauri-config-schema/schema.json @@ -1721,7 +1721,7 @@ "additionalProperties": false }, "WebviewInstallMode": { - "description": "Install modes for the Webview2 runtime. Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\nFor more information see .", + "description": "Install modes for the Webview2 runtime. Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\nFor more information see .", "oneOf": [ { "description": "Do not install the Webview2 as part of the Windows Installer.", @@ -2452,4 +2452,4 @@ "additionalProperties": true } } -} \ No newline at end of file +} diff --git a/packages/tauri/core/tauri-utils/src/config.rs b/packages/tauri/core/tauri-utils/src/config.rs index b88374085c..b2517a28ff 100644 --- a/packages/tauri/core/tauri-utils/src/config.rs +++ b/packages/tauri/core/tauri-utils/src/config.rs @@ -700,7 +700,7 @@ impl Default for NSISInstallerMode { /// Install modes for the Webview2 runtime. /// Note that for the updater bundle [`Self::DownloadBootstrapper`] is used. /// -/// For more information see . +/// For more information see . #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] #[serde(tag = "type", rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "schema", derive(JsonSchema))] diff --git a/packages/tauri/tooling/cli/schema.json b/packages/tauri/tooling/cli/schema.json index e8c2be4a7e..a6fe046d90 100644 --- a/packages/tauri/tooling/cli/schema.json +++ b/packages/tauri/tooling/cli/schema.json @@ -1721,7 +1721,7 @@ "additionalProperties": false }, "WebviewInstallMode": { - "description": "Install modes for the Webview2 runtime. Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\nFor more information see .", + "description": "Install modes for the Webview2 runtime. Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\nFor more information see .", "oneOf": [ { "description": "Do not install the Webview2 as part of the Windows Installer.", @@ -2452,4 +2452,4 @@ "additionalProperties": true } } -} \ No newline at end of file +} 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..e1790bf3f8 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/js/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/es/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/es/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..f5682a730f 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/js/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..4e4e686628 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/js/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..14c4bbdc66 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/js/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..389623292a 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/js/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..aa31a5431f 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/js/core/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..b74733f9a5 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/js/core/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 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 index bace436a6c..97ba0a4e71 100644 --- a/src/content/docs/concepts/Inter-Process Communication/index.mdx +++ b/src/content/docs/concepts/Inter-Process Communication/index.mdx @@ -2,6 +2,9 @@ title: Inter-Process Communication sidebar: 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 index be3a21e3f4..55d6f60061 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 +[security: threat models]: /security/development [events]: /references/js/core/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 3d2ac9440a..631d65bb44 100644 --- a/src/content/docs/concepts/architecture.mdx +++ b/src/content/docs/concepts/architecture.mdx @@ -2,13 +2,16 @@ 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 @@ -133,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 24f27f9670..c57c115497 100644 --- a/src/content/docs/concepts/index.mdx +++ b/src/content/docs/concepts/index.mdx @@ -3,6 +3,9 @@ title: Core Concepts sidebar: order: 0 label: Overview + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; @@ -21,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 c2dba7b6c4..f0619fa3dd 100644 --- a/src/content/docs/concepts/process-model.md +++ b/src/content/docs/concepts/process-model.md @@ -2,6 +2,9 @@ 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 372913aeca..4a6e9d3ee8 100644 --- a/src/content/docs/concepts/rendering.mdx +++ b/src/content/docs/concepts/rendering.mdx @@ -2,6 +2,9 @@ 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 f635d59234..64995be08d 100644 --- a/src/content/docs/concepts/size.mdx +++ b/src/content/docs/concepts/size.mdx @@ -2,6 +2,9 @@ title: App Size sidebar: order: 0 + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/develop/Debug/application.mdx b/src/content/docs/develop/Debug/application.mdx index 0a930e47d0..033337b9f6 100644 --- a/src/content/docs/develop/Debug/application.mdx +++ b/src/content/docs/develop/Debug/application.mdx @@ -113,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 index 565b280e8a..afcbaa490b 100644 --- a/src/content/docs/develop/Debug/crabnebula-cloud.mdx +++ b/src/content/docs/develop/Debug/crabnebula-cloud.mdx @@ -5,4 +5,9 @@ sidebar: 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 index 4d863a4767..404e6f6410 100644 --- a/src/content/docs/develop/Debug/index.mdx +++ b/src/content/docs/develop/Debug/index.mdx @@ -6,4 +6,9 @@ sidebar: text: WIP variant: caution --- + +import Stub from '@components/Stub.astro'; + + + \ No newline at end of file diff --git a/src/content/docs/develop/Plugins/develop-mobile.mdx b/src/content/docs/develop/Plugins/develop-mobile.mdx index 30e77d79b2..dfa755deeb 100644 --- a/src/content/docs/develop/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/js/core/namespacecore/#addpluginlistener) helper function: ```javascript import { addPluginListener, PluginListener } from '@tauri-apps/api/tauri'; diff --git a/src/content/docs/develop/Plugins/index.mdx b/src/content/docs/develop/Plugins/index.mdx index 8cbc317fbf..5b655787b5 100644 --- a/src/content/docs/develop/Plugins/index.mdx +++ b/src/content/docs/develop/Plugins/index.mdx @@ -21,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 */} @@ -29,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}`. @@ -72,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 @@ -124,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 @@ -263,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`): @@ -342,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" @@ -456,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/develop/calling-rust.mdx b/src/content/docs/develop/calling-rust.mdx index 59cd067d7c..06aeff4934 100644 --- a/src/content/docs/develop/calling-rust.mdx +++ b/src/content/docs/develop/calling-rust.mdx @@ -1,5 +1,9 @@ --- title: Calling Rust from the Frontend +sidebar: + 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/develop/configuration-files.md b/src/content/docs/develop/configuration-files.md index bd855947cd..c26a445579 100644 --- a/src/content/docs/develop/configuration-files.md +++ b/src/content/docs/develop/configuration-files.md @@ -2,6 +2,9 @@ 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. @@ -10,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 @@ -110,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/develop/index.mdx b/src/content/docs/develop/index.mdx index 75c6731112..75f783f07c 100644 --- a/src/content/docs/develop/index.mdx +++ b/src/content/docs/develop/index.mdx @@ -8,4 +8,9 @@ sidebar: text: WIP variant: caution --- + +import Stub from '@components/Stub.astro'; + + + \ No newline at end of file diff --git a/src/content/docs/develop/state-management.mdx b/src/content/docs/develop/state-management.mdx new file mode 100644 index 0000000000..f08342fcfc --- /dev/null +++ b/src/content/docs/develop/state-management.mdx @@ -0,0 +1,28 @@ +--- +title: State Management +--- + +import Stub from '@components/Stub.astro'; + + + +Define a state struct and let Tauri manage it: + +```rust +use std::{collections::HashMap, sync::Mutex}; +use tauri::{Manager, plugin::Builder}; + +#[derive(Default)] +struct Store(Mutex>); + +Builder::new("") + .setup(|app, api| { + app.manage(Store::default()); + + // retrieve the store later + let store = app.state::(); + Ok(()) + }) +``` + + diff --git a/src/content/docs/distribute/Pipelines/github.mdx b/src/content/docs/distribute/Pipelines/github.mdx index 043d1eb862..aa3f057ee3 100644 --- a/src/content/docs/distribute/Pipelines/github.mdx +++ b/src/content/docs/distribute/Pipelines/github.mdx @@ -5,3 +5,8 @@ sidebar: 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 index f4fa1a6e25..7d109ee55a 100644 --- a/src/content/docs/distribute/Pipelines/gitlab.mdx +++ b/src/content/docs/distribute/Pipelines/gitlab.mdx @@ -5,3 +5,8 @@ sidebar: 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 index 312a2b1baf..e735c050d2 100644 --- a/src/content/docs/distribute/Pipelines/index.mdx +++ b/src/content/docs/distribute/Pipelines/index.mdx @@ -6,3 +6,8 @@ sidebar: 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 index a392aec764..1b1aee4078 100644 --- a/src/content/docs/distribute/app-store.mdx +++ b/src/content/docs/distribute/app-store.mdx @@ -6,3 +6,8 @@ sidebar: 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 index 169749d325..97414c317a 100644 --- a/src/content/docs/distribute/debian.mdx +++ b/src/content/docs/distribute/debian.mdx @@ -6,3 +6,8 @@ sidebar: 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 index 6b3066a410..babed8ca3e 100644 --- a/src/content/docs/distribute/index.mdx +++ b/src/content/docs/distribute/index.mdx @@ -7,3 +7,8 @@ sidebar: 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 index e20e25aa37..2313d0ee51 100644 --- a/src/content/docs/distribute/play-store.mdx +++ b/src/content/docs/distribute/play-store.mdx @@ -6,3 +6,8 @@ sidebar: 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 index 33043d2389..be89fe7923 100644 --- a/src/content/docs/distribute/steam.mdx +++ b/src/content/docs/distribute/steam.mdx @@ -6,3 +6,8 @@ sidebar: text: WIP variant: caution --- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/features/autostart.mdx b/src/content/docs/features/autostart.mdx index 8469de0c4e..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'; diff --git a/src/content/docs/features/biometric.mdx b/src/content/docs/features/biometric.mdx index 5bfe38946c..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'; diff --git a/src/content/docs/features/cli.mdx b/src/content/docs/features/cli.mdx index fedd30d9d3..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'; 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/file-system.mdx b/src/content/docs/features/file-system.mdx index d8d80fc7f1..174acf02d1 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'; diff --git a/src/content/docs/features/global-shortcut.mdx b/src/content/docs/features/global-shortcut.mdx index 7648a8b367..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'; 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/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 a9408d470a..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'; diff --git a/src/content/docs/features/nfc.mdx b/src/content/docs/features/nfc.mdx index 33c717c126..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'; diff --git a/src/content/docs/features/os-info.mdx b/src/content/docs/features/os-info.mdx index 86fc982aee..27c02b3c8b 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'; 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 d07042cd17..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'; 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 46fdcf6d82..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'; 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 cd85b041b5..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'; diff --git a/src/content/docs/features/stronghold.mdx b/src/content/docs/features/stronghold.mdx index 9e53fd400a..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'; diff --git a/src/content/docs/features/updater.mdx b/src/content/docs/features/updater.mdx index 9e41a8bc24..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'; 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 faa23e3815..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'; diff --git a/src/content/docs/features/window-customization.mdx b/src/content/docs/features/window-customization.mdx index 59fa183acd..2159ba08fc 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'; diff --git a/src/content/docs/features/window-state.mdx b/src/content/docs/features/window-state.mdx index 5e60d384af..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'; diff --git a/src/content/docs/references/.gitignore b/src/content/docs/references/.gitignore index a105ff5be1..09d5ed9314 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 +js/* +!js/index.mdx diff --git a/src/content/docs/references/acl.mdx b/src/content/docs/references/acl.mdx new file mode 100644 index 0000000000..a8bb8248a5 --- /dev/null +++ b/src/content/docs/references/acl.mdx @@ -0,0 +1,175 @@ +--- +title: Access Control List +sidebar: + order: 1 +--- + +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. +To enable access to the commands your application needs, you must define a list of permissions you need access. + +## Capabilities + +A capability groups a collection of permissions with an associated list of windows so you can configure access control on single and multi window applications. + +You define capabilities as either a JSON or a TOML file inside the `src-tauri/capabilities` directory. + +The following JSON defines a capability that enables default functionality for core plugins and the `window.setTitle` API. + +```json title="src-tauri/capabilities/main.json +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "main-capability", + "description": "Capability for the main window", + "windows": ["main"], + "permissions": [ + "path:default", + "event:default", + "window:default", + "app:default", + "resources:default", + "menu:default", + "tray:default", + "window:allow-set-title" + ] +} +``` + +### Target Platform + +Capabilities can be platform-specific by defining the `platforms` array. +By default the capability is applied to all targets, +but you can select a subset of the `linux`, `macOS`, `windows`, `iOS` and `android` targets. + +For example, let's define a capability for desktop. Note it enables permissions on plugins that are only available on desktop: + +```json title="src-tauri/capabilities/desktop.json +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "desktop-capability", + "windows": ["main"], + "platforms": ["linux", "macOS", "windows"], + "permissions": ["global-shortcut:allow-register"] +} +``` + +And define a capability for mobile. Note it enables permissions on plugins that are only available on mobile: + +```json title="src-tauri/capabilities/mobile.json +{ + "$schema": "../gen/schemas/mobile-schema.json", + "identifier": "mobile-capability", + "windows": ["main"], + "platforms": ["iOS", "android"], + "permissions": [ + "nfc:allow-scan", + "biometric:allow-authenticate", + "barcode-scanner:allow-scan" + ] +} +``` + +### JSON Schema + +Tauri generates a JSON schema with all the permissions that are available to your application so you have autocompletion in your IDE. +To use the schema, set the `$schema` property to one of the schemas inside the `capabilities/schemas` directory, which are platform-specific. +Usually you will set it to `../gen/schemas/desktop-schema.json` or `../gen/schemas/mobile-schema.json` though you can also define a capability for a specific target platform. + +In the example above we defined specific capabilities for desktop and mobile, and referenced the associated JSON schema. Let's define a capability only for Linux: + +```json title="src-tauri/capabilities/linux.json +{ + "$schema": "../gen/schemas/linux-schema.json", + "identifier": "linux-capability", + "windows": ["main"], + "platforms": ["iOS", "android"], + "permissions": ["dbus::call"] +} +``` + +### Multiwindow + +The `windows` property defines the list of windows that should reference the list of permissions. You can use glob patterns to reference dynamic window labels. + +The following example links the capability with the `main` window and any window with label prefixed with `editor-`. + +```json title="src-tauri/capabilities/mobile.json +{ + "windows": ["main", "editor-*"], + "permissions": [ + ... + ] +} +``` + +### Scopes + +Scopes further restrict the commands. Their format is plugin-specific, but Tauri offers primitives to allow and deny certain actions of the command, usually restricting command input. +For instance, the `fs` plugin allows you to use scopes to allow or deny certain directories and files, and the `http` plugin uses scopes to filter URLs that are allowed to be reached. + +Let's study some examples for official plugins: + +- allow any `fs` command to access the app data directory: + +```json title="src-tauri/capabilities/base.json +{ + "permissions": [ + { + "identifier": "fs:scope", + "allow": [{ "path": "$APPDATA" }, { "path": "$APPDATA/**" }] + } + ] +} +``` + +:::note +`fs:scope` is an empty permission defined by the fs plugin just to let you define global scopes +::: + +- allow the `fs` `rename` command to access the home directory: + +```json title="src-tauri/capabilities/base.json +{ + "permissions": [ + { + "identifier": "fs:allow-rename", + "allow": [{ "path": "$HOME/**" }] + } + ] +} +``` + +- configure scope for the `http` plugin: + +```json title="src-tauri/capabilities/base.json +{ + "permissions": [ + { + "identifier": "http:default", + "allow": [{ "url": "https://*.tauri.app" }], + "deny": [{ "url": "https://private.tauri.app" }] + } + ] +} +``` + +### Remote Access + +By default each capability only applies to your application's embedded content (either your `devUrl` or `frontendDist` frontend). +If you want to allow a remote URL to access Tauri commands (which is dangerous and should be configured carefully), you can use the `context` property. + +In the following example, we associate the capability with any `tauri.app` subdomain: + +```json title="src-tauri/capabilities/remote.json +{ + "remote": { + "urls": ["https://*.tauri.app"] + }, + "local": false, + "permissions": [ + ... + ] +} +``` diff --git a/src/content/docs/references/cli.mdx b/src/content/docs/references/cli.mdx new file mode 100644 index 0000000000..239bd771ab --- /dev/null +++ b/src/content/docs/references/cli.mdx @@ -0,0 +1,534 @@ +--- +title: Command Line Interface (CLI) +sidebar: + order: 1 +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import CommandTabs from '@components/CommandTabs.astro'; + +The Tauri command line interface (CLI) is the way to interact with Tauri throughout the development lifecycle. + +You can add the Tauri CLI to your current project using your package manager of choice: + + +{/* TODO: 2.0 */} + +:::tip[Developing a Plugin] + +For CLI commands related to developing plugins visit the [Develop a Tauri Plugin guide](/develop/plugins). + +::: + +## List of Commands + +| Command | Description | +| ----------------------------- | -------------------------------------------------------------------- | +| [`build`](#build) | Tauri build | +| [`dev`](#dev) | Tauri dev | +| [`icon`](#icon) | Generates various icons for all major platforms | +| [`info`](#info) | Shows information about Tauri dependencies and project configuration | +| [`init`](#init) | Initializes a Tauri project | +| [`add`](#add) | Manage Tauri plugins | +| [`signer`](#signer) | Tauri updater signer | +| [`completions`](#completions) | Shell completions | +| [`ios`](#ios) | iOS commands | +| [`android`](#android) | Android commands | +| [`migrate`](#migrate) | Migrate from v1 to v2 | +| [`help`](#help) | Print this message or the help of the given subcommand(s) | + +## `build` + + + +``` +Tauri build + +Usage: cargo tauri build [OPTIONS] [ARGS]... + +Arguments: + [ARGS]... + Command line arguments passed to the runner + +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 +``` + +## `dev` + + + +``` +Tauri dev + +Usage: cargo tauri dev [OPTIONS] [ARGS]... + +Arguments: + [ARGS]... Command line arguments passed to the runner. Arguments after `--` are passed to the application + +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 + --force-ip-prompt Force prompting for an IP to use to connect to the dev server on mobile + -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 `tauri.conf.json` file. + +If you have entered a command to the `build.beforeDevCommand` property, this one will be executed before the dev command. + +## `icon` + + + +``` +Generates various icons for all major platforms + +Usage: cargo tauri icon [OPTIONS] [INPUT] + +Arguments: + [INPUT] Path to the source icon (png, 1240x1240px 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 + --ios-color The background color of the iOS icon - string as defined in the W3C's CSS Color Module Level 4 [default: #fff] + -h, --help Print help + -V, --version Print version +``` + +## `info` + + + +``` +Shows information about Tauri dependencies and project configuration + +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 +``` + +`tauri info` shows a concise list of information about the environment, Rust, Node.js and their versions as well as a few relevant project configurations. + +## `init` + + + +``` +Initializes a Tauri project + +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: C:\Users\Fabian-Lars] + -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 +``` + +## `add` + + + +``` +Installs a plugin on the project + +Usage: cargo tauri add [OPTIONS] + +Arguments: + The plugin to add + +Options: + -t, --tag Git tag to use + -v, --verbose... Enables verbose logging + -r, --rev Git rev to use + -b, --branch Git branch to use + -h, --help Print help + -V, --version Print version +``` + +## `signer` + + + +``` +Tauri updater signer + +Usage: cargo tauri signer [OPTIONS] + +Commands: + sign Sign a file + generate Generate keypair to sign files + help Print this message or the help of the given subcommand(s) + +Options: + -v, --verbose... Enables verbose logging + -h, --help Print help + -V, --version Print version +``` + +## `completions` + + + +``` +Shell 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"' +``` + + + + +## `android` + + + +``` +Android commands + +Usage: cargo tauri android [OPTIONS] + +Commands: + init Initializes a Tauri Android project + open Open project in Android Studio + dev Android dev + build Android build + help Print this message or the help of the given subcommand(s) + +Options: + -v, --verbose... Enables verbose logging + -h, --help Print help + -V, --version Print version +``` + +## `ios` + + + +``` +iOS commands + +Usage: cargo tauri ios [OPTIONS] + +Commands: + init Initializes a Tauri iOS project + open Open project in Xcode + dev iOS dev + build iOS build + help Print this message or the help of the given subcommand(s) + +Options: + -v, --verbose... Enables verbose logging + -h, --help Print help + -V, --version Print version +``` + +## `migrate` + + + +``` +Migrate from v1 to v2 + +Usage: cargo tauri migrate [OPTIONS] + +Options: + -v, --verbose... Enables verbose logging + -h, --help Print help + -V, --version Print version +``` + +## `help` + + + +``` +Command line interface for building Tauri apps + +Usage: cargo tauri [OPTIONS] + +Commands: + build Tauri build + dev Tauri dev + icon Generates various icons for all major platforms + info Shows information about Tauri dependencies and project configuration + init Initializes a Tauri project + plugin Manage Tauri plugins + signer Tauri updater signer + completions Shell completions + android Android commands + ios iOS commands + migrate Migrate from v1 to v2 + help Print this message or the help of the given subcommand(s) + +Options: + -v, --verbose... Enables verbose logging + -h, --help Print help + -V, --version Print version +``` diff --git a/src/content/docs/references/config.md b/src/content/docs/references/config.md index 330186e11c..8b958c4bc0 100644 --- a/src/content/docs/references/config.md +++ b/src/content/docs/references/config.md @@ -3,6 +3,8 @@ # For corrections please edit https://github.com/tauri-apps/tauri/blob/dev/core/tauri-utils/src/config.rs directly title: Configuration +sidebar: + order: 1 --- @@ -1557,7 +1559,7 @@ Tray icon tooltip on Windows and macOS Install modes for the Webview2 runtime. Note that for the updater bundle [`Self::DownloadBootstrapper`] is used. -For more information see <https://tauri.app/v1/guides/building/windows>. +For more information see <https://tauri.app/v1/guides/developing/windows>. ### WebviewUrl diff --git a/src/content/docs/references/environment-variables.mdx b/src/content/docs/references/environment-variables.mdx index 092f14c8cc..d77b1ee947 100644 --- a/src/content/docs/references/environment-variables.mdx +++ b/src/content/docs/references/environment-variables.mdx @@ -2,6 +2,9 @@ title: Environment Variables sidebar: order: 1 + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/security/best-practices.mdx b/src/content/docs/security/best-practices.mdx index 141b54708d..551f8c4a81 100644 --- a/src/content/docs/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/security/capabilities.mdx b/src/content/docs/security/capabilities.mdx index 4f99c111ec..3f3ac8f7b6 100644 --- a/src/content/docs/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. @@ -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/security/csp.mdx b/src/content/docs/security/csp.mdx index 78f4634c5a..13f069233c 100644 --- a/src/content/docs/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/security/development.mdx b/src/content/docs/security/development.mdx index 071e4fb7a1..2e3c8e560d 100644 --- a/src/content/docs/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/security/ecosystem.mdx b/src/content/docs/security/ecosystem.mdx index a25a2f823b..bacd1a88b1 100644 --- a/src/content/docs/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/security/future.mdx b/src/content/docs/security/future.mdx index 481a1307ea..f1eabdcc31 100644 --- a/src/content/docs/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/security/index.mdx b/src/content/docs/security/index.mdx index 5a67f8df78..d009a345e2 100644 --- a/src/content/docs/security/index.mdx +++ b/src/content/docs/security/index.mdx @@ -3,6 +3,9 @@ title: Security sidebar: order: 1 label: Overview + badge: + text: WIP + variant: caution --- import { CardGrid, LinkCard } from '@astrojs/starlight/components'; @@ -45,12 +48,12 @@ in the capabilities configuration. Learn more about the individual components and boundary enforcement: - - - + + + @@ -61,7 +64,7 @@ of choice, but Tauri provides generic features to control and contain the attack - + - - + + ## Coordinated Disclosure diff --git a/src/content/docs/security/permissions.mdx b/src/content/docs/security/permissions.mdx index 0805f8a4ed..4a991162f3 100644 --- a/src/content/docs/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/security/runtime-authority.mdx b/src/content/docs/security/runtime-authority.mdx index 7798cf74f7..df82fb25f4 100644 --- a/src/content/docs/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/security/scope.mdx b/src/content/docs/security/scope.mdx index 2bfc007db5..b39e595d48 100644 --- a/src/content/docs/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. diff --git a/src/content/docs/start/Frontend Configuration/index.mdx b/src/content/docs/start/Frontend Configuration/index.mdx index e0374226c9..a297172c4a 100644 --- a/src/content/docs/start/Frontend Configuration/index.mdx +++ b/src/content/docs/start/Frontend Configuration/index.mdx @@ -13,11 +13,11 @@ 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. ::: -## Frontend Agnostic +## 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. @@ -35,19 +35,19 @@ Below is a checklist of common scenarios needed to integrate a frontend with Tau ## JavaScript - - - - - - + + + + + + ## Rust - - - - + + + + diff --git a/src/content/docs/start/Frontend Configuration/leptos.mdx b/src/content/docs/start/Frontend Configuration/leptos.mdx index 87986abf7e..cab6b7788d 100644 --- a/src/content/docs/start/Frontend Configuration/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/start/Frontend Configuration/qwik.mdx b/src/content/docs/start/Frontend Configuration/qwik.mdx index 758566d764..4d2ed6e09e 100644 --- a/src/content/docs/start/Frontend Configuration/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/start/Frontend Configuration/svelte.mdx b/src/content/docs/start/Frontend Configuration/svelte.mdx index e94db0fc8e..853e791fe4 100644 --- a/src/content/docs/start/Frontend Configuration/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/start/Frontend Configuration/sycamore.mdx b/src/content/docs/start/Frontend Configuration/sycamore.mdx index 4560770065..bc773d67a7 100644 --- a/src/content/docs/start/Frontend Configuration/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/start/Frontend Configuration/vite.mdx b/src/content/docs/start/Frontend Configuration/vite.mdx index 40abceaf01..6a7c7fca35 100644 --- a/src/content/docs/start/Frontend Configuration/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/start/Frontend Configuration/webpack.mdx b/src/content/docs/start/Frontend Configuration/webpack.mdx index 59c7da461b..a34ef3967b 100644 --- a/src/content/docs/start/Frontend Configuration/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/start/Frontend Configuration/yew.mdx b/src/content/docs/start/Frontend Configuration/yew.mdx index 66d54db990..39263490fd 100644 --- a/src/content/docs/start/Frontend Configuration/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/start/Upgrade & Migrate/from-electron.mdx b/src/content/docs/start/Upgrade & Migrate/from-electron.mdx index cc13299b6f..6ad83c2b18 100644 --- a/src/content/docs/start/Upgrade & Migrate/from-electron.mdx +++ b/src/content/docs/start/Upgrade & Migrate/from-electron.mdx @@ -1,5 +1,9 @@ --- title: Migrate from Electron +sidebar: + 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..5b229ea607 --- /dev/null +++ b/src/content/docs/start/Upgrade & Migrate/from-existing.mdx @@ -0,0 +1,11 @@ +--- +title: Existing Project +sidebar: + badge: + text: WIP + variant: caution +--- + +import Stub from '@components/Stub.astro'; + + diff --git a/src/content/docs/start/Upgrade & Migrate/from-flutter.mdx b/src/content/docs/start/Upgrade & Migrate/from-flutter.mdx index 41c2e11f67..0147cf09d4 100644 --- a/src/content/docs/start/Upgrade & Migrate/from-flutter.mdx +++ b/src/content/docs/start/Upgrade & Migrate/from-flutter.mdx @@ -1,5 +1,9 @@ --- title: Migrate from Flutter +sidebar: + badge: + text: WIP + variant: caution --- import Stub from '@components/Stub.astro'; diff --git a/src/content/docs/start/Upgrade & Migrate/index.mdx b/src/content/docs/start/Upgrade & Migrate/index.mdx index 57d8f6b0c4..5ac98703e0 100644 --- a/src/content/docs/start/Upgrade & Migrate/index.mdx +++ b/src/content/docs/start/Upgrade & Migrate/index.mdx @@ -2,6 +2,9 @@ title: Upgrade & Migrate sidebar: label: Overview + badge: + text: WIP + variant: caution --- Learn about common scenarios and steps to upgrade from Tauri 1.0 or migrate from another framework. @@ -11,14 +14,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/start/index.mdx b/src/content/docs/start/index.mdx index 0d6588c13d..bd0bd9558b 100644 --- a/src/content/docs/start/index.mdx +++ b/src/content/docs/start/index.mdx @@ -13,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'; @@ -47,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/start/prerequisites.mdx b/src/content/docs/start/prerequisites.mdx index 536e060920..793565c0d2 100644 --- a/src/content/docs/start/prerequisites.mdx +++ b/src/content/docs/start/prerequisites.mdx @@ -193,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 @@ -216,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 @@ -316,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 @@ -342,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 index 043d1eb862..aa3f057ee3 100644 --- a/src/content/docs/test/Pipelines/github.mdx +++ b/src/content/docs/test/Pipelines/github.mdx @@ -5,3 +5,8 @@ sidebar: 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 index f4fa1a6e25..7d109ee55a 100644 --- a/src/content/docs/test/Pipelines/gitlab.mdx +++ b/src/content/docs/test/Pipelines/gitlab.mdx @@ -5,3 +5,8 @@ sidebar: 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 index f1b5a22ba3..e409322a39 100644 --- a/src/content/docs/test/Pipelines/index.mdx +++ b/src/content/docs/test/Pipelines/index.mdx @@ -6,3 +6,8 @@ sidebar: text: WIP variant: caution --- + +import Stub from '@components/Stub.astro'; + + + diff --git a/src/content/docs/test/WebDriver/Example/index.mdx b/src/content/docs/test/WebDriver/Example/index.mdx index 784e733b94..ebb590cadb 100644 --- a/src/content/docs/test/WebDriver/Example/index.mdx +++ b/src/content/docs/test/WebDriver/Example/index.mdx @@ -194,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/test/WebDriver/Example/selenium.mdx b/src/content/docs/test/WebDriver/Example/selenium.mdx index 8c2557f9bd..e69ba3b491 100644 --- a/src/content/docs/test/WebDriver/Example/selenium.mdx +++ b/src/content/docs/test/WebDriver/Example/selenium.mdx @@ -75,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. @@ -167,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 @@ -201,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/test/WebDriver/Example/webdriverio.mdx b/src/content/docs/test/WebDriver/Example/webdriverio.mdx index aea409db97..d3e221104a 100644 --- a/src/content/docs/test/WebDriver/Example/webdriverio.mdx +++ b/src/content/docs/test/WebDriver/Example/webdriverio.mdx @@ -218,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/test/WebDriver/ci.md b/src/content/docs/test/WebDriver/ci.md index 4efda9e169..59bb16812b 100644 --- a/src/content/docs/test/WebDriver/ci.md +++ b/src/content/docs/test/WebDriver/ci.md @@ -101,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/test/WebDriver/index.mdx b/src/content/docs/test/WebDriver/index.mdx index e9da8da24d..b64c453a7e 100644 --- a/src/content/docs/test/WebDriver/index.mdx +++ b/src/content/docs/test/WebDriver/index.mdx @@ -60,11 +60,11 @@ can look at https://github.com/chippers/hello_tauri. import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - - + + @@ -74,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 index 49baa67fe3..aa15667e3e 100644 --- a/src/content/docs/test/index.mdx +++ b/src/content/docs/test/index.mdx @@ -8,3 +8,8 @@ sidebar: text: WIP variant: caution --- + +import Stub from '@components/Stub.astro'; + + + 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/*"], } } }