Skip to content

Commit

Permalink
docs/introduction: redirect to welcome subpage
Browse files Browse the repository at this point in the history
This change uses a Netlify server-side redirect so that a user clicking
on the top-level "Introduction" navbar element sees the
/docs/introduction/welcome/ page instead of the page currently served by
/docs/introduction/, which is a contentless category index.

This aligns Introduction with the top-level redirects for the navbar's
Tutorials, How-to Guides, and Concept Guides elements.

Preview-Path: /docs/introduction/
Signed-off-by: Jonathan Matthews <[email protected]>
Change-Id: Ibc186e97e4fec2c3e117de717bc3e8156dc912e8
Dispatch-Trailer: {"type":"trybot","CL":1171272,"patchset":1,"ref":"refs/changes/72/1171272/1","targetBranch":"alpha"}
  • Loading branch information
jpluscplusm authored and cueckoo committed Oct 26, 2023
1 parent 3591d71 commit 7860558
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/ci/netlify/netlify.cue
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ config: #config & {

redirects: [...{force: true, status: 302}]
redirects: [{
from: "/docs/introduction/"
to: "/docs/introduction/welcome/"
}, {
from: "/docs/tutorial/"
to: "/docs/tutorial/about-these-tutorials/"
}, {
Expand Down
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
[context.production]
command = "bash _scripts/build.bash --baseURL https://cuelang.org"

[[redirects]]
from = "/docs/introduction/"
to = "/docs/introduction/welcome/"
status = 302
force = true

[[redirects]]
from = "/docs/tutorial/"
to = "/docs/tutorial/about-these-tutorials/"
Expand Down

0 comments on commit 7860558

Please sign in to comment.