Skip to content

Commit

Permalink
Merge branch 'v2' into devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhyll authored May 3, 2024
2 parents 5c784e5 + 2b3b6d7 commit 7b3ee67
Show file tree
Hide file tree
Showing 250 changed files with 12,379 additions and 2,841 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

Welcome to Tauri Docs! We're excited to have you 🥳

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/tauri-apps/tauri-docs/tree/next)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/tauri-apps/tauri-docs/tree/next)
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/tauri-apps/tauri-docs/tree/v2)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/tauri-apps/tauri-docs/tree/v2)

There are a number of ways to get involved:

Expand Down
4 changes: 2 additions & 2 deletions .github/TRANSLATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ If you seek to contribute but find your language missing please let us know in h

### Maintainer Checklist for Adding New Languages

- Update https://github.com/tauri-apps/tauri-docs/blob/next/locales.json
- Update https://github.com/tauri-apps/tauri-docs/blob/next/.github/labeler.yml
- Update https://github.com/tauri-apps/tauri-docs/blob/v2/locales.json
- Update https://github.com/tauri-apps/tauri-docs/blob/v2/.github/labeler.yml

## Starting a Translation

Expand Down
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/congrats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Congrats

on:
push:
branches: [next]
branches: [v2]

jobs:
congrats:
uses: tauri-apps/automation/.github/workflows/congrats.yml@main
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}


10 changes: 5 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[submodule "packages/tauri-v2"]
path = packages/tauri-v2
url = https://github.com/tauri-apps/tauri.git
[submodule "packages/plugins-workspace"]
path = packages/plugins-workspace
url = https://github.com/tauri-apps/plugins-workspace.git
branch = v2
[submodule "packages/tauri-v1"]
path = packages/tauri-v1
[submodule "packages/awesome-tauri"]
path = packages/awesome-tauri
url = https://github.com/tauri-apps/awesome-tauri
[submodule "packages/tauri"]
path = packages/tauri
url = https://github.com/tauri-apps/tauri.git
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Welcome to the home for Tauri 2.0 documentation - we're excited to have you! ✨

This repo is used to build the docs for the **prerelease** version of Tauri 2.0 at https://beta.tauri.app.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/tauri-apps/tauri-docs/tree/next)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/tauri-apps/tauri-docs/tree/next)
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/tauri-apps/tauri-docs/tree/v2)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/tauri-apps/tauri-docs/tree/v2)

## Get Involved

Expand Down
156 changes: 57 additions & 99 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@ const authors = {
title: 'Tauri Development Lead',
picture: '/authors/wusyong.png',
},
chip: {
name: 'Chip Reed',
title: 'Tauri Security',
picture: '/authors/chip.png',
},
};

const site = 'https://beta.tauri.app';
const site = 'https://v2.tauri.app';

