Bjørn Erik Pedersen
24c1770288
hugolib: Revise paginator alias path handling
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
b7ed67d425
hugolib: More TODO fixes
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
3cd97951f1
hugolib, layout: Consolidate RSS template handling
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
ee75e2999b
Remove the now superflous defaultExtension
...
And some other unsed fields and methods.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
15b64d51da
all: Propagate baseURL error to the callers
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
148fedd227
hugolib, tplimpl: Use OutputFormats to create atom links
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
ec01c3a7f0
hugolib: Add 404 test
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
5761b93c96
hugolib, output: Fix RSSLink vs output formats
...
And remove the now superflous setPageURLs method.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
87188496fb
hugolib, output: Handle aliases for all HTML formats
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
0c4701f0ef
hugolib: Update site stats to take output formats into account
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
d851d6b98f
Add custom protocol support in Permalink
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
8bcc08e3b0
media, output: Add Calendar type
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
dbb83f925a
hugolib: Read default output formats from site config
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
4aaed87dd9
hugolib, media: Make the MediaType available to the templates
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
c7dbee2321
hugolib, output: Add Rel to the output format
...
To make it super-easy to create rel-links.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
29d3778ba1
docs: Move the rough custom output formats spec to docs
...
This isn't meant to be the final useer docs on this feature!
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
1b2be5e878
hugolib: Add OutputFormats with permalinks to Page
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
baa29f6534
output: Rework the base template logic
...
Extract the logic to a testable function and add support for custom output types.
Fixes #2995
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
c7c6b47ba8
hubolib: Pick layout per output format
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
08fa2b1124
hugolib: Fix layout lookup order for Render func
...
Will have to fix this in a better way later in relation to the non-renderable pages.
But this commit brings the Hugo Benchmark down to "only slightly slower" than master.
```
benchmark old ns/op new ns/op delta
BenchmarkHugo-4 10074504521 10071236251 -0.03%
benchmark old allocs new allocs delta
BenchmarkHugo-4 43623091 49271859 +12.95%
benchmark old bytes new bytes delta
BenchmarkHugo-4 9468322704 9725848376 +2.72%
```
Which is something we can work with.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
6178238a0b
output: Speed up layout calculations
...
```
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-27 15:43:56 +02:00
Bjørn Erik Pedersen
df95383914
hugolib: Speed up URL handling
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
a49bf8707b
hugolib: Remove siteWriter
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
d76e5f36b4
hugolib: Pull all alias handling into one file
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
ad8cea87f3
Refactor layout resolve to a descriptor/adapter pattern
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
4c2abe0015
Rename OutputType to OutputFormat
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
6bf010fed4
hugolib: Refactor/-work the permalink/target path logic
...
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-27 15:43:56 +02:00
Bjørn Erik Pedersen
c8fff9501d
Implement the first generic JSON output testcase
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
3ec5fc3504
hugolib, output: Incorporate suffix and type in layout resolve
...
And remove some now superflous and hard to maintain tests.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
f091fc23ed
hugolib: Add basic setup for output def per Kind
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
03122e51fa
hugolib: Revert to using Page as the render chan type
...
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-27 15:43:56 +02:00
Bjørn Erik Pedersen
e5200ddaa4
hugolib: Remove the copying in the renderRSS
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
a8244658f7
hugolib: Put back taxonomy term paginator logic lost in rebase
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
50c64415aa
hugolib, output: Add theme logic to LayoutHandler
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
348834d017
hugolib: Add a PageOutput wrapper for rendering
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
254cd89c8e
hugolob: A first incorporation of output types in rendering
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
10de077164
hugolib: Use the new layout logic in Page
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
3bb52bf7bf
output: Move layout logic to the output package
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
d3d2c63dd9
output: Add output type
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
c4989c39f1
Add MediaType and a crude implementation
...
See #2828
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
9262c5b32f
Exit -1 on ERROR in non-global logger
...
Fixes #3239
2017-03-27 10:55:29 +02:00
Bjørn Erik Pedersen
2bea9d0ca1
Revert "tplimpl: return an error on unsupported type in isSet"
...
This breaks the theme site and lots of themes, so we will have to thinkg a little harder about this one.
This reverts commit 74ea81b885
.
2017-03-26 20:09:08 +02:00
Darwin
1b92c8b713
Change RSS description from full .Content to .Summary
2017-03-25 22:58:41 +01:00
Bjørn Erik Pedersen
17b21e0af1
hugolib: Correctly identify "my_index_page.md"
...
The above example was earlier identified as a section page and not a regular page.
Fixes #3234
2017-03-25 19:57:01 +01:00
Anthony Fok
7f68e3199e
snapcraft: Bump version to 0.20-DEV
2017-03-25 02:55:10 -06:00
Anthony Fok
2ed75f3462
snapcraft: Add vendoring support
...
Also, build with go1.8, run "make test", and strip the binary.
Fixes #3226
2017-03-25 02:54:30 -06:00
digitalcraftsman
9d9ec1ddd9
docs: Add Hugo SFTP Upload to the tools section
...
/cc @rdwatters
2017-03-24 23:31:31 +01:00
Albert Nigmatzianov
9f0b02b898
commands: Fix case of createpath in new.go
2017-03-24 22:19:03 +01:00
Albert Nigmatzianov
a159feffb2
create: Delete redundant viper calls
...
Also make easier to read the code
2017-03-24 22:19:03 +01:00
Ryan Watters
d07ff9d221
docs: Remove dead links, consistent formatting...
...
This page was a real chore chore on the POC. In the event that a new doc site won't be approved by v20, this will at least clean up the broken links I found during my audit. I would like to eventually create this as a [data file](https://github.com/spf13/hugo/pull/2508#commitcomment-18705617 ) since md tables get unwieldy pretty quickly.
2017-03-22 21:32:31 +01:00