Commit graph

4726 commits

Author SHA1 Message Date
Bjørn Erik Pedersen ebe4d39f17
resource/postcss: Try node_modules/postcss-cli/bin/postcss first
Fixes #4952
2018-07-18 10:00:50 +02:00
Bjørn Erik Pedersen 1b0aeeaaf0
commands: Disable flaky server tests on Windows CI 2018-07-18 09:43:31 +02:00
Bjørn Erik Pedersen a4c513caeb
commands: Increase sleep in server teset to make it less shaky on Windows 2018-07-18 00:35:42 +02:00
Bjørn Erik Pedersen d741064beb Add optional lang as argument to rel/relref
Fixes #4956
2018-07-18 00:07:20 +02:00
Bjørn Erik Pedersen 3eb313fef4 Simplify .Site.GetPage etc.
This commit is a follow up to a recent overhaul of the GetPage/ref/relref implemenation.

The most important change in this commit is the update to `.Site.GetPage`:

* To reduce the amount of breakage in the wild to its minimum, I have reworked .Site.GetPage with some rules:

* We cannot support more than 2 arguments, i.e. .Site.GetPage "page" "posts" "mypage.md" will now throw an error. I think this is the most uncommon syntax and should be OK. It is an easy fix to change the above to .Site.GetPage "/posts/mypage.md" or similar.
* .Site.GetPage "home", .Site.GetPage "home" "" and .Site.GetPage "home" "/" will give you the home page. This means that if you have page in root with the name home.md you need to do .Site.GetPage "/home.md" or similar

This commit also fixes some multilingual issues, most notable it is now possible to do cross-language ref/relref lookups by prepending the language code to the path, e.g. `/jp/posts/mypage.md`.

This commit also reverts the site building tests related to this to "Hugo 0.44 state", to get better control of the changes made.

Closes #4147
Closes #4727
Closes #4728
Closes #4728
Closes #4726
Closes #4652
2018-07-18 00:07:20 +02:00
Vas Sudanagunta b93417aa1d Unify page lookups
This commit unifies the core internal page index for all page kinds.

This enables the `ref` and `relref` shortcodes to support all pages kinds, and adds a new page-relative  `.GetPage` method with simplified signature.

See #4147
See #4727
See #4728
See #4728
See #4726
See #4652
2018-07-18 00:07:20 +02:00
Lucas Bickel fd1f4a7860 Fix addkit link to account for i18n 2018-07-16 21:23:27 +02:00
Bjørn Erik Pedersen 4c240800a4
resource/bundler: Improve error message 2018-07-16 10:42:07 +02:00
Garry McNulty 38204c4ab6 hugolib: Only set 'allThemes' if there are themes in the config file
When the 'allThemes' configuration setting is read, it will panic if
there are no themes. This was a regression introduced in Hugo 0.42.

Also updated a unit test to check for this.

Fixes #4851
2018-07-15 16:13:48 +02:00
Bjørn Erik Pedersen 2f2bc7ff70
resource/integrity: Remove unused code 2018-07-14 11:17:48 +02:00
Bjørn Erik Pedersen 242b297f57
releaser: Remove flag on Windows build 2018-07-13 08:40:09 +02:00
hugoreleaser f44c9ab9cd releaser: Prepare repository for 0.45-DEV
[ci skip]
2018-07-13 06:05:41 +00:00
hugoreleaser 9f9695cf7b releaser: Add release notes to /docs for release of 0.44
[ci skip]
2018-07-13 06:03:09 +00:00
hugoreleaser 0831d8ccaf releaser: Bump versions for release of 0.44
[ci skip]
2018-07-13 06:03:09 +00:00
Bjørn Erik Pedersen 1d4ff024ca
Finish release notes 0.44 2018-07-13 07:53:33 +02:00
hugoreleaser 521e63ac7c releaser: Add release notes draft for 0.44
Rename to *-ready.md to continue. [ci skip]
2018-07-13 05:27:58 +00:00
Bjørn Erik Pedersen 47d38628ec resource: Clean up the in-memory Resource reader usage
Turns out `strings.Reader` implements both `io.Reader` and `io.Seeker`, so we don't need anything special.

Updates #4936
2018-07-12 21:32:52 +02:00
Bjørn Erik Pedersen 0024dcfe3e resource: Move opening of the transformed resources after cache check
The old version should be functionally the same, but opening up these readers (potentially files) every time is wasteful if we don't read from them.
2018-07-12 19:36:12 +02:00
Bjørn Erik Pedersen beec1fc98e resource: Fix resources.Concat for transformed resources
Fixes #4936
2018-07-12 19:36:12 +02:00
Bjørn Erik Pedersen 306573def0 Improve type support in resources.Concat
This allows the result of `.Resources.Match` and similar to be concatenated.

Fixes #4934
2018-07-12 13:43:27 +02:00
Bjørn Erik Pedersen 80c8f3b81a hugolib: Fix static filesystem for themed multihost sites
Multihost is where each language has its own `baseURL`. In this configuration, static files from the theme was not picked up.

This was a regression in Hugo `0.42`. This commit also adds proper tests for this, so that does not happen again.

Fixes #4929
2018-07-12 12:18:56 +02:00
Bjørn Erik Pedersen 6b6dcb44a0 Flush partialCached cache on rebuilds
Fixes #4931
2018-07-11 20:40:04 +02:00
Bjørn Erik Pedersen d96f2a460f
resource: Include the transformation step in the error message
Fixes #4924
2018-07-11 11:03:15 +02:00
Bjørn Erik Pedersen ac53035030
media: Only show deprecation warning when needed
Fixes #4927
2018-07-10 23:21:48 +02:00
Bjørn Erik Pedersen b874a1ba7a media: Allow multiple file suffixes per media type
Before this commit, `Suffix` on `MediaType` was used both to set a custom file suffix and as a way to augment the mediatype definition (what you see after the "+", e.g. "image/svg+xml").