// https://astro.build/config
export default defineConfig({
Expand All @@ -72,10 +77,12 @@ export default defineConfig({
discord: 'https://discord.com/invite/tauri',
twitter: 'https://twitter.com/TauriApps',
mastodon: 'https://fosstodon.org/@TauriApps',
rss: `${site}/rss`,
},
components: {
SiteTitle: 'src/components/overrides/SiteTitle.astro',
Footer: 'src/components/overrides/Footer.astro',
Header: 'src/components/overrides/Header.astro',
ThemeSelect: 'src/components/overrides/ThemeSelect.astro',
},
head: [
Expand All @@ -87,112 +94,63 @@ export default defineConfig({
tag: 'meta',
attrs: { property: 'twitter:image', content: site + '/og.png?v=1' },
},
{
tag: 'script',
attrs: {
src: '/navigate.js',
},
},
],
// TODO: Be sure this is updated when the branch is switched
editLink: {
baseUrl: 'https://github.com/tauri-apps/tauri-docs/edit/next',
baseUrl: 'https://github.com/tauri-apps/tauri-docs/edit/v2',
},
customCss: ['./src/styles/custom.css'],
sidebar: [
{
label: 'Quick Start',
items: [
{ label: 'What is Tauri?', link: 'guides' },
{
label: 'Prerequisites',
translations: {
es: 'Prerrequisitos',
},
link: 'guides/prerequisites',
},
{
label: 'Create a Project',
link: 'guides/create',
},
{
label: 'Frontend Configuration',
translations: {
es: 'Configuración del Frontend',
},
link: 'guides/frontend',
},
{
label: 'Upgrade & Migrate',
link: 'guides/upgrade-migrate',
},
{
label: 'Core Concepts',
link: 'concepts',
},
{
label: 'Troubleshooting',
link: 'guides/troubleshoot',
},
],
collapsed: true,
autogenerate: { directory: 'start' },
},
{
label: 'Guides',
items: [
{
label: 'Develop',
link: 'guides/develop/',
},
{
label: 'Debug',
link: 'guides/debug/',
},
{
label: 'Test',
link: 'guides/test',
},
{
label: 'Build',
link: 'guides/build',
},
{
label: 'Distribute',
link: 'guides/distribute',
},
{
label: 'Plugin Development',
link: 'guides/plugins',
},
],
label: 'Core Concepts',
collapsed: true,
autogenerate: { directory: 'concepts' },
},
{
label: 'References',
items: [
{
label: 'List of References',
link: '/references',
},
{
label: 'Tauri Configuration',
link: '/references/v2/config',
},
{
label: 'Access Control List',
link: '/references/v2/acl',
},
{
label: 'Command Line Interface (CLI)',
link: '/references/v2/cli',
},
{
label: 'JavaScript API',
link: '/references/v2/js',
},
{
label: 'Rust API (via Docs.rs)',
// TODO: Is there a way to link this to the latest pre-released version?
link: 'https://docs.rs/tauri/~2.0.0-beta',
},
],
label: 'Security',
collapsed: true,
autogenerate: { directory: 'security' },
},
{
label: 'Develop',
collapsed: true,
autogenerate: { directory: 'develop' },
},
{
label: 'Test',
collapsed: true,
autogenerate: { directory: 'test' },
},
{
label: 'Distribute',
collapsed: true,
autogenerate: { directory: 'distribute' },
},
{
label: 'Learn',
collapsed: true,
autogenerate: { directory: 'learn' },
},
{
label: 'Features & Recipes',
collapsed: true,
autogenerate: { directory: 'features' },
},
{
label: 'References',
collapsed: true,
autogenerate: { directory: 'references' },
},
],
locales,
lastUpdated: true,
Expand Down Expand Up @@ -253,15 +211,15 @@ 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',
'/guides/test/webdriver/example/selenium'
),
...i18nRedirect(
'/v1/guides/testing/webdriver/example/webdriverio',
'/guides/test/webdriver/example/webdriverio'
'/test/webdriver/example/webdriverio'
),

// v1 /references
Expand All @@ -285,9 +243,9 @@ export default defineConfig({
...i18nRedirect('/v1/references/configuration-files', '/references/configuration-files'),
...i18nRedirect('/v1/references/webview-versions', '/references/webview-versions'),

// Decommissioned locales
'/ko/[...slug]': '/[...slug]',
'/it/[...slug]': '/[...slug]',
// Decommissioned locales -> refer to /public/_redirects file
// '/ko/[...slug]': '/[...slug]',
// '/it/[...slug]': '/[...slug]',
},
//
});
Expand All @@ -299,9 +257,9 @@ function i18nRedirect(from, to) {
locale === 'root'
? (routes[from] = to)
: (routes[`/${locale}/${from.replaceAll(/^\/*/g, '')}`] = `/${locale}/${to.replaceAll(
/^\/*/g,
''
)}`)
/^\/*/g,
''
)}`)
);
return routes;
}
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,37 @@
"version": "0.0.1",
"scripts": {
"dev:setup:submodules": "git submodule update --init",
"dev:setup:tauri-v1": "yarn --cwd packages/tauri-v1/tooling/api",
"dev:setup:tauri-v2": "yarn --cwd packages/tauri-v2/tooling/api",
"dev:setup:tauri": "yarn --cwd packages/tauri/tooling/api",
"dev:setup:plugins-workspace": "pnpm --prefix packages/plugins-workspace install",
"dev:setup": "pnpm dev:setup:submodules && pnpm dev:setup:tauri-v1 && pnpm dev:setup:tauri-v2 && pnpm dev:setup:plugins-workspace",
"dev:setup": "pnpm dev:setup:submodules && pnpm dev:setup:tauri && pnpm dev:setup:plugins-workspace",
"dev": "astro dev",
"format": "prettier -w --cache --plugin prettier-plugin-astro .",
"build:references": "pnpm --filter js-api-generator run build",
"build:releases": "pnpm --filter releases-generator run build",
"build:config": "pnpm --filter config-generator run build",
"build:astro": "astro build",
"build:i18n": "pnpm --filter docs-i18n-tracker run build",
"build": "pnpm dev:setup && pnpm build:references && pnpm build:config && pnpm build:astro && pnpm build:i18n",
"build": "pnpm dev:setup && pnpm build:references && pnpm build:config && pnpm build:releases && pnpm build:astro && pnpm build:i18n",
"preview": "astro preview"
},
"dependencies": {
"@astrojs/markdown-remark": "^4.2.1",
"@astrojs/starlight": "^0.20.1",
"@astrojs/rss": "^4.0.5",
"@astrojs/markdown-remark": "^5.0.0",
"@astrojs/starlight": "^0.22.0",
"@types/json-schema": "^7.0.15",
"astro": "^4.4.4",
"astro-feelback": "^0.3.4",
"jsdom": "^24.0.0",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0",
"rehype-autolink-headings": "^7.1.0",
"semver": "^7.6.0",
"sharp": "^0.33.2",
"shiki": "^1.1.7",
"starlight-blog": "^0.5.0",
"starlight-links-validator": "^0.5.3"
"starlight-blog": "^0.7.0",
"starlight-links-validator": "^0.8.0"
},
"pnpm": {
"patchedDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/awesome-tauri
Submodule awesome-tauri added at b583bc
10 changes: 3 additions & 7 deletions packages/config-generator/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ import { existsSync, writeFileSync } from 'node:fs';
import { slug } from 'github-slugger';

buildConfig(
'../tauri-v1/core/tauri-config-schema/schema.json',
'../../src/content/docs/references/v1/config.md'
);
buildConfig(
'../tauri-v2/core/tauri-config-schema/schema.json',
'../../src/content/docs/references/v2/config.md'
'../tauri/core/tauri-config-schema/schema.json',
'../../src/content/docs/references/config.md'
);

async function buildConfig(schemaFile: string, outputFile: string) {
Expand All @@ -19,7 +15,7 @@ async function buildConfig(schemaFile: string, outputFile: string) {
let schema: JSONSchema7 = (await import(schemaFile)).default;

const output = [
'---\n# NOTE: This file is auto-generated in packages/config-generator/build.ts\n# For corrections please edit https://github.com/tauri-apps/tauri/blob/dev/core/tauri-utils/src/config.rs directly\n\ntitle: Configuration\n---',
'---\n# NOTE: This file is auto-generated in packages/config-generator/build.ts\n# For corrections please edit https://github.com/tauri-apps/tauri/blob/dev/core/tauri-utils/src/config.rs directly\n\ntitle: Configuration\nsidebar:\n order: 1\n---',
];

output.push(
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n-tracker/lib/translation-status/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ <h1>Tauri Docs Translation Status</h1>

<p>
Read the
<a href="https://github.com/tauri-apps/tauri-docs/blob/next/.github/TRANSLATING.md"
<a href="https://github.com/tauri-apps/tauri-docs/blob/v2/.github/TRANSLATING.md"
>Translations Guide</a
>
for how to translate a document. Before starting a new translation, be sure to check the
Expand Down
Loading

0 comments on commit 7b3ee67

Please sign in to comment.