diff --git a/config.toml b/config.toml index d5b100c2..f8b85d51 100644 --- a/config.toml +++ b/config.toml @@ -30,3 +30,7 @@ title = "Dgraph Documentation" [params] discourse = "https://discuss.dgraph.io/" site = "dgraph-docs" +[security] + enableInlineShortcodes = true + [security.funcs] + getenv = ['^HUGO_', '^CI$','VERSIONS','CURRENT_VERSION','CANONICAL_PATH','CURRENT_BRANCH','DGRAPH_ENDPOINT','CURRENT_LATEST_TAG'] diff --git a/netlify.toml b/netlify.toml index bf4a9410..a0294af8 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,20 +5,20 @@ ignore = "git diff --quiet HEAD^ HEAD ." [context.production.environment] - HUGO_VERSION = "0.79.0" + HUGO_VERSION = "0.91.0" LOOP = "false" [context.deploy-preview] command = "./scripts/local.sh --preview $DEPLOY_PRIME_URL" [context.deploy-preview.environment] - HUGO_VERSION = "0.79.0" + HUGO_VERSION = "0.91.0" LOOP = "false" HOST = "/" [context.branch-deploy] command = "./scripts/branchdeploy.sh $DEPLOY_PRIME_URL $HEAD" [context.branch-deploy.environment] - HUGO_VERSION = "0.79.0" + HUGO_VERSION = "0.91.0" LOOP = "false" HOST = "/" [[plugins]] @@ -28,5 +28,3 @@ disabled = false renderJavaScript = false template = "hierarchical" - pathPrefix = "/docs/" - customDomain = "dgraph.io" diff --git a/scripts/branchdeploy.sh b/scripts/branchdeploy.sh index 71b76a15..2e5023d0 100755 --- a/scripts/branchdeploy.sh +++ b/scripts/branchdeploy.sh @@ -16,7 +16,12 @@ RESET='\033[0m' # argument $2 is the $HEAD netlify variable which is the branch name echo "branchdeploy URL $1 branch $2" -releaseVersion=$(echo $2 | sed 's/.*\///') +if [[ $2 == "main" ]]; then + releaseVersion="main" +else + releaseVersion=$(echo $2 | sed 's/.*\///') +fi + echo "version '$releaseVersion'" VERSION_STRING="$releaseVersion" # In Unix environments, env variables should also be exported to be seen by Hugo