This had its limitations. For one, it was only possible with one file extension per MIME type.

Now you can specify multiple file suffixes using "suffixes", but you need to specify the full MIME type
identifier:

[mediaTypes]
[mediaTypes."image/svg+xml"]
suffixes = ["svg", "abc ]

In most cases, it will be enough to just change:

[mediaTypes]
[mediaTypes."my/custom-mediatype"]
suffix = "txt"

To:

[mediaTypes]
[mediaTypes."my/custom-mediatype"]
suffixes = ["txt"]

Hugo will still respect values set in "suffix" if no value for "suffixes" is provided, but this will be removed in a future release.

Note that you can still get the Media Type's suffix from a template: {{ $mediaType.Suffix }}. But this will now map to the MIME type filename.

Fixes #4920
2018-07-10 22:13:52 +02:00
Anthony Fok 4108705934 hugolib: Remove empty resources/ dir after TestNewSiteDefaultLang 2018-07-10 09:01:54 +02:00
Anthony Fok 9c1e82085e
.gitattributes: Exclude *.svg from CRLF/LF conversion
I ran into trouble after importing the Hugo v0.43 release tarball
into the Debian packaging git repository...
2018-07-09 21:06:15 -06:00
Anthony Fok 2b73e89d6d
tpl: Set permission of embedded templates to 0644 2018-07-09 12:57:08 -06:00
Bjørn Erik Pedersen febf0aec8b
Build a fully static Windows extended binary 2018-07-09 20:42:08 +02:00
Bjørn Erik Pedersen a4fad5be6b
Adjust release notes
[ci skip]
2018-07-09 12:11:57 +02:00
hugoreleaser 6084f0433c releaser: Prepare repository for 0.44-DEV
[ci skip]
2018-07-09 10:03:30 +00:00
hugoreleaser cbb7214b6c releaser: Add release notes to /docs for release of 0.43
[ci skip]
2018-07-09 10:00:04 +00:00
hugoreleaser e6136b36f3 releaser: Bump versions for release of 0.43
[ci skip]
2018-07-09 10:00:04 +00:00
Bjørn Erik Pedersen 659917a002
releaser: Revert to the old versions of the release pipeline 2018-07-09 11:54:10 +02:00
hugoreleaser 9d194ab904
releaser: Add release for 0.43 2018-07-09 10:52:02 +02:00
Anthony Fok a305609e18
snap: Migrate from deprecated keywords to "override-build"
Also add verbosity and echo messages to aid debugging.

See #4908
2018-07-09 02:41:10 -06:00
Bjørn Erik Pedersen 179de5f5bc
Revert "Consider root and current section's content type if set in front matter"
This reverts commit c790029e1d.
2018-07-09 10:29:18 +02:00
Bjørn Erik Pedersen 5dc1f95b63
Revert "Restrict the new type layout resolution to page and section kinds"
This reverts commit 78e8a744b3.
2018-07-09 10:29:16 +02:00
Bjørn Erik Pedersen 6bc892fc24
Revert "output: gofmt -l -w output/layout.go"
This reverts commit f465571b33.
2018-07-09 10:29:13 +02:00
Bjørn Erik Pedersen 5f06dbf779
Revert "snap: Build both hugo and hugo.extended for 0.43"
This reverts commit e1027c5846.
2018-07-09 09:45:18 +02:00
Bjørn Erik Pedersen 0850e97984
Revert "Revert "Add Goreleaser extended config""
I reverted the wrong commit.

This reverts commit a3b4b10f65.
2018-07-09 09:44:51 +02:00
Bjørn Erik Pedersen a3b4b10f65
Revert "Add Goreleaser extended config"
@anthonyfok we need to discuss how we want the Snap build to look before we implement it. I don't think this is how.

People who want SCSS builds can download from the release page for this release.

This reverts commit 626afc9825.
2018-07-09 09:30:10 +02:00
Bjørn Erik Pedersen e3df6478f0
Bump CircleCI image 2018-07-09 09:24:34 +02:00
Bjørn Erik Pedersen 626afc9825
Add Goreleaser extended config
See #4908
2018-07-09 09:24:34 +02:00
Anthony Fok e1027c5846
snap: Build both hugo and hugo.extended for 0.43
Due to snap's design, the name "hugo_extended" needs to be created
via an automatic alias request, see
https://forum.snapcraft.io/t/hugo-auto-alias-request-for-hugo-extended-hugo-extended/6297

Also migrate from deprecated "prepare", "build" and "install" keywords
to "override-build".

See #4908
2018-07-09 01:15:21 -06:00
Carlos Alexandro Becker e1a052ecb8 fix: nfpm replacements
refs https://github.com/goreleaser/goreleaser/issues/715
2018-07-09 08:06:13 +02:00
Bjørn Erik Pedersen bfc3488b8e
Add temporary build script 2018-07-08 16:08:22 +02:00
Anthony Fok ce84b524f4 Add "extended" to "hugo version"
Fixes #4913
2018-07-08 11:08:54 +02:00
Yang Li 3cea2932e1 Fix typos 2018-07-07 12:29:56 +02:00
Bjørn Erik Pedersen 0efd374805
Merge commit '98293eaa1570b5aff4452021c8b6d6c8560b3f06' 2018-07-06 17:53:17 +02:00