Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.

Commit

Permalink
general: add a link to the CUE playground in the top menu
Browse files Browse the repository at this point in the history
Alongside the "Documentation", "Community" and "GitHub" links.

In order that this also works for tip.cuelang.org, move to using
configuration directories per:

Per https://gohugo.io/getting-started/configuration/

This allows us then to have a different Play link for tip.cuelang.org.

Fixes #110
  • Loading branch information
myitcv committed Mar 12, 2021
1 parent 1dd8dcb commit 79b29fb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ then
exit 1
fi

env="production"

# If we are running on netlify (i.e. a deploy) and we are building tip then we
# need to grab the master of our cuelang.org/go and
# github.com/cue-sh/playground dependencies
if [ "$BRANCH" = "tip" ]
then
env="tip"
GOPROXY=direct go get -d cuelang.org/go@master
# Now force cuelang.org/go through the proxy so that the /pkg.go.dev redirect works
go get -d cuelang.org/go@$(go list -m -f={{.Version}} cuelang.org/go)
Expand Down
4 changes: 4 additions & 0 deletions config.toml → config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ disableAliases = true
name = "GitHub"
weight = 100
url = "https://github.com/cuelang/cue"
[[menu.main]]
name = "Play"
weight = 100
url = "https://cuelang.org/play"

# Configure how URLs look like per section.
[permalinks]
Expand Down
12 changes: 12 additions & 0 deletions config/tip/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[menu.main]]
name = "Documentation"
weight = -101
url = "/docs/"
[[menu.main]]
name = "GitHub"
weight = 100
url = "https://github.com/cuelang/cue"
[[menu.main]]
name = "Play"
weight = 100
url = "https://tip.cuelang.org/play"

0 comments on commit 79b29fb

Please sign in to comment.