Grob
March 29, 2017, 12:39pm
1
Dear developers, users und fans of Hugo!
May I suggest the global param published = "private"
(or similar) with these consequences:
exclude from sitemap.xml
exclude from any index.xml
exclude from any list and archives
exclude from tags view
exclude in robots.txt
change <meta content="index, follow" name="robots">
to <meta content="noindex, follow" name="robots">
warn if linked to from a site with published = true
(maybe)
… (?)
Any other suggestions?
Of course, you could just establish a side project under a subdomain, but I would very much prefer the “private function”.
See this post.
Thank you all!
bep
March 29, 2017, 1:03pm
2
Your proposal would be easier to reason about if you said “include only in ???”.
Grob
March 29, 2017, 1:42pm
3
Thank you, bep.
I’m not quite sure what you mean. Shall I rename the topic title?
Instead of programming many, many if queries, it could be easier to treat pages with published = "private"
just like published = false
.
After generating the complete public folder generate the private html pages and replace the robots meta. That’s all, I think.
Thanks once again.
bep
March 29, 2017, 4:07pm
4
No thhe title is fine, it is just much easier to understand the shortest list.
That’s very easy to do within your theme.
The partial can query the config and output the meta mentioned.
Grob
March 29, 2017, 11:27pm
8
Well, it’s easy to exclude private pages e. g. from the sitemap. But excluding them from all items mentioned above is pretty confusing and error-prone if you adjust your web project regularly.
Overall, a private function could be a very welcome enhancement for many users.
Grob
March 29, 2017, 11:34pm
9
Your proposal would be easier to reason about if you said “include only in ???”.
Ok: Build private pages, include in “nothing” and change robots meta.
Thanks
1 Like