summaryrefslogtreecommitdiffhomepage
path: root/output
AgeCommit message (Collapse)Author
2017-08-03Add some missing doc commentsJorin Vogel
As pointed out by the linter, some exported functions and types are missing doc comments. The linter warnings have been reduced from 194 to 116. Not all missing comments have been added in this commit though.
2017-07-31output: Add JSON tags to FormatBjørn Erik Pedersen
See https://github.com/gohugoio/hugoDocs/issues/114
2017-07-22docs: Add RSS template lookup exampleBjørn Erik Pedersen
2017-07-04output: Support templates per site/languageBjørn Erik Pedersen
This applies to both regular templates and shortcodes. So, if the site language is French and the output format is AMP, this is the (start) of the lookup order for the home page: 1. index.fr.amp.html 2. index.amp.html 3. index.fr.html 4. index.html 5. ... Fixes #3360
2017-06-20output: Identify extension-less text types as textBjørn Erik Pedersen
See #3614
2017-06-20media, hugolib: Support extension-less media typesBjørn Erik Pedersen
This change is motivated by Netlify's `_redirects` files, which is currently not possible to generate with Hugo. This commit adds a `Delimiter` field to media type, which defaults to ".", but can be blanked out. Fixes #3614
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-05-18output: Fix output format mixup in exampleBjørn Erik Pedersen
See #3481
2017-04-13output: Fix base theme vs project base template logicBjørn Erik Pedersen
Fixes #3323
2017-04-12hugolib, output: Do not lower case template namesBjørn Erik Pedersen
This regression was introduced in Hugo 0.20. Fixes #3333
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-07all: Document the Output Formats featureBjørn Erik Pedersen
This commit also adds a new command, docshelper, with some utility funcs that adds a JSON datafiles to /docs/data that would be a pain to create and maintain by hand. Fixes #3242
2017-04-07output: Add some sane defaults for output formatBjørn Erik Pedersen
Fixes #3290
2017-04-06media, output: Fix spellingBjørn Erik Pedersen
2017-04-04output: Make template name lower casedBjørn Erik Pedersen
2017-04-04media: Add DecodeTypesBjørn Erik Pedersen
And clean up the media package.
2017-04-04output: Add output formats decoderBjørn Erik Pedersen
And clean up the output package.
2017-04-04output: Add CSV to the global output formats listBjørn Erik Pedersen
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-04-01media, output: Add CSV type and formatBjørn Erik Pedersen
And make CSS correclty behave as plain text.
2017-03-28helpers, output: Fix spellingBjørn Erik Pedersen
2017-03-28hugolib, output: GofmtBjørn Erik Pedersen
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-27output: Rename HTMLType etc. to HTMLFormatBjø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: Fix RSSLink vs output formatsBjørn Erik Pedersen
And remove the now superflous setPageURLs method.
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-27media, output: Add Calendar typeBjørn Erik Pedersen
2017-03-27hugolib: Read default output formats from site configBjø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-27output: Rework the base template logicBjørn Erik Pedersen
Extract the logic to a testable function and add support for custom output types. Fixes #2995
2017-03-27output: Speed up layout calculationsBjørn Erik Pedersen
``` BenchmarkLayout-4 4883 497 -89.82% benchmark old allocs new allocs delta BenchmarkLayout-4 18 1 -94.44% benchmark old bytes new bytes delta BenchmarkLayout-4 1624 32 -98.03% ```
2017-03-27Refactor layout resolve to a descriptor/adapter patternBjø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, output: Incorporate suffix and type in layout resolveBjørn Erik Pedersen
And remove some now superflous and hard to maintain tests.
2017-03-27hugolib: Add basic setup for output def per KindBjørn Erik Pedersen
2017-03-27hugolib, output: Add theme logic to LayoutHandlerBjørn Erik Pedersen
2017-03-27hugolob: A first incorporation of output types in renderingBjørn Erik Pedersen
2017-03-27hugolib: Use the new layout logic in PageBjørn Erik Pedersen
2017-03-27output: Move layout logic to the output packageBjørn Erik Pedersen
2017-03-27output: Add output typeBjørn Erik Pedersen