Use hugo.IsProduction instead of checking HUGO_ENV#653
Conversation
chalin
commented
Aug 9, 2021
- Reapplies Use hugo.isProduction for production environment checks #413, which was removed by mistake in Accessibility and SEO improvements #540. For details, see https://github.com/google/docsy/pull/540/files#r685339766
- Closes Changes introducing hugo.IsProduction were overwritten #652
62c9baf to
7e2e929
Compare
|
@LisaFC - given that this essentially fixes a "regression" (a previous change that was overwritten by mistake), can it be merged soon? /cc @nate-double-u |
|
Yep, I'm just looking at it now - the main thing is that it needs to be documented and announced because it's a breaking change with regard to whether your site is indexed. (which I didn't think the original change was because I hadn't fully explored the mysterious ways of how the relevant environment variable and the current Hugo environment are not the same thing, as I did in #611) |
|
Thanks. AFAICT, |
|
I think that's true but I need to check, I remember finding some unintuitive behaviour when I explored it in #611 We also need to document for the case where |
Annoyingly, I just checked, and it isn't (or at least |
|
Right, Btw, let me know if there is anything I can do to help. |
Our HTML documentation template slaps a `<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">` on every page unless the `HUGO_ENV` environment variable is set to `production`, thereby excluding the entire documentation website from web search results. Set the variable to fix it. This behavior is inherited from Docsy, although they have changed it since: <google/docsy#653>.
Our HTML documentation template slaps a `<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">` on every page unless the `HUGO_ENV` environment variable is set to `production`, thereby excluding the entire documentation website from web search results. Set the variable to fix it. This behavior is inherited from Docsy, although they have changed it since: <google/docsy#653>.
…-ai#5623) Our HTML documentation template slaps a `<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">` on every page unless the `HUGO_ENV` environment variable is set to `production`, thereby excluding the entire documentation website from web search results. Set the variable to fix it. This behavior is inherited from Docsy, although they have changed it since: <google/docsy#653>.