github.com/lyeb/hugo@v0.47.1/docs/content/en/news/0.16-relnotes/index.md (about)

     1  ---
     2  date: 2016-06-06T13:54:06-04:00
     3  description: "Hugo 0.16 is our best and biggest release ever. The Hugo community has outdone itself with continued performance improvements, beautiful themes and increased stability."
     4  title: "Hugo 0.16"
     5  categories: ["Releases"]
     6  aliases: [/0-16/]
     7  ---
     8  
     9  Hugo 0.16 is our best and biggest release ever. The Hugo community has
    10  outdone itself with continued performance improvements,
    11  [beautiful themes](http://themes.gohugo.io) for all types of sites from project
    12  sites to documentation to blogs to portfolios, and increased stability.
    13  
    14  This release represents **over 550 contributions by over 110 contributors** to
    15  the main Hugo code base. Since last release Hugo has **gained 3500 stars, 90
    16  contributors and 23 additional themes.**
    17  
    18  This release celebrates 3 years since  {{< gh "@spf13" >}} wrote the first lines
    19  of Hugo. During those 3 years Hugo has accomplished some major milestones
    20  including...
    21  
    22  * 10,000+ stars on GitHub
    23  * 320+ contributors
    24  * 90+ themes
    25  * 1000s of happy websites
    26  * Many subprojects like {{< gh "@spf13/cobra">}}, {{< gh "@spf13/viper">}} and
    27    {{< gh "@spf13/afero">}} which have experienced broad usage across the Go
    28    ecosystem.
    29  
    30  {{< gh "@bep" >}} led the development of Hugo for the 3rd consecutive release
    31  with nearly half of the contributions to 0.16 in addition to his considerable
    32  contributions as lead maintainer. {{< gh "@anthonyfok" >}}, {{< gh
    33  "@DigitalCraftsman" >}}, {{< gh "@MooreReason" >}} all made significant
    34  contributions. A special thanks to {{< gh "@abourget" >}} for his considerable
    35  work on multilingual support. Due to its broad impact we wanted to spend more
    36  time testing it and it will be included in Hugo's next release.
    37  
    38  ### Highlights
    39  
    40  **Partial Builds:** Prior to this release Hugo would always reread and rebuild
    41  the entire site. This release introduces support for reactive site building
    42  while watching (`hugo server`). Hugo will watch the filesystem for changes and
    43  only re-read the changed files. Depending on the files change Hugo will
    44  intelligently re-render only the needed portion of the site. Performance gains
    45  depend on the operation performed and size of the site. In our testing build
    46  times decreased anywhere from 10% to 99%.
    47  
    48  **Template Improvements:** Template improvements continue to be a mainstay of each Hugo release. Hugo 0.16 adds support for the new `block` keyword introduced in Go 1.6 -- think base templates with default sections -- as well as many new template functions.
    49  
    50  **Polish:** As Hugo matures releases will inevitably contain fewer huge new features. This release represents hundreds of small improvements across ever facet of Hugo which will make for a much better experience for all of our users. Worth mentioning here is the curious bug where live reloading didn't work in some editors on OS X, including the popular TextMate 2. This is now fixed. Oh, and now any error will exit with an error code, a big thing for automated deployments.
    51  
    52  ### New Features
    53  * Support reading configuration variables from the OS environment {{<gh 2090 >}}
    54  * Add emoji support {{<gh 1892>}}
    55  * Add `themesDir` option to configuration {{<gh 1556>}}
    56  * Add support for Go 1.6 `block` keyword in templates {{<gh 1832>}}
    57  * Partial static sync {{<gh 1644>}}
    58  * Source file based relative linking (à la GitHub) {{<gh 0x0f6b334b6715253b030c4e783b88e911b6e53e56>}}
    59  * Add `ByLastmod` sort function to pages. {{<gh 0xeb627ca16de6fb5e8646279edd295a8bf0f72bf1 >}}
    60  * New templates functions:
    61      * `readFile` {{<gh 1551 >}}
    62      * `countwords` and `countrunes` {{<gh 1440>}}
    63      * `default` {{<gh 1943>}}
    64      * `hasPrefix` {{<gh 1243>}}
    65      * `humanize` {{<gh 1818>}}
    66      * `jsonify` {{<gh 0x435e996c4fd48e9009ffa9f83a19fb55f0777dbd>}}
    67      * `md5` and `sha1` {{<gh 1932>}}
    68      * `replaceRE` {{<gh 1845>}}
    69      * `findRE` {{<gh 2048>}}
    70      * `shuffle` {{<gh 1942>}}
    71      * `slice` {{<gh 1902>}}
    72      * `plainify` {{<gh 1915>}}
    73  
    74  ### Enhancements
    75  
    76  * Hugo now exits with error code on any error. This is a big thing for
    77    automated deployments. {{<gh 740 >}}
    78  * Print error when `/index.html` is zero-length {{<gh 947>}}
    79  * Enable dirname and filename bash autocompletion for more flags {{<gh
    80    0x666ddd237791b56fd048992dca9a27d1af50a10e>}}
    81  * Improve error handling in commands {{<gh 1502>}}
    82  * Add sanity checks for `hugo import jekyll` {{<gh 1625 >}}
    83  * Add description to `Page.Params` {{<gh 1484>}}
    84  * Add async version of Google Analytics internal template {{<gh 1711>}}
    85  * Add autostart option to YouTube shortcode {{<gh 1784>}}
    86  * Set Date and Lastmod for main home page {{<gh 1903>}}
    87  * Allow URL with extension in front matter {{<gh 1923>}}
    88  * Add list support in Scratch {{<gh
    89    0xeaba04e82bdfc5d4c29e970f11b4aab9cc0efeaa>}}
    90  * Add file option to gist shortcode {{<gh 1955>}}
    91  * Add config layout and content directory CLI options {{<gh 1698>}}
    92  * Add boolean value comparison to `where` template function {{<gh
    93    0xf3c74c9db484c8961e70cb3458f9e41e7832fa12>}}
    94  * Do not write to cache when `ignoreCache` is set  {{<gh 2067>}}
    95  * Add option to disable rendering of 404 page  {{<gh 2037>}}
    96  * Mercurial is no longer needed to build Hugo {{<gh 2062 >}}
    97  * Do not create `robots.txt` by default {{<gh 2049>}}
    98  * Disable syntax guessing for PygmentsCodeFences by default.  To enable syntax
    99    guessing again, add the following to your config file:
   100    `PygmentsCodeFencesGuessSyntax = true` {{<gh 2034>}}
   101  * Make `ByCount` sort consistently {{<gh 1930>}}
   102  * Add `Scratch` to shortcode {{<gh 2000>}}
   103  * Add support for symbolic links for content, layout, static, theme  {{<gh 1855
   104    >}}
   105  * Add '+' as one of the valid characters in URLs specified in the front matter
   106    {{<gh 1290 >}}
   107  * Make alias redirect output URLs relative when `RelativeURLs = true` {{<gh
   108    2093 >}}
   109  * Hugo injects meta generator tag on homepage if missing {{<gh
   110    2182 >}}
   111  
   112  ### Fixes
   113  * Fix file change watcher for TextMate 2 and friends on OS X {{<gh 1053 >}}
   114  * Make dynamic reloading of config file reliable on all platform {{<gh 1684 >}}
   115  * Hugo now works on Linux/arm64 {{<gh 1772 >}}
   116  * `plainIDAnchors` now defaults to `true`  {{<gh 2057>}}
   117  * Win32 and ARM builds fixed {{<gh 1716>}}
   118  * Copy static dir files without theme's static dir {{<gh 1656>}}
   119  * Make `noTimes` command flag work {{<gh 1657>}}
   120  * Change most global CLI flags into local ones {{<gh 1624>}}
   121  * Remove transformation of menu URLs {{<gh 1239>}}
   122  * Do not fail on unknown Jekyll file {{<gh 1705>}}
   123  * Use absolute path when editing with editor {{<gh 1589>}}
   124  * Fix hugo server "Watching for changes" path display {{<gh 1721>}}
   125  * Do not strip special characters out of URLs {{<gh 1292>}}
   126  * Fix `RSSLink` when uglyURLs are enabled {{<gh 175>}}
   127  * Get BaseURL from viper in server mode {{<gh 1821>}}
   128  * Fix shortcode handling in RST {{<gh 1904>}}
   129  * Use default sitemap configuration for homepage {{<gh 1304>}}
   130  * Exit if specific port is unavailable in server mode {{<gh 1901>}}
   131  * Fix regression in "section menus for lazy blogger" {{<gh 2065>}}
   132  
   133  ****
   134  
   135  ## **0.15.0**  November 25, 2015
   136  
   137  The v0.15.0 Hugo release brings a lot of polish to Hugo. Exactly 6 months after
   138  the 0.14 release, Hugo has seen massive growth and changes. Most notably, this
   139  is Hugo's first release under the Apache 2.0 license. With this license change
   140  we hope to expand the great community around Hugo and make it easier for our
   141  many users to contribute.  This release represents over **377 contributions by
   142  87 contributors** to the main Hugo repo and hundreds of improvements to the
   143  libraries Hugo uses. Hugo also launched a [new theme
   144  showcase](http://themes.gohugo.io) and participated in
   145  [Hacktoberfest](https://hacktoberfest.digitalocean.com).
   146  
   147  Hugo now has:
   148  
   149  * 6700 (+2700) stars on GitHub
   150  * 235 (+75) contributors
   151  * 65 (+30) themes
   152  
   153  
   154  **Template Improvements:** This release takes Hugo to a new level of speed and
   155  usability. Considerable work has been done adding features and performance to
   156  the template system which now has full support of Ace, Amber and Go Templates.
   157  
   158  **Hugo Import:** Have a Jekyll site, but dreaming of porting it to Hugo? This
   159  release introduces a new `hugo import jekyll`command that makes this easier
   160  than ever.
   161  
   162  **Performance Improvements:** Just when you thought Hugo couldn't get any faster,
   163  Hugo continues to improve in speed while adding features. Notably Hugo 0.15
   164  introduces the ability to render and serve directly from memory resulting in
   165  30%+ lower render times.
   166  
   167  Huge thanks to all who participated in this release. A special thanks to
   168  {{< gh "@bep" >}} who led the development of Hugo this release again,
   169  {{< gh "@anthonyfok" >}},
   170  {{< gh "@eparis" >}},
   171  {{< gh "@tatsushid" >}} and
   172  {{< gh "@DigitalCraftsman" >}}.
   173  
   174  
   175  ### New features
   176  * new `hugo import jekyll` command. {{< gh 1469 >}}
   177  * The new `Param` convenience method on `Page` and `Node` can be used to get the most specific parameter value for a given key. {{< gh 1462 >}}
   178  * Several new information elements have been added to `Page` and `Node`:
   179      * `RuneCount`: The number of [runes](http://blog.golang.org/strings) in the content, excluding any whitespace. This may be a good alternative to `.WordCount`  for Japanese and other CJK languages where a word-split by spaces makes no sense.  {{< gh 1266 >}}
   180      * `RawContent`: Raw Markdown as a string. One use case may be of embedding remarkjs.com slides.
   181      * `IsHome`: tells the truth about whether you're on the home page or not.
   182  
   183  ### Improvements
   184  * `hugo server` now builds ~30%+ faster by rendering to memory instead of disk. To get the old behavior, start the server with `--renderToDisk=true`.
   185  * Hugo now supports dynamic reloading of the config file when watching.
   186  * We now use a custom-built `LazyFileReader` for reading file contents, which means we don't read media files in `/content` into memory anymore -- and file reading is now performed in parallel on multicore PCs. {{< gh 1181 >}}
   187  * Hugo is now built with `Go 1.5` which, among many other improvements, have fixed the last known data race in Hugo. {{< gh 917 >}}
   188  * Paginator now also supports page groups. {{< gh 1274 >}}
   189  * Markdown improvements:
   190      * Hugo now supports GitHub-flavoured markdown code fences for highlighting for `md`-files (Blackfriday rendered markdown) and `mmark` files (MMark rendered markdown). {{< gh 362 1258 >}}
   191      * Several new Blackfriday options are added:
   192          * Option to disable Blackfriday's `Smartypants`.
   193          * Option for Blackfriday to open links in a new window/tab. {{< gh 1220 >}}
   194          * Option to disable Blackfriday's LaTeX style dashes {{< gh 1231 >}}
   195          * Definition lists extension support.
   196  * `Scratch` now has built-in `map` support.
   197  * We now fall back to `link title` for the default page sort. {{< gh 1299 >}}
   198  * Some notable new configuration options:
   199      *  `IgnoreFiles` can be set with a list of Regular Expressions that matches files to be ignored during build. {{< gh 1189 >}}
   200      * `PreserveTaxonomyNames`, when set to `true`, will preserve what you type as the taxonomy name both in the folders created and the taxonomy `key`, but it will be normalized for the URL.  {{< gh 1180 >}}
   201  * `hugo gen` can now generate man files, bash auto complete and markdown documentation
   202  * Hugo will now make suggestions when a command is mistyped
   203  * Shortcodes now have a boolean `.IsNamedParams` property. {{< gh 1597 >}}
   204  
   205  ### New Template Features
   206  * All template engines:
   207      * The new `dict` function that could be used to pass maps into a template. {{< gh 1463 >}}
   208      * The new `pluralize` and `singularize` template funcs.
   209      * The new `base64Decode` and `base64Encode` template funcs.
   210      * The `sort` template func now accepts field/key chaining arguments and pointer values. {{< gh 1330 >}}
   211      * Several fixes for `slicestr` and `substr`, most importantly, they now have full `utf-8`-support. {{< gh 1190 1333 1347 >}}
   212      * The new `last` template function allows the user to select the last `N` items of a slice. {{< gh 1148 >}}
   213      * The new `after` func allows the user to select the items after the `Nth` item. {{< gh 1200 >}}
   214      * Add `time.Time` type support to the `where`, `ge`, `gt`, `le`, and `lt` template functions.
   215      * It is now possible to use constructs like `where Values ".Param.key" nil` to filter pages that doesn't have a particular parameter. {{< gh 1232 >}}
   216      * `getJSON`/`getCSV`: Add retry on invalid content. {{< gh 1166 >}}
   217      *   The new `readDir` func lists local files. {{< gh 1204 >}}
   218      * The new `safeJS` function allows the embedding of content into JavaScript contexts in Go templates.
   219      * Get the main site RSS link from any page by accessing the `.Site.RSSLink` property. {{< gh 1566 >}}
   220  * Ace templates:
   221      * Base templates now also works in themes. {{< gh 1215 >}}.
   222      * And now also on Windows. {{< gh 1178 >}}
   223  * Full support for Amber templates including all template functions.
   224  * A built-in template for Google Analytics. {{< gh 1505 >}}
   225  * Hugo is now shipped with new built-in shortcodes: {{< gh 1576 >}}
   226    * `youtube` for YouTube videos
   227    * `vimeo` for Vimeo videos
   228    * `gist` for GitHub gists
   229    * `tweet` for Twitter Tweets
   230    * `speakerdeck` for Speakerdeck slides
   231  
   232  
   233  ### Bugfixes
   234  * Fix data races in page sorting and page reversal. These operations are now also cached. {{< gh 1293 >}}
   235  * `page.HasMenuCurrent()` and `node.HasMenuCurrent()` now work correctly in multi-level nested menus.
   236  * Support `Fish and Chips` style section titles. Previously, this would end up as  `Fish And Chips`. Now, the first character is made toupper, but the rest are preserved as-is. {{< gh 1176 >}}
   237  * Hugo now removes superfluous p-tags around shortcodes. {{< gh 1148 >}}
   238  
   239  ### Notices
   240  * `hugo server` will watch by default now.
   241  * Some fields and methods were deprecated in `0.14`. These are now removed, so the error message isn't as friendly if you still use the old values. So please change:
   242      *   `getJson` to `getJSON`, `getCsv` to `getCSV`, `safeHtml` to
   243    `safeHTML`, `safeCss` to `safeCSS`, `safeUrl` to `safeURL`, `Url` to `URL`,
   244    `UrlPath` to `URLPath`, `BaseUrl` to `BaseURL`, `Recent` to `Pages`.
   245  
   246  ### Known Issues
   247  
   248  Using the Hugo v0.15 32-bit Windows or ARM binary, running `hugo server` would crash or hang due to a [memory alignment issue](https://golang.org/pkg/sync/atomic/#pkg-note-BUG) in [Afero](https://github.com/spf13/afero).  The bug was discovered shortly after the v0.15.0 release and has since been [fixed](https://github.com/spf13/afero/pull/23) by {{< gh "@tpng" >}}.  If you encounter this bug, you may either compile Hugo v0.16-DEV from source, or use the following solution/workaround:
   249  
   250  * **64-bit Windows users: Please use [hugo_0.15_windows_amd64.zip](https://github.com/gohugoio/hugo/releases/download/v0.15/hugo_0.15_windows_amd64.zip)** (amd64 == x86-64).  It is only the 32-bit hugo_0.15_windows_386.zip that crashes/hangs (see {{< gh 1621 >}} and {{< gh 1628 >}}).
   251  * **32-bit Windows and ARM users: Please run `hugo server --renderToDisk` as a workaround** until Hugo v0.16 is released (see [“hugo server” returns runtime error on armhf](https://discourse.gohugo.io/t/hugo-server-returns-runtime-error-on-armhf/2293) and {{< gh 1716 >}}).