mirror of
https://github.com/tauri-apps/tauri-docs.git
synced 2026-01-31 00:35:16 +01:00
improve build time on PR (#2048)
* skip /releases in PR
* experiment with BRANCH env
* Revert "experiment with BRANCH env"
This reverts commit 90036a2107.
* experiment with HEAD env
* use _redirects file
* leave redirect commented
* use context 'production'
* fix netlify redirect
* add notes about redirect files
This commit is contained in:
@@ -358,9 +358,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]',
|
||||
},
|
||||
//
|
||||
});
|
||||
|
||||
@@ -190,4 +190,8 @@ function entitify(str: string): string {
|
||||
.replace(/\$\{/g, '$\\{');
|
||||
}
|
||||
|
||||
generator();
|
||||
if (process.env.CONTEXT === 'production' || process.env.HEAD?.startsWith('release-pages')) {
|
||||
generator();
|
||||
} else {
|
||||
console.info('Skipping `/release` pages build');
|
||||
}
|
||||
|
||||
5
public/_redirects
Normal file
5
public/_redirects
Normal file
@@ -0,0 +1,5 @@
|
||||
# Refer to astro.config.mjs
|
||||
|
||||
# Decommissioned locales
|
||||
/ko/* /:splat 302
|
||||
/it/* /:splat 302
|
||||
Reference in New Issue
Block a user