Revert some of the changes done in
a7324c5f15effe5d2b78992fc7b829b29152a7f9. Continue supporting the
environment variable "HUGO_ENV" which doesn't affect Hugo while still
supporting the new, official ways of setting the environment.
<body> will however get a class named by the official environment only
since it would be confusing to add both a "development" class and a
"production" class at the same time if the site is rendered using this
command for instance:
$ HUGO_ENV=production hugo server
The Ananke theme got environment support before Hugo did and when Hugo
added it in version 0.53 it was in a slightly different way. Running
"hugo server" will set the environment to "development" and running just
"hugo" will set it to "production". It can be overridden by OS
environment variable "HUGO_ENVIRONMENT" (note, not "HUGO_ENV") or by
using the --environment option.
Use "hugo.Environment" to detect environment instead and update the
README.
2.0 Enhancements
- Improve template structure
- Fixed issue where flexbox was configured improperly and the side column expanded with longer content.
- No longer assume that posts are called "post"
- Simplify tag handling
- Improve related posts handling
- Support native Table of contents (if declared in params)
- Add DISQUS commenting (if disqusShortname added to config)
- Uses Hugo's Related content feature
- Add asset hashing to Webpack for performance
Let's say your `.Site.Title` is "My Website". The code grabs `.Site.Title`, and then then checks to see if there's a `.Title`. When you're on the homepage, `.Title` is equivalent to `.Site.Title`, so that the browser bar will read:
> My Website | My Website
If we qualify `.Title` by confining to the `.Params` namespace, then the site title isn't duplicated:
```<title>{{ block "title" . }}{{ .Site.Title }} {{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}</title>```
> My Website
But it still picks up `.Title` from posts and pages, where a content title exists in front matter:
> My Website | About Me