Fix the header-nav links option

This commit is contained in:
Shane Kilkelly 2016-12-21 14:57:47 +00:00
parent 453311136f
commit fa29f0f19d

View file

@ -305,7 +305,7 @@ settings =
references: true
templates: true
#### OPTIONAL CONFIGERABLE SETTINGS
## OPTIONAL CONFIGERABLE SETTINGS
if process.env["SHARELATEX_LEFT_FOOTER"]?
try
@ -323,8 +323,11 @@ if process.env["SHARELATEX_RIGHT_FOOTER"]?
if process.env["SHARELATEX_HEADER_IMAGE_URL"]?
settings.nav.custom_logo = process.env["SHARELATEX_HEADER_IMAGE_URL"]
if process.env["SHARELATEX_HEADER"]?
settings.nav.header = process.env["SHARELATEX_HEADER_NAV_LINKS"]
if process.env["SHARELATEX_HEADER_NAV_LINKS"]?
try
settings.nav.header = JSON.parse(process.env["SHARELATEX_HEADER_NAV_LINKS"])
catch e
console.error("could not parse SHARELATEX_HEADER_NAV_LINKS, not valid JSON")
# if process.env["SHARELATEX_PROXY_LEARN"]?
# settings.nav.header.push({text: "help", class: "subdued", dropdown: [{text: "documentation", url: "/learn"}] })