Commit graph

4272 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
4eb1650bec
resource: Use path.Match instead of filepath.Match
They behave similar, but it is a path we're matching.

See #4244
2018-01-17 20:48:31 +01:00
Bjørn Erik Pedersen
20c9b6ec81
resource: Add front matter metadata to Resource
This commit expands the Resource interface with 3 new methods:

* Name
* Title
* Params

All of these can be set in the Page front matter. `Name` will get its default value from the base filename, and is the value used in the ByPrefix and GetByPrefix lookup methods.

Fixes #4244
2018-01-17 16:22:33 +01:00
Bjørn Erik Pedersen
f8a119b606
Update Afero to avoid panic on "file name is too long"
Fixes #4240
2018-01-15 20:33:03 +01:00
Bjørn Erik Pedersen
ecaf14514e
resource: Fix handling of very long image file names
Fixes #4261
2018-01-15 20:22:14 +01:00
Bjørn Erik Pedersen
d4f8f88e67
commands: And now really fix the server watch logic
See #4275
2018-01-15 10:02:17 +01:00
Bjørn Erik Pedersen
4e524ffcff
commands: Fix server without watch
This was broken in Hugo 0.30.

Fixes #4275
2018-01-14 20:58:52 +01:00
Bjørn Erik Pedersen
64f0e9d1c1
Update Chroma and other third-party deps
Fixes #4267
2018-01-14 20:32:42 +01:00
Bjørn Erik Pedersen
13d53b31f1
commands: Remove superflous BuildDate logic
Fixes #4272
2018-01-14 20:08:28 +01:00
Bjørn Erik Pedersen
51dd462c39 layout: Respect Type and Layout for list template selection
This commit also has some other nice side-effects:

* The layout logic is unified for all page types, which should make it less surprising
* Page.Render now supports all types
* The legacy "indexes" type is removed from the template lookup order. This is an undocumented type from early Hugo days. This means that having a template in, say, `/layouts/indexes/list.html` will no longer work.
* The theme override logic is improved. As an example, an `index.html` in theme will now wn over a `_default/list.html` in the project, which most will expect.

Fixes #3005
Fixes #3245
2018-01-14 19:59:51 +01:00
Bjørn Erik Pedersen
b6ea6d07d0
Run benchmarks 3 times 2018-01-14 00:49:01 +01:00
Bjørn Erik Pedersen
4dac1781e3
resource: Add some GoDoc 2018-01-13 00:08:21 +01:00
Bjørn Erik Pedersen
8a409894bd hugolib: Allow url in front matter for list type pages
This enables some potential foot-shooting, but is needed for some special URL requirements.

Fixes #4263
2018-01-12 18:10:40 +01:00
Bjørn Erik Pedersen
46db900dab
resource: Implement Resources.ByPrefix
Fixes #4266
2018-01-12 18:06:35 +01:00
Bjørn Erik Pedersen
60c9f3b1c3
resource: Make GetByPrefix work for Page resources
Fixes #4264
2018-01-12 17:46:50 +01:00
Bjørn Erik Pedersen
57e10f174e Support uglyURLs per section
Fixes #4256
2018-01-12 10:39:09 +01:00
Bjørn Erik Pedersen
db85e83403
resource: Make .Resources.GetByPrefix case insensitive
Fixes #4258
2018-01-11 18:58:53 +01:00
Vas Sudanagunta
1046e9363f Update CONTRIBUTING.md 2018-01-11 17:22:12 +01:00
Vas Sudanagunta
d5803da1be Support offline builds 2018-01-11 17:22:12 +01:00
hugoreleaser
27c77e1ab9 releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-11 09:00:51 +00:00
hugoreleaser
218773a82b releaser: Add release notes to /docs for release of 0.32.4
[ci skip]
2018-01-11 08:58:01 +00:00
hugoreleaser
a97ef61bad releaser: Bump versions for release of 0.32.4
[ci skip]
2018-01-11 08:58:01 +00:00
Bjørn Erik Pedersen
4aaf27dc55
Release 0.32.4 2018-01-11 09:52:32 +01:00
hugoreleaser
f7d0b05f93 releaser: Add release notes draft for 0.32.4
Rename to *-ready.md to continue. [ci skip]
2018-01-11 08:48:10 +00:00
Bjørn Erik Pedersen
f82428d2e0
releaser: Git info bounds checking 2018-01-11 09:39:42 +01:00
Bjørn Erik Pedersen
50fb49c3d9
resource: Remove superflous comment 2018-01-11 09:17:48 +01:00
Alexander Borsuk
5235a5bf5e Correct fix for --cleanDestinationDir flag
Fixes #4246
Fixes #4248
2018-01-10 18:26:42 +01:00
Alexander Borsuk
1921a70ab1 Revert "Remove the --cleanDestinationDir flag", there is a better fix.
This reverts commit 768ec5df9f.
2018-01-10 18:26:42 +01:00
Bjørn Erik Pedersen
f0eecc6a4f Fix non-ASCII path handling for Page resources
Fixes #4241
2018-01-10 18:23:41 +01:00
Bjørn Erik Pedersen
768ec5df9f
Remove the --cleanDestinationDir flag
This is no longer supported. Since Hugo 0.32 we do static sync and build in parallel.

