Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-22Fix case issues with ParamsBjørn Erik Pedersen
There are currently several Params and case related issues floating around in Hugo. This is very confusing for users and one of the most common support questions on the forum. And while there have been done some great leg work in Viper etc., this is of limited value since this and similar doesn't work: `Params.myCamelCasedParam` Hugo has control over all the template method invocations, and can take care of all the lower-casing of the map lookup keys. But that doesn't help with direct template lookups of type `Site.Params.TWITTER_CONFIG.USER_ID`. This commit solves that by doing some carefully crafted modifications of the templates' AST -- lowercasing the params keys. This is low-level work, but it's not like the template API wil change -- and this is important enough to defend such "bit fiddling". Tests are added for all the template engines: Go templates, Ace and Amber. Fixes #2615 Fixes #1129 Fixes #2590
2016-11-22node to page: Re-add translations sort of regular pagesBjørn Erik Pedersen
Was removed by mistake. Updates #2297
2016-11-22node to page: Fix site pages sortBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Fixe index page translation issuesBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Don't repeat the RSS title if it is the sameBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Temporary set RSS date to zeroBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Render aliases before pagesBjørn Erik Pedersen
Some sites, Hugo docs included, have faulty alias definitions that point to itself or another real page. These will be overwritten in the next step. This is how it behaves in Hugo 0.17, too. Updates #2297
2016-11-22node to page: Need to append theme templatesBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Only return regular pages in home.Data.PagesBjørn Erik Pedersen
Returning all types is both confusing and too breaking. All page types can be fetched in .Site.Pages. Updates #2297
2016-11-22node to page: Final TODO-fixesBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Fix the Page copy()Bjørn Erik Pedersen
By embeding the init sync.Once var in a pointer so we can reset it when we copy the page. Updates #2297
2016-11-22node to page: Misc. TODO-fixesBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle URLsBjørn Erik Pedersen
This includes removing the error return value from Permalink and RelPermalink. We ignore that error all over the place, so we might as well remove it. Updates #2297
2016-11-22node to page: Remove NodeBjørn Erik Pedersen
And misc. TODO-fixes Updates #2297
2016-11-22node to page: Make Kind a stringBjørn Erik Pedersen
Having a custom string type isn't worth it when it doesn't work with `where`, `eq` etc. Fixes #2689 Updates #2297
2016-11-22node to page: Rename PageType to KindBjørn Erik Pedersen
And embed that on Page. Updates #2297
2016-11-22node to page: Export GetPage to the templatesBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle Date and LastmodBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Add Pages to PageBjørn Erik Pedersen
As an alias to .Data.Pages for home page etc. Also renamte NodeType to PageType and make it a string so it can be used in `where`. Updates #2297
2016-11-22node to page: Make Nodes into PagesBjørn Erik Pedersen
* `.Site.Pages` now contains all page types, including sections etc. * `.Data.Pages` will also contain "node type" pages where relevant. Updates #2297
2016-11-22node to page: Refactor the build processBjørn Erik Pedersen
To make it easier to follow and understand. Both building and rebuilding now follow a four step flow: 1. Init 2. Process 3. Assemble 4. Render And now there are only one Build method, used for both builds and rebuilds. Updates #2297
2016-11-22node to page: Handle sections with only _index.mdBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle aliases on home page etc.Bjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle menus on home page etc.Bjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle taxonomies on home page etc.Bjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Add all nodes to sitemapBjørn Erik Pedersen
Updates #2297 Fixes #1303
2016-11-22node to page: Do not create section node for rootBjørn Erik Pedersen
Because that will overwrite the home page, which is bad. Updates #2297
2016-11-22node to page: Get Rebuild up to speedBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Fix home target path on WindowsBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Remove unused codeBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle aliases, 404, robots.txt, sitemapBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle translationsBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Fix the page collectionsBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Use _index as identificator for the list nodesBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle RSSBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Create pages for nodes without contentBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle taxonomy termsBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle taxonomy listsBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle sectionsBjørn Erik Pedersen
Updates #2297
2016-11-22node to page: Handle homeBjørn Erik Pedersen
With refactored paginator handling. Updates #2297
2016-11-22node to page: Basic outlineBjørn Erik Pedersen
Updates #2297
2016-11-22Revert "Fix case issues with Params"Bjørn Erik Pedersen
This reverts commit 239c75c7f866e8970b794a9e7bac73de46052241. There is a ininite loop in there somewhere on my site that needs to be resolved.
2016-11-22Fix case issues with ParamsBjørn Erik Pedersen
There are currently several Params and case related issues floating around in Hugo. This is very confusing for users and one of the most common support questions on the forum. And while there have been done some great leg work in Viper etc., this is of limited value since this and similar doesn't work: `Params.myCamelCasedParam` Hugo has control over all the template method invocations, and can take care of all the lower-casing of the map lookup keys. But that doesn't help with direct template lookups of type `Site.Params.TWITTER_CONFIG.USER_ID`. This commit solves that by doing some carefully crafted modifications of the templates' AST -- lowercasing the params keys. This is low-level work, but it's not like the template API wil change -- and this is important enough to defend such "bit fiddling". Tests are added for all the template engines: Go templates, Ace and Amber. Fixes #2615 Fixes #1129 Fixes #2590
2016-11-20hugolib: Don't write zero-bytes files to diskBjørn Erik Pedersen
Fixes #2709
2016-11-16tpl: Add imageConfig functionTristan Rice
Add imageConfig function which calls image.DecodeConfig and returns the height, width and color mode of the image. (#2677) This allows for more advanced image shortcodes and templates such as those required by AMP. layouts/shortcodes/amp-img.html ``` {{ $src := .Get "src" }} {{ $config := imageConfig (printf "/static/%s" $src) }} <amp-img src="{{$src}}" height="{{$config.Height}}" width="{{$config.Width}}" layout="responsive"> </amp-img> ```
2016-11-07hugolib: Must update PathSpec on SiteInfo per languageBjørn Erik Pedersen
2016-11-07commands, tpl: Get rid of repeating viper accessesAlbert Nigmatzianov
* all: Delete some blank lines * commands, tpl: Get rid of repeating viper accesses
2016-11-06hugolib: Fix page sorting when weight is zeroBjørn Erik Pedersen
Fixes #2673
2016-11-05hugolib: Simplify rangeBjørn Erik Pedersen
2016-11-02Add GitInfoBjørn Erik Pedersen
This commit adds a `GitInfo` object to `Page` if `EnableGitInfo` is set. It then also sets `Lastmod` for the given `Page` to the author date provided by Git. The Git integrations should be fairly performant, but it adds "some time" to the build, somewhat depending on the Git history size. If you want, you can run without during development and turn it on when deploying to the live server: `hugo --enableGitInfo`. Fixes #2102