summaryrefslogtreecommitdiffstats
path: root/hugolib/page_output.go
AgeCommit message (Collapse)Author
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-04-12hugolib: Must recreate Paginator on live-reloadBjørn Erik Pedersen
The structure may potentially have changed, and then it fails. Fixes #3315
2017-04-12hugolib: Avoid recreating the Paginator on copyBjørn Erik Pedersen
See #3315
2017-04-08hugolib, output: Add NotAlternative to OutputFormatBjørn Erik Pedersen
To make sure CSS and similar does not appear in the AlternativeOutputFormats list.
2017-04-04hugolib: Add optional outputFormat to Ref/RelRefBjørn Erik Pedersen
Fixes #3224
2017-04-02tpl: Rework to handle both text and HTML templatesBjørn Erik Pedersen
Before this commit, Hugo used `html/template` for all Go templates. While this is a fine choice for HTML and maybe also RSS feeds, it is painful for plain text formats such as CSV, JSON etc. This commit fixes that by using the `IsPlainText` attribute on the output format to decide what to use. A couple of notes: * The above requires a nonambiguous template name to type mapping. I.e. `/layouts/_default/list.json` will only work if there is only one JSON output format, `/layouts/_default/list.mytype.json` will always work. * Ambiguous types will fall back to HTML. * Partials inherits the text vs HTML identificator of the container template. This also means that plain text templates can only include plain text partials. * Shortcode templates are, by definition, currently HTML templates only. Fixes #3221
2017-04-02Revert "tpl: Rework to handle both text and HTML templates"Bjørn Erik Pedersen
Will have to take another stab at this ... This reverts commit 5c5efa03d2512749950b0d05a7d4bde35ecbdc37. Closes #3260
2017-04-02tpl: Rework to handle both text and HTML templatesBjørn Erik Pedersen
Before this commit, Hugo used `html/template` for all Go templates. While this is a fine choice for HTML and maybe also RSS feeds, it is painful for plain text formats such as CSV, JSON etc. This commit fixes that by using the `IsPlainText` attribute on the output format to decide what to use. A couple of notes: * The above requires a nonambiguous template name to type mapping. I.e. `/layouts/_default/list.json` will only work if there is only one JSON output format, `/layouts/_default/list.mytype.json` will always work. * Ambiguous types will fall back to HTML. * Partials inherits the text vs HTML identificator of the container template. This also means that plain text templates can only include plain text partials. * Shortcode templates are, by definition, currently HTML templates only. Fixes #3221
2017-03-29hugolib, helpers: Reduce log level to WARN on .Render for non-regular pagesBjørn Erik Pedersen
We will eventually support all types in the Render method.
2017-03-27hugolib, output: Restrict Render to regular PagesBjørn Erik Pedersen
Using it for list pages doesn't work and has potential weird side-effects. The user probably meant to range over .Site.ReqularPages, and that is now marked clearly in the log.
2017-03-27hugolib: Fix Render layouts for list pagesBjørn Erik Pedersen
2017-03-27hugolib: Wrap pageOutput create in sync.OnceBjørn Erik Pedersen
2017-03-27hugolib: More TODO fixesBjørn Erik Pedersen
2017-03-27hugolib, layout: Consolidate RSS template handlingBjørn Erik Pedersen
2017-03-27hugolib, output: Handle aliases for all HTML formatsBjørn Erik Pedersen
2017-03-27Add custom protocol support in PermalinkBjørn Erik Pedersen
2017-03-27hugolib: Read default output formats from site configBjørn Erik Pedersen
2017-03-27hugolib, media: Make the MediaType available to the templatesBjørn Erik Pedersen
2017-03-27hugolib, output: Add Rel to the output formatBjørn Erik Pedersen
To make it super-easy to create rel-links.
2017-03-27hugolib: Add OutputFormats with permalinks to PageBjørn Erik Pedersen
2017-03-27hubolib: Pick layout per output formatBjørn Erik Pedersen
2017-03-27hugolib: Speed up URL handlingBjørn Erik Pedersen
2017-03-27Rename OutputType to OutputFormatBjørn Erik Pedersen
2017-03-27hugolib: Refactor/-work the permalink/target path logicBjørn Erik Pedersen
This is a pretty fundamental change in Hugo, but absolutely needed if we should have any hope of getting "multiple outputs" done. This commit's goal is to say: * Every file target path is created by `createTargetPath`, i.e. one function for all. * That function takes every page and site parameter into account, to avoid fragile string parsing to uglify etc. later on. * The path creation logic has full test coverage. * All permalinks, paginator URLs etc. are then built on top of that same logic. Fixes #1252 Fixes #2110 Closes #2374 Fixes #1885 Fixes #3102 Fixes #3179 Fixes #1641 Fixes #1989
2017-03-27Implement the first generic JSON output testcaseBjørn Erik Pedersen
2017-03-27hugolib: Revert to using Page as the render chan typeBjørn Erik Pedersen
Changing it to PageOutput was a mistake. You may think that the increased parallelism should be a good thing. But not so much with the increased lock contention and more complex concurrency model.
2017-03-27hugolib: Add a PageOutput wrapper for renderingBjørn Erik Pedersen