Age | Commit message (Collapse) | Author |
|
Fixes #3323
|
|
This regression was introduced in Hugo 0.20.
Fixes #3333
|
|
To make sure CSS and similar does not appear in the AlternativeOutputFormats list.
|
|
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
|
|
Fixes #3290
|
|
|
|
|
|
And clean up the media package.
|
|
And clean up the output package.
|
|
|
|
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
|
|
Will have to take another stab at this ...
This reverts commit 5c5efa03d2512749950b0d05a7d4bde35ecbdc37.
Closes #3260
|
|
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
|
|
And make CSS correclty behave as plain text.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
And remove the now superflous setPageURLs method.
|
|
|
|
|
|
|
|
|
|
To make it super-easy to create rel-links.
|
|
|
|
Extract the logic to a testable function and add support for custom output types.
Fixes #2995
|
|
```
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%
```
|
|
|
|
|
|
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
|
|
|
|
And remove some now superflous and hard to maintain tests.
|
|
|
|
|
|
|
|
|
|
|
|
|