Closes #4246
2018-01-10 09:34:40 +01:00
hugoreleaser
238e7f7fbe releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-08 11:12:41 +00:00
hugoreleaser
0aaa38544d releaser: Add release notes to /docs for release of 0.32.3
[ci skip]
2018-01-08 11:10:08 +00:00
hugoreleaser
fdec5e3084 releaser: Bump versions for release of 0.32.3
[ci skip]
2018-01-08 11:10:08 +00:00
Bjørn Erik Pedersen
71abb53fff
Release 0.32.2 2018-01-08 12:05:52 +01:00
hugoreleaser
db5d79862b releaser: Add release notes draft for 0.32.3
Rename to *-ready.md to continue. [ci skip]
2018-01-08 10:57:07 +00:00
Bjørn Erik Pedersen
2d3189b227 hugolib: Fix handling of mixed-case taxonomy folders with content file
* We match by path vs taxonomy to determine if we have a content page for that taxonomy
* The taxonomy name is (if `preserveTaxonomyNames` is not set) normalized to `maxmustermann` while you have the disk folder called `MaxMustermann`.
* This isn't a new issue, but I suspect most people will just name the folder `authors/maxmustermann` and it will just work.
* The inconsistent behaviour you see here is that you will end up with two pages with the same target filename, so it is a little random who will win.

This fixes that by also normalizing the taxonomy path when doing the comparison.

Fixes #4238
2018-01-08 11:47:26 +01:00
Bjørn Erik Pedersen
4b04db0f08 resource: Avoid processing and storing same image for each language
Fixes #4231
2018-01-07 11:58:16 +01:00
Bjørn Erik Pedersen
97c1866e32
resource: Resources.ByType should return Resources
Currently it returns []Resource.

This way the invocations can be nested.

Fixes #4234
2018-01-07 10:53:45 +01:00
Bjørn Erik Pedersen
8969331f5b Fix multihost detection for sites without language definition
Static content was wrongly put into the lang-code subfolder.

Fixes #4221
2018-01-06 19:14:31 +01:00
Bjørn Erik Pedersen
6feb138785
commands: Report build time on config.toml change
Fixes #4232
See #4224
2018-01-06 10:54:16 +01:00
Bjørn Erik Pedersen
059e8458d6
Fix hugo benchmark --renderToMemory
Fixes #4218
2018-01-06 10:37:04 +01:00
Bjørn Erik Pedersen
ab82a27d05 Fix URLs for bundle resources in multihost mode
Fixes #4217
2018-01-06 10:29:13 +01:00
Bjørn Erik Pedersen
f25d8a9e17 Fix sub-folder baseURL handling for Page resources
I.e. images etc.

Fixes #4228
2018-01-06 10:29:13 +01:00
hugoreleaser
54a89cde69 releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-03 09:56:18 +00:00
hugoreleaser
2cd962233f releaser: Add release notes to /docs for release of 0.32.2
[ci skip]
2018-01-03 09:54:04 +00:00
hugoreleaser
865877cd05 releaser: Bump versions for release of 0.32.2
[ci skip]
2018-01-03 09:54:04 +00:00
Bjørn Erik Pedersen
1ff80a8bbe
Release 0.32.2 2018-01-03 10:50:57 +01:00
hugoreleaser
956ef40978 releaser: Add release notes draft for 0.32.2
Rename to *-ready.md to continue. [ci skip]
2018-01-03 09:49:11 +00:00
Bjørn Erik Pedersen
196da49c9d
resource: Handle publish to /public on fresh build
Fixes #4213
2018-01-03 10:28:16 +01:00
Bjørn Erik Pedersen
2aa4c009ee
Merge commit 'eb738cd35cca1ffc68c5ed688dbe2a19108e8761' 2018-01-03 10:19:56 +01:00
Bjørn Erik Pedersen
eb738cd35c Squashed 'docs/' changes from fc61378a3..ddb7d8fae
ddb7d8fae Fix spelling in error message
84f7e09ff Add an "sharing image" to the 0.32 doc
a6d39884c Add image processing examples
717e25400 Release 0.32.1
07a4fc1c1 Merge branch 'temp321'
401ed894b releaser: Add release notes to /docs for release of 0.32.1
aa040d965 releaser: Bump versions for release of 0.32.1
6d22558ec Close shortcode
442afa7f5 Add a link to the 0.32 HOWTO with a searchable title
9a9a7e475 Add a note about the shortcode issue
76d731ce2 Add title etc. to release notes
eac596de8 Release v0.32
ede3e25dc Merge branch 'tmp32'
c92f1701b releaser: Prepare repository for 0.33-DEV
e498e97f9 releaser: Add release notes to /docs for release of 0.32
1d476fc59 Fix typo
9bac78a2f Merge commit 'f3cd083961f36dc96d05e98aaf67f650102bc757'
7d8c78391 Add Pandoc support, refactor external helpers

git-subtree-dir: docs
git-subtree-split: ddb7d8fae07ee8813652d20829d606dd6637f0a9
2018-01-03 10:16:56 +01:00