Skip to content

Commit

Permalink
Use netlify config for dynamic redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Rodriguez committed Apr 11, 2024
1 parent 29c0509 commit 363bc36
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
22 changes: 21 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@
base = "site/"
command = "npm run build"
publish = "dist/"
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . src/content/docs ../examples/"
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . src/content/ ../examples/"

[build.environment]
NODE_VERSION = "20.11.1"

[[redirects]]
from = "/docs/the-zarf-cli/cli-commands/*"
to = "/commands/:splat"

[[redirects]]
from = "/docs/create-a-zarf-package/*"
to = "/ref/"

[[redirects]]
from = "/docs/deploy-a-zarf-package/*"
to = "/ref/"

[[redirects]]
from = "/examples/*"
to = "/ref/examples/:splat"

[[redirects]]
from = "/docs/:page"
to = "/:page"
1 change: 0 additions & 1 deletion site/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import remarkGemoji from "remark-gemoji";
export default defineConfig({
redirects: {
'/docs/zarf-overview': '/',
'/examples/': '/ref/examples'
},
markdown: {
remarkPlugins: [remarkGemoji],
Expand Down

0 comments on commit 363bc36

Please sign in to comment.