zeon-studio / hugoplate

Hugoplate is a free starter template built with Hugo and TailwindCSS that will save you hours of work.
https://zeon.studio/preview?project=hugoplate
MIT License
817 stars 225 forks source link

ARG / ENV to turn off Hugo nag screen when --baseURL set #149

Closed gedw99 closed 2 hours ago

gedw99 commented 3 hours ago

baseURL args works, but the Nag screen is still there...

hugo server --baseURL=$(HUGO_RUN_BASE_URL) --enableGitInfo --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --watch --forceSyncStatic -e production --minify

But it does not get rid of the nag screen at the top of each web page which says:

" You must replace the baseURL in hugo.toml file when deploying, you can manage this announcement from the params.toml file. "

Doing this in the config seems wrong.

It's ops time when you pick a baseURL and also want to turn off the Nag screen. Hence we need a way to turn this off via ARGS / ENV, and not config.

--disableBrowserError does not turn it off. Seems silly since I set a baseURL

Anyone know ?

then we can update the code of:

hugo server --baseURL=$(HUGO_RUN_BASE_URL) --enableGitInfo --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --watch --forceSyncStatic -e production --minify
tfsomrat commented 2 hours ago

Hey @gedw99, It's an Announcement / Hellobar and could not be managed with Hugo Flags. You have to turn it off from the params.toml file. Also you can use this bar for any type of notice or anything that you want to show your visitor.

gedw99 commented 48 minutes ago

Thank !!