brevno-suite/hugo
6 years agoreleaser: Bump versions for release of 0.45
hugoreleaser [Sun, 22 Jul 2018 12:09:26 +0000 (12:09 +0000)]
releaser: Bump versions for release of 0.45

[ci skip]

6 years agoUpdate release notes 0.45
Bjørn Erik Pedersen [Sun, 22 Jul 2018 10:12:01 +0000 (12:12 +0200)]
Update release notes 0.45

6 years agoreleaser: Add release notes draft for 0.45
hugoreleaser [Sun, 22 Jul 2018 10:07:03 +0000 (10:07 +0000)]
releaser: Add release notes draft for 0.45

Rename to *-ready.md to continue. [ci skip]

6 years agoGet rid of the utils package
Bjørn Erik Pedersen [Sat, 21 Jul 2018 22:34:17 +0000 (00:34 +0200)]
Get rid of the utils package

6 years agoUpdate hugo_windows.go
Bjørn Erik Pedersen [Sat, 21 Jul 2018 22:09:46 +0000 (00:09 +0200)]
Update hugo_windows.go

6 years agohugolib: Print a WARNING about relative non-relative ref/relref matches
Bjørn Erik Pedersen [Thu, 19 Jul 2018 21:02:33 +0000 (23:02 +0200)]
hugolib: Print a WARNING about relative non-relative ref/relref matches

Fixes #4973

6 years agohugolib: Allow untyped nil to be merged in lang.Merge
Bjørn Erik Pedersen [Sat, 21 Jul 2018 09:41:23 +0000 (11:41 +0200)]
hugolib: Allow untyped nil to be merged in lang.Merge

Fixes #4977

6 years agoresource/scss: Add IncludePaths config option
Bjørn Erik Pedersen [Fri, 20 Jul 2018 13:02:35 +0000 (15:02 +0200)]
resource/scss: Add IncludePaths config option

Takes paths relative to the current working dir.

Fixes #4921

6 years agoresource/scss: Fix source maps on Windows
Bjørn Erik Pedersen [Fri, 20 Jul 2018 06:00:26 +0000 (08:00 +0200)]
resource/scss: Fix source maps on Windows

I have tested this OK on

* Windows 10 (it did not work before this commit)
* MacOS

Fixes #4968

6 years agoIncrease refLinker test coverage
Vas Sudanagunta [Thu, 19 Jul 2018 23:04:45 +0000 (19:04 -0400)]
Increase refLinker test coverage

6 years agohugolib: Avoid nilpointer in absoluteSourceRef
Bjørn Erik Pedersen [Thu, 19 Jul 2018 20:39:24 +0000 (22:39 +0200)]
hugolib: Avoid nilpointer in absoluteSourceRef

6 years agoFix typo-logic bug in GetPage
Vas Sudanagunta [Thu, 19 Jul 2018 18:55:16 +0000 (14:55 -0400)]
Fix typo-logic bug in GetPage

6 years agoEnable test case fixed by commit 501543d4
Vas Sudanagunta [Thu, 19 Jul 2018 17:53:39 +0000 (13:53 -0400)]
Enable test case fixed by commit 501543d4

6 years agoAdd test coverage for recent ref overhaul
Vas Sudanagunta [Thu, 19 Jul 2018 14:46:36 +0000 (10:46 -0400)]
Add test coverage for recent ref overhaul

Closes #4969

6 years agohugolib: Create an adapter from old to new getPage
Bjørn Erik Pedersen [Thu, 19 Jul 2018 16:26:10 +0000 (18:26 +0200)]
hugolib: Create an adapter from old to new getPage

To make sure we confirm that the existing tests run the correct code path.

Updates #4969

6 years agohugolib: Only do page-relative getPage for relative paths
Bjørn Erik Pedersen [Thu, 19 Jul 2018 15:47:05 +0000 (17:47 +0200)]
hugolib: Only do page-relative getPage for relative paths

Updates #4969

6 years agohugolib: Improve error handling in refLink
Bjørn Erik Pedersen [Thu, 19 Jul 2018 15:17:35 +0000 (17:17 +0200)]
hugolib: Improve error handling in refLink

6 years agodocs: Update ref, relref, GetPage docs
Bjørn Erik Pedersen [Thu, 19 Jul 2018 15:02:03 +0000 (17:02 +0200)]
docs: Update ref, relref, GetPage docs

6 years agodocs: Document refLinksErrorLevel and refLinksNotFoundURL
Bjørn Erik Pedersen [Thu, 19 Jul 2018 13:03:35 +0000 (15:03 +0200)]
docs: Document refLinksErrorLevel and refLinksNotFoundURL

See #4964

6 years agoAdd configurable ref/relref error handling and notFoundURL
Bjørn Erik Pedersen [Wed, 18 Jul 2018 17:58:39 +0000 (19:58 +0200)]
Add configurable ref/relref error handling and notFoundURL

Two new settings:

* refLinksErrorLevel: ERROR (default) or WARNING. ERROR will fail the build.
* refLinksNotFoundURL: Used as a placeholder when page references cannot be found.

Fixes #4964

6 years agohugolib: Mark shortcode changes as content changes in server mode
Bjørn Erik Pedersen [Thu, 19 Jul 2018 10:50:24 +0000 (12:50 +0200)]
hugolib: Mark shortcode changes as content changes in server mode

This is unfortunate, but is needed to re-create the taxonomies collections etc. that may be referenced from them.

Fixes #4965

6 years agoRevert "hugolib: Fix potential server panic with drafts/future enabled"
Bjørn Erik Pedersen [Thu, 19 Jul 2018 10:20:01 +0000 (12:20 +0200)]
Revert "hugolib: Fix potential server panic with drafts/future enabled"

This had a side-effect. I have understand this better to apply the correct fix. Will come soon.

This reverts commit 1ab4658c0d5ea2927f04bd748206e5b139a6326e.

6 years agoMerge commit 'a3535c8486b2ce762b1a8a9c30b03985c3e02cee'
Bjørn Erik Pedersen [Thu, 19 Jul 2018 07:18:11 +0000 (09:18 +0200)]
Merge commit 'a3535c8486b2ce762b1a8a9c30b03985c3e02cee'

6 years agoSquashed 'docs/' changes from cfe89ecbc..a4fa0d1d6
Bjørn Erik Pedersen [Thu, 19 Jul 2018 07:18:11 +0000 (09:18 +0200)]
Squashed 'docs/' changes from cfe89ecbc..a4fa0d1d6

a4fa0d1d6 Typos and grammatical changes
513884600 Add hugo pipes documentation

git-subtree-dir: docs
git-subtree-split: a4fa0d1d641b2b3e27a91ae8b1a0a29be3c42ddf

6 years agohugolib: Fix potential server panic with drafts/future enabled
Bjørn Erik Pedersen [Wed, 18 Jul 2018 15:01:50 +0000 (17:01 +0200)]
hugolib: Fix potential server panic with drafts/future enabled

Fixes #4965

6 years agohugolib: Avoid server panic on TOML mistake in i18n
Bjørn Erik Pedersen [Wed, 18 Jul 2018 09:53:04 +0000 (11:53 +0200)]
hugolib: Avoid server panic on TOML mistake in i18n

Fixes #4942

6 years agohugolib/filesystems: Fix theme config for Work Fs
Bjørn Erik Pedersen [Wed, 18 Jul 2018 09:02:21 +0000 (11:02 +0200)]
hugolib/filesystems: Fix theme config for Work Fs

Which was the reason why `PostCSS´ from theme(s) was not picked up.

Fixes #4951

6 years agoMerge commit 'b6b37a1f00f808f3c0d2715f65ca2d3091f36495'
Bjørn Erik Pedersen [Wed, 18 Jul 2018 09:05:58 +0000 (11:05 +0200)]
Merge commit 'b6b37a1f00f808f3c0d2715f65ca2d3091f36495'

6 years agoSquashed 'docs/' changes from f59b3ab06..cfe89ecbc
Bjørn Erik Pedersen [Wed, 18 Jul 2018 09:04:57 +0000 (11:04 +0200)]
Squashed 'docs/' changes from f59b3ab06..cfe89ecbc

cfe89ecbc Set all *.png files under static/images to mode 0644
d847ccd8b More spelling error fixes
bf1405d92 Correction: .Pages on homepage is same as .Site.RegularPages
7efa41ff5 Merge commit 'd137efe0222269e09b427325176f0044558e3cc5'
d137efe02 Squashed 'themes/gohugoioTheme/' changes from f31a3dc8..66249819
50df8bfb8 Replace .Data.Pages with .Pages
85d3712d0 Mention the newScratch template func
1c234db1b Release 0.44
a51cb3e36 Merge branch 'temp44'
ec424a5e2 releaser: Prepare repository for 0.45-DEV
425e85574 releaser: Add release notes to /docs for release of 0.44
e6f9c65a2 releaser: Bump versions for release of 0.44
45548a5c9 Arch Linux: Partial upgrades are unsupported
c0430f8f9 Update MenuEntry properties documentation
79109b685 Refresh the documentation on staticDir config parameter
80ed4592b Remove duplicate links; also sort them alphabetically
f00a4e232 HTTPS links to third-party sites
2f6f682ba Fixed a typo
4be105202 add openbsd howto install
39808f50a Fix typo
b55c0f3a0 Fix URL to hugotest
2fb157237 Release Hugo 0.43
e8af6a970 Merge branch 'temp43'
563dd4173 Adjust release notes
50aed2e52 releaser: Prepare repository for 0.44-DEV
363b363ff releaser: Add release notes to /docs for release of 0.43
93bfbef62 releaser: Bump versions for release of 0.43
893a27d33 Fix typos
fe5908257 Celebrate: a few typo and grammar fixes
bb20442df Merge commit '98293eaa1570b5aff4452021c8b6d6c8560b3f06'
ef3d63936 Add a newScratch template func
bf100a3cd Merge branch 'release-0.42.2'
f1133c544 releaser: Prepare repository for 0.43-DEV
2ce058057 releaser: Add release notes to /docs for release of 0.42.2
6073927c6 releaser: Bump versions for release of 0.42.2
3bafddd52 releaser: Prepare repository for 0.43-DEV
8b9f805bd releaser: Add release notes to /docs for release of 0.42.1
efb6638ba releaser: Bump versions for release of 0.42.1
1e74ffbe0 releaser: Prepare repository for 0.43-DEV
2d2d0f8ab releaser: Add release notes to /docs for release of 0.42
17f685813 releaser: Bump versions for release of 0.42
67ef1a0e1 docs: Update theme documentation
d74874e1e docs: Remove some files now moved
771d50cf3 Merge commit 'b239595af5a9fc1fc9a1ccc666c3ab06ccc32f04'
f9b5fd2d2 tplimpl: Remove speakerdeck shortcode
523206579 tpl/strings: strings.RuneCount
b389efc88 tpl: Add strings.Repeat
a41ad0254 Add a BlackFriday option for rel="noreferrer" on external links
a6e279362 Add a BlackFriday option for rel="nofollow" on external links
7e2c9846e releaser: Prepare repository for 0.42-DEV
b4f81c38a releaser: Add release notes to /docs for release of 0.41
55667b3a1 releaser: Bump versions for release of 0.41
afceb02d3 docs: Document the GDPR Privacy Config
8b8289027 Merge commit 'd2b1030060d3c91d5f9ffa3456418da16bd74f1d'
be04a8886 Merge branch 'release-0.40.3'
33ca0b8da releaser: Prepare repository for 0.41-DEV
8c9a5a850 releaser: Add release notes to /docs for release of 0.40.3
85845a4fd releaser: Bump versions for release of 0.40.3
9af79e531 Merge commit '83bef6955e014d40c0f00db9cebe09113154e999'
c4200dd0e Fix typo
8f8323336 releaser: Prepare repository for 0.41-DEV
9fab87505 releaser: Add release notes to /docs for release of 0.40.2
83648c666 releaser: Bump versions for release of 0.40.2
e6434d104 releaser: Prepare repository for 0.41-DEV
9389b2973 releaser: Add release notes to /docs for release of 0.40.1
32979e28a releaser: Bump versions for release of 0.40.1
196174a76 releaser: Prepare repository for 0.41-DEV
490a997bb releaser: Add release notes to /docs for release of 0.40
018aa6471 releaser: Bump versions for release of 0.40
92221934c Merge commit 'a215abf70e018f4bf40d6c09d8bd148d8684b33d'
0a58ef56e Merge commit 'd2ec1a06df8ab6b17ad05cb008d5701b40327d47'
312ab58c6 Improve .Get docs
e43e8cee3 .Get function: fix syntax signature
bb16150bc releaser: Prepare repository for 0.40-DEV
8cc80fed9 releaser: Add release notes to /docs for release of 0.39
f7aa0d1c5 releaser: Bump versions for release of 0.39
42e48706a Merge commit '047c4188dfc854f658d16f1e4a9501f9c97a31c7'
76acab68b releaser: Prepare repository for 0.39-DEV
d270600b0 releaser: Add release notes to /docs for release of 0.38.2
97be36992 releaser: Bump versions for release of 0.38.2
cd29b8b79 releaser: Prepare repository for 0.39-DEV
9983a4bdf releaser: Add release notes to /docs for release of 0.38.1
7774afd01 releaser: Bump versions for release of 0.38.1
b89157f20 releaser: Prepare repository for 0.39-DEV
af4d0bf62 releaser: Add release notes to /docs for release of 0.38
ca98e7d4f releaser: Bump versions for release of 0.38
8b773833a Merge commit 'ed8bf081fdbf336e026517b7e1b123c039014ab5'
24202bb71 docs: Generate docshelper data
43d15975d Add .Site.IsServer
6f99d3d65 Merge commit '0a23baa6a90901f772c234107c4f12c16c76f4aa'
17487ccdd hugolib: Add Reset method to delete key from Scratch
ccbf7a05c docs: Add docs for lang.Merge
5ad46d78e Merge commit '3886fc1fef6ac19d58b9ba1bb642d0c6c9a54031'
ac403c280 docs: Add docs on the new front matter configuration
6066c60e6 Merge commit 'c0290655825e7bb36e13fb39f89d85b392cf1adc'
ee605c7ae releaser: Prepare repository for 0.38-DEV
31a4de966 releaser: Add release notes to /docs for release of 0.37.1
9dd3dafe1 releaser: Bump versions for release of 0.37.1
141750aec releaser: Prepare repository for 0.38-DEV
c9bb39bc3 releaser: Add release notes to /docs for release of 0.37
c7009f064 releaser: Bump versions for release of 0.37
9f727d916 Merge commit '900b5f6cfe5a377ef369d26cd700201be4cf6b06'
87fd97853 Merge commit '374d184e6747678364fd61f5faf328ec9205eb6b'
244deafc2 Fix typos in development contribution doc
608c80f72 Merge branch 'release-0.36.1'
0f8ffbd5c releaser: Prepare repository for 0.37-DEV
5028ee849 releaser: Add release notes to /docs for release of 0.36.1
9ccc7cb11 releaser: Bump versions for release of 0.36.1
3db31be07 Merge commit '9cc9bab46288d8d5f9fda7009c5f746258cec1b4'
9468246c5 Add "target" and "rel" parameters to figure shortcode
6d7fa89f9 releaser: Prepare repository for 0.37-DEV
1aec7ad81 releaser: Add release notes to /docs for release of 0.36
b522da389 releaser: Bump versions for release of 0.36
bb78bea13 docs: Add documentation for smart cropping etc.
930f16cae Merge commit 'c305e44f5f081e4436195923a4593e396f07cd49'
0e4c80ab9 releaser: Prepare repository for 0.36-DEV
e0d4c6bcd releaser: Add release notes to /docs for release of 0.35
f4ac67eb3 releaser: Bump versions for release of 0.35
229a50b1f docs: Regenerate CLI docs
72958eb9c Merge commit '337d0c5f516ee085205e8abefdb7f87e6d33ca05'
d998ca4c0 command: Remove undraft command
34a0052ef docs: Re-generate CLI docs
fa04ff331 releaser: Prepare repository for 0.35-DEV
55e595720 releaser: Add release notes to /docs for release of 0.34
bf4d0e8fb releaser: Bump versions for release of 0.34
07673370e releaser: Prepare repository for 0.34-DEV
921ea8920 releaser: Add release notes to /docs for release of 0.33
3307f61bd releaser: Bump versions for release of 0.33
792a4410d Merge commit '3cf4300097610bb8b5bd0686d96d1df5db641895'
6d8a9f657 releaser: Prepare repository for 0.33-DEV
e3afccf6f releaser: Add release notes to /docs for release of 0.32.4
7f29cb196 releaser: Bump versions for release of 0.32.4
baa364436 releaser: Prepare repository for 0.33-DEV
60c775166 releaser: Add release notes to /docs for release of 0.32.3
9cbab1803 releaser: Bump versions for release of 0.32.3
51823efee releaser: Prepare repository for 0.33-DEV
71e03684c releaser: Add release notes to /docs for release of 0.32.2
e18bf56fb releaser: Bump versions for release of 0.32.2
54aa93927 Merge commit 'eb738cd35cca1ffc68c5ed688dbe2a19108e8761'
5e8123994 releaser: Prepare repository for 0.33-DEV
a55b78124 releaser: Add release notes to /docs for release of 0.32.1
7de53ff41 releaser: Bump versions for release of 0.32.1
e6e58785d releaser: Prepare repository for 0.33-DEV
58cf5009d releaser: Add release notes to /docs for release of 0.32
031719821 Merge commit 'f3cd083961f36dc96d05e98aaf67f650102bc757'
b9183604b Add Pandoc support, refactor external helpers
3f9b9474c releaser: Prepare repository for 0.32-DEV
11e4ce514 releaser: Add release notes to /docs for release of 0.31.1
aebb1504b releaser: Bump versions for release of 0.31.1
d70b54d4a releaser: Prepare repository for 0.32-DEV
cdc10468e releaser: Add release notes to /docs for release of 0.31
38bd41cab releaser: Bump versions for release of 0.31
1c581a11d Merge commit '30c0d485eaff6d70df1be0353911ddca485d52bf'
b88e46d02 Merge commit '05e42bc643f1840ed2ad9c2eff82a269d1381683'
a45ab174e Handle Taxonomy permalinks
9f27354f6 Add support for height argument to figure shortcode
acc8e49c1 releaser: Prepare repository for 0.31-DEV
977266b19 releaser: Add release notes to /docs for release of 0.30.2
31b672844 releaser: Bump versions for release of 0.30.2
b8f6b72a8 Merge commit '325009c3fd4ac90021897b7e3e025c14e70ce162'
c6e3dae71 releaser: Prepare repository for 0.31-DEV
2a3c7c7d9 releaser: Add release notes to /docs for release of 0.30.1
4c014117a releaser: Bump versions for release of 0.30.1
1da61da06 releaser: Prepare repository for 0.31-DEV
24864a46b releaser: Add release notes to /docs for release of 0.30
3011aa44a releaser: Bump versions for release of 0.30
bcbf3237b Merge commit 'ecf5e081b5540e69f4af330233f39a07baf53846'
ab68b99ed Merge commit 'dae5a7c61cceeb0de59f2d755f63e453f71dd9b2'
0ae435725 tpl: Add errorf template function
ac3fb3808 Change SummaryLength to be configurable (#3924)
3c0e4fa70 tpl: Add os.fileExists template function
9290f3983 Merge commit '9d68f695e782c6a83c77aff13317c7a22c694c98'
394e8b3f6 tpl: Add float template function
c0c48c2ea releaser: Prepare repository for 0.30-DEV
0806d910b releaser: Add release notes to /docs for release of 0.29
0d1101836 releaser: Bump versions for release of 0.29
5d92b552b releaser: Prepare repository for 0.29-DEV
1ef521182 releaser: Add release notes to /docs for release of 0.28
c5441cff1 releaser: Bump versions for release of 0.28
46c2786f1 Merge commit '61c27b58b353c73772aae572c7d822fdfdf7791b'
6fed4008f Merge commit '30694a133a88d5f76a51d0372646e10cbeca7691'
595752e2f Merge commit '7a89dce53bfbd67a17442a8f9be8fa895fc4f9b1'
af14cae0c Merge commit 'ba45da9d03056447e4873de13d4e0f8d658a769b'
d0bb30963 releaser: Prepare repository for 0.28-DEV
469bf26aa releaser: Add release notes to /docs for release of 0.27.1
06ea00c12 releaser: Bump versions for release of 0.27.1
0668af58e releaser: Prepare repository for 0.28-DEV
4ce00c84d releaser: Add release notes to /docs for release of 0.27
68f318d0b releaser: Bump versions for release of 0.27
509ad6cc0 docs: Merge commit '1b4319be62ba071f79e90ef32dbe92eb893429f7'
c625ae1ce docs: Document Related Content
ecd5c24f5 docs: Merge commit '7d63a23b0c68d9cd7c7c09c2755619237bc03485'
b97b84f9d Update docs versiona and README
2238f7a4a Merge commit 'ec4e6f9df2ab9ffdc62a3f59675369096e0d3f77' as 'docs'

git-subtree-dir: docs
git-subtree-split: cfe89ecbc2288a7270c23dbcc179733c8d978c4c

6 years agoresource/postcss: Try node_modules/postcss-cli/bin/postcss first
Bjørn Erik Pedersen [Wed, 18 Jul 2018 08:00:50 +0000 (10:00 +0200)]
resource/postcss: Try node_modules/postcss-cli/bin/postcss first

Fixes #4952

6 years agocommands: Disable flaky server tests on Windows CI
Bjørn Erik Pedersen [Wed, 18 Jul 2018 07:43:31 +0000 (09:43 +0200)]
commands: Disable flaky server tests on Windows CI

6 years agocommands: Increase sleep in server teset to make it less shaky on Windows
Bjørn Erik Pedersen [Tue, 17 Jul 2018 22:35:42 +0000 (00:35 +0200)]
commands: Increase sleep in server teset to make it less shaky on Windows

6 years agoAdd optional lang as argument to rel/relref
Bjørn Erik Pedersen [Tue, 17 Jul 2018 19:44:08 +0000 (21:44 +0200)]
Add optional lang as argument to rel/relref

Fixes #4956

6 years agoSimplify .Site.GetPage etc.
Bjørn Erik Pedersen [Tue, 17 Jul 2018 09:18:29 +0000 (11:18 +0200)]
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

6 years agoUnify page lookups
Vas Sudanagunta [Wed, 30 May 2018 01:35:27 +0000 (21:35 -0400)]
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

6 years agoFix addkit link to account for i18n
Lucas Bickel [Mon, 16 Jul 2018 19:15:05 +0000 (21:15 +0200)]
Fix addkit link to account for i18n

6 years agoresource/bundler: Improve error message
Bjørn Erik Pedersen [Mon, 16 Jul 2018 08:42:07 +0000 (10:42 +0200)]
resource/bundler: Improve error message

6 years agohugolib: Only set 'allThemes' if there are themes in the config file
Garry McNulty [Sun, 15 Jul 2018 13:35:41 +0000 (14:35 +0100)]
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

6 years agoresource/integrity: Remove unused code
Bjørn Erik Pedersen [Sat, 14 Jul 2018 09:17:48 +0000 (11:17 +0200)]
resource/integrity: Remove unused code

6 years agoreleaser: Remove flag on Windows build
Bjørn Erik Pedersen [Fri, 13 Jul 2018 06:40:09 +0000 (08:40 +0200)]
releaser: Remove flag on Windows build

6 years agoreleaser: Prepare repository for 0.45-DEV
hugoreleaser [Fri, 13 Jul 2018 06:05:41 +0000 (06:05 +0000)]
releaser: Prepare repository for 0.45-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.44 v0.44
hugoreleaser [Fri, 13 Jul 2018 06:03:09 +0000 (06:03 +0000)]
releaser: Add release notes to /docs for release of 0.44

[ci skip]

6 years agoreleaser: Bump versions for release of 0.44
hugoreleaser [Fri, 13 Jul 2018 06:03:09 +0000 (06:03 +0000)]
releaser: Bump versions for release of 0.44

[ci skip]

6 years agoFinish release notes 0.44
Bjørn Erik Pedersen [Fri, 13 Jul 2018 05:50:59 +0000 (07:50 +0200)]
Finish release notes 0.44

6 years agoreleaser: Add release notes draft for 0.44
hugoreleaser [Fri, 13 Jul 2018 05:27:58 +0000 (05:27 +0000)]
releaser: Add release notes draft for 0.44

Rename to *-ready.md to continue. [ci skip]

6 years agoresource: Clean up the in-memory Resource reader usage
Bjørn Erik Pedersen [Thu, 12 Jul 2018 19:06:48 +0000 (21:06 +0200)]
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

6 years agoresource: Move opening of the transformed resources after cache check
Bjørn Erik Pedersen [Thu, 12 Jul 2018 16:59:39 +0000 (18:59 +0200)]
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.

6 years agoresource: Fix resources.Concat for transformed resources
Bjørn Erik Pedersen [Thu, 12 Jul 2018 13:19:54 +0000 (15:19 +0200)]
resource: Fix resources.Concat for transformed resources

Fixes #4936

6 years agoImprove type support in resources.Concat
Bjørn Erik Pedersen [Thu, 12 Jul 2018 09:26:51 +0000 (11:26 +0200)]
Improve type support in resources.Concat

This allows the result of `.Resources.Match` and similar to be concatenated.

Fixes #4934

6 years agohugolib: Fix static filesystem for themed multihost sites
Bjørn Erik Pedersen [Thu, 12 Jul 2018 08:09:32 +0000 (10:09 +0200)]
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

6 years agoFlush partialCached cache on rebuilds
Bjørn Erik Pedersen [Wed, 11 Jul 2018 17:23:22 +0000 (19:23 +0200)]
Flush partialCached cache on rebuilds

Fixes #4931

6 years agoresource: Include the transformation step in the error message
Bjørn Erik Pedersen [Wed, 11 Jul 2018 09:03:15 +0000 (11:03 +0200)]
resource: Include the transformation step in the error message

Fixes #4924

6 years agomedia: Only show deprecation warning when needed
Bjørn Erik Pedersen [Tue, 10 Jul 2018 21:21:48 +0000 (23:21 +0200)]
media: Only show deprecation warning when needed

Fixes #4927

6 years agomedia: Allow multiple file suffixes per media type
Bjørn Erik Pedersen [Tue, 10 Jul 2018 09:55:22 +0000 (11:55 +0200)]
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

6 years agohugolib: Remove empty resources/ dir after TestNewSiteDefaultLang
Anthony Fok [Tue, 10 Jul 2018 04:29:52 +0000 (22:29 -0600)]
hugolib: Remove empty resources/ dir after TestNewSiteDefaultLang

6 years ago.gitattributes: Exclude *.svg from CRLF/LF conversion
Anthony Fok [Tue, 10 Jul 2018 03:05:47 +0000 (21:05 -0600)]
.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...

6 years agotpl: Set permission of embedded templates to 0644
Anthony Fok [Mon, 9 Jul 2018 18:57:08 +0000 (12:57 -0600)]
tpl: Set permission of embedded templates to 0644

6 years agoBuild a fully static Windows extended binary
Bjørn Erik Pedersen [Mon, 9 Jul 2018 18:42:08 +0000 (20:42 +0200)]
Build a fully static Windows extended binary

6 years agoAdjust release notes
Bjørn Erik Pedersen [Mon, 9 Jul 2018 10:11:38 +0000 (12:11 +0200)]
Adjust release notes

[ci skip]

6 years agoreleaser: Prepare repository for 0.44-DEV
hugoreleaser [Mon, 9 Jul 2018 10:03:30 +0000 (10:03 +0000)]
releaser: Prepare repository for 0.44-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.43 v0.43
hugoreleaser [Mon, 9 Jul 2018 10:00:04 +0000 (10:00 +0000)]
releaser: Add release notes to /docs for release of 0.43

[ci skip]

6 years agoreleaser: Bump versions for release of 0.43
hugoreleaser [Mon, 9 Jul 2018 10:00:04 +0000 (10:00 +0000)]
releaser: Bump versions for release of 0.43

[ci skip]

6 years agoreleaser: Revert to the old versions of the release pipeline
Bjørn Erik Pedersen [Mon, 9 Jul 2018 09:13:29 +0000 (11:13 +0200)]
releaser: Revert to the old versions of the release pipeline

6 years agoreleaser: Add release for 0.43
hugoreleaser [Mon, 9 Jul 2018 07:41:07 +0000 (07:41 +0000)]
releaser: Add release for 0.43

6 years agosnap: Migrate from deprecated keywords to "override-build"
Anthony Fok [Mon, 9 Jul 2018 08:41:10 +0000 (02:41 -0600)]
snap: Migrate from deprecated keywords to "override-build"

Also add verbosity and echo messages to aid debugging.

See #4908

6 years agoRevert "Consider root and current section's content type if set in front matter"
Bjørn Erik Pedersen [Mon, 9 Jul 2018 08:29:18 +0000 (10:29 +0200)]
Revert "Consider root and current section's content type if set in front matter"

This reverts commit c790029e1dbb0b66af18d05764bd6045deb2e180.

6 years agoRevert "Restrict the new type layout resolution to page and section kinds"
Bjørn Erik Pedersen [Mon, 9 Jul 2018 08:29:16 +0000 (10:29 +0200)]
Revert "Restrict the new type layout resolution to page and section kinds"

This reverts commit 78e8a744b34e885e8169bf0a8bb64c73288e555a.

6 years agoRevert "output: gofmt -l -w output/layout.go"
Bjørn Erik Pedersen [Mon, 9 Jul 2018 08:29:13 +0000 (10:29 +0200)]
Revert "output: gofmt -l -w output/layout.go"

This reverts commit f465571b33c8736a95534dd43f07527869d1eec3.

6 years agoRevert "snap: Build both hugo and hugo.extended for 0.43"
Bjørn Erik Pedersen [Mon, 9 Jul 2018 07:45:18 +0000 (09:45 +0200)]
Revert "snap: Build both hugo and hugo.extended for 0.43"

This reverts commit e1027c5846b48c4ad450f6cc27e2654c9e0dae39.

6 years agoRevert "Revert "Add Goreleaser extended config""
Bjørn Erik Pedersen [Mon, 9 Jul 2018 07:44:51 +0000 (09:44 +0200)]
Revert "Revert "Add Goreleaser extended config""

I reverted the wrong commit.

This reverts commit a3b4b10f657a90d52fcdfb0156e3f3c2b2a5a0ba.

6 years agoRevert "Add Goreleaser extended config"
Bjørn Erik Pedersen [Mon, 9 Jul 2018 07:30:10 +0000 (09:30 +0200)]
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 626afc98254421f5a5edc97c541b10bd81d5bbbb.

6 years agoBump CircleCI image
Bjørn Erik Pedersen [Mon, 9 Jul 2018 07:23:18 +0000 (09:23 +0200)]
Bump CircleCI image

6 years agoAdd Goreleaser extended config
Bjørn Erik Pedersen [Mon, 9 Jul 2018 06:57:28 +0000 (08:57 +0200)]
Add Goreleaser extended config

See #4908

6 years agosnap: Build both hugo and hugo.extended for 0.43
Anthony Fok [Mon, 9 Jul 2018 07:15:21 +0000 (01:15 -0600)]
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

6 years agofix: nfpm replacements
Carlos Alexandro Becker [Mon, 9 Jul 2018 00:25:27 +0000 (17:25 -0700)]
fix: nfpm replacements

refs https://github.com/goreleaser/goreleaser/issues/715

6 years agoAdd temporary build script
Bjørn Erik Pedersen [Sun, 8 Jul 2018 14:08:22 +0000 (16:08 +0200)]
Add temporary build script

6 years agoAdd "extended" to "hugo version"
Anthony Fok [Sun, 8 Jul 2018 08:45:13 +0000 (02:45 -0600)]
Add "extended" to "hugo version"

Fixes #4913

6 years agoFix typos
Yang Li [Sat, 7 Jul 2018 09:40:47 +0000 (17:40 +0800)]
Fix typos

6 years agoMerge commit '98293eaa1570b5aff4452021c8b6d6c8560b3f06'
Bjørn Erik Pedersen [Fri, 6 Jul 2018 15:53:17 +0000 (17:53 +0200)]
Merge commit '98293eaa1570b5aff4452021c8b6d6c8560b3f06'

6 years agoSquashed 'docs/' changes from 501c6e233..f59b3ab06
Bjørn Erik Pedersen [Fri, 6 Jul 2018 15:52:13 +0000 (17:52 +0200)]
Squashed 'docs/' changes from 501c6e233..f59b3ab06

f59b3ab06 Fix typo in template lookup order
1e5536d6c Mutlilingual: Document "content directory per language" system (#509)
849a86048 Update index.md
0c24d229b Polish Hugo Next
a4c9b0ee2 Polish
bbec2c76e Some more in birthday post
fc9681e21 More on contributors
09fe3ea31 Some more on the birthday post
8da357240 Content and images for the 5th birthday blog post
fb45bb8dc Add draft for anniversary blog post
4666d0a18 Release 0.42.2
9b74d286a Merge branch 'temp422'
354e7b66b releaser: Add release notes to /docs for release of 0.42.2
57a617f34 releaser: Bump versions for release of 0.42.2
ccc3ac1b8 Update errorf.md
35706c21a Update errorf.md
1c0f35fd1 Update errorf.md
b6170774b Add syntax highlighting gallery links for Chroma
f91d9da47 Update usage.md
c9a8f0190 Improve theme components documentation
3c4e39ddd Release 0.42.1
b45eb453f Merge branch 'temp421'
c74682a10 releaser: Prepare repository for 0.43-DEV
321e07fa5 releaser: Add release notes to /docs for release of 0.42.1
7154271e0 releaser: Bump versions for release of 0.42.1
360d8244f Add link to Privacy Config
1f2454247 Fix typo
a8f5f994e Fix typo
d9f3f078c Update simple variants documentation (#500)
f5cfd44e0 Release 0.42
fe604b321 releaser: Prepare repository for 0.43-DEV
c3e5b3ca0 releaser: Add release notes to /docs for release of 0.42
3174d1b37 releaser: Bump versions for release of 0.42
48cc2d51f docs: Update theme documentation
1922fb1a6 docs: Remove some files now moved
d7e4c453a Merge commit 'b239595af5a9fc1fc9a1ccc666c3ab06ccc32f04'
c40964c1b tplimpl: Remove speakerdeck shortcode
081f8a0f9 tpl/strings: strings.RuneCount
828ea5f15 tpl: Add strings.Repeat
a6b9f654a Add a BlackFriday option for rel="noreferrer" on external links
edb786516 Add a BlackFriday option for rel="nofollow" on external links
e4374971f releaser: Prepare repository for 0.42-DEV

git-subtree-dir: docs
git-subtree-split: f59b3ab06f282c26bce07263c8be6672cf8f7969

6 years agoAdd a newScratch template func
Bjørn Erik Pedersen [Fri, 6 Jul 2018 12:12:10 +0000 (14:12 +0200)]
Add a newScratch template func

Fixes #4685

6 years agohugolib: Do not create paginator pages for the other output formats
Bjørn Erik Pedersen [Fri, 6 Jul 2018 11:33:43 +0000 (13:33 +0200)]
hugolib: Do not create paginator pages for the other output formats

This is a recent regression in Hugo, where we have started to produce `/page/30/index.json` when the main output format (usually `HTML`) is set up with pagination.

For JSON this is potentially lot of superflous work and hurts performance.

This commit reinstates the earlier behaviour: We only create paginators if in use in the main output format.

And add a test for it to prevent this from happening again.

Fixes #4890

6 years agoAdd Hugo Piper with SCSS support and much more
Bjørn Erik Pedersen [Tue, 20 Feb 2018 09:02:14 +0000 (10:02 +0100)]
Add Hugo Piper with SCSS support and much more

Before this commit, you would have to use page bundles to do image processing etc. in Hugo.

This commit adds

* A new `/assets` top-level project or theme dir (configurable via `assetDir`)
* A new template func, `resources.Get` which can be used to "get a resource" that can be further processed.

This means that you can now do this in your templates (or shortcodes):

```bash
{{ $sunset := (resources.Get "images/sunset.jpg").Fill "300x200" }}
```

This also adds a new `extended` build tag that enables powerful SCSS/SASS support with source maps. To compile this from source, you will also need a C compiler installed:

```
HUGO_BUILD_TAGS=extended mage install
```

Note that you can use output of the SCSS processing later in a non-SCSSS-enabled Hugo.

The `SCSS` processor is a _Resource transformation step_ and it can be chained with the many others in a pipeline:

```bash
{{ $css := resources.Get "styles.scss" | resources.ToCSS | resources.PostCSS | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Digest }}" media="screen">
```

The transformation funcs above have aliases, so it can be shortened to:

```bash
{{ $css := resources.Get "styles.scss" | toCSS | postCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Digest }}" media="screen">
```

A quick tip would be to avoid the fingerprinting part, and possibly also the not-superfast `postCSS` when you're doing development, as it allows Hugo to be smarter about the rebuilding.

Documentation will follow, but have a look at the demo repo in https://github.com/bep/hugo-sass-test

New functions to create `Resource` objects:

* `resources.Get` (see above)
* `resources.FromString`: Create a Resource from a string.

New `Resource` transformation funcs:

* `resources.ToCSS`: Compile `SCSS` or `SASS` into `CSS`.
* `resources.PostCSS`: Process your CSS with PostCSS. Config file support (project or theme or passed as an option).
* `resources.Minify`: Currently supports `css`, `js`, `json`, `html`, `svg`, `xml`.
* `resources.Fingerprint`: Creates a fingerprinted version of the given Resource with Subresource Integrity..
* `resources.Concat`: Concatenates a list of Resource objects. Think of this as a poor man's bundler.
* `resources.ExecuteAsTemplate`: Parses and executes the given Resource and data context (e.g. .Site) as a Go template.

Fixes #4381
Fixes #4903
Fixes #4858

6 years agooutput: Fix the shortcodes/partials vs base template detection
Bjørn Erik Pedersen [Mon, 2 Jul 2018 08:33:55 +0000 (10:33 +0200)]
output: Fix the shortcodes/partials vs base template detection

Fixes #4897

6 years agooutput: gofmt -l -w output/layout.go
Anthony Fok [Mon, 2 Jul 2018 06:08:43 +0000 (00:08 -0600)]
output: gofmt -l -w output/layout.go

6 years agotpl/collections: Return en empty slice in after instead of error
Bjørn Erik Pedersen [Sun, 1 Jul 2018 18:34:02 +0000 (20:34 +0200)]
tpl/collections: Return en empty slice in after instead of error

When the given index is out of bounds. So it can safely be used with `with` etc. without extra length checking.

Fixes #4894

6 years agoRestrict the new type layout resolution to page and section kinds
Bjørn Erik Pedersen [Sat, 30 Jun 2018 14:50:02 +0000 (16:50 +0200)]
Restrict the new type layout resolution to page and section kinds

Will have to test and evaluate this a little.

See  #4891

6 years agoConsider root and current section's content type if set in front matter
Bjørn Erik Pedersen [Sat, 30 Jun 2018 11:03:26 +0000 (13:03 +0200)]
Consider root and current section's content type if set in front matter

This should allow for less duplication of templates. Before this commit it was possible to override the content page of a given page/section, but only one page at a time.

Full "template sets" can now be inherited by setting `type: blog` etc. in the section content page's front matter, and that type will be considered when looking for layouts for all pages in that section.

For nested sections, it will use consider both `type` set in the current section first, then `type` set in the first section below home, e.g. `/docs`.

This commit also adds a new Page method: `FirstSection`. This navigates up to the first section below home (e.g. `/docs`). For the home page it will return itself.

Fixes #4891

6 years agocircleci: Update docker image
Bjørn Erik Pedersen [Fri, 29 Jun 2018 08:46:21 +0000 (10:46 +0200)]
circleci: Update docker image

With Go 10.3 and newest Goreleaser and Mage.

6 years agohugolib: Allow forward slash in shortcode names
Bjørn Erik Pedersen [Thu, 28 Jun 2018 14:06:16 +0000 (16:06 +0200)]
hugolib: Allow forward slash in shortcode names

Fixes #4886

6 years agoMerge branch 'release-0.42.2'
Bjørn Erik Pedersen [Thu, 28 Jun 2018 12:40:23 +0000 (14:40 +0200)]
Merge branch 'release-0.42.2'

6 years agoreleaser: Prepare repository for 0.43-DEV
hugoreleaser [Thu, 28 Jun 2018 12:38:48 +0000 (12:38 +0000)]
releaser: Prepare repository for 0.43-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.42.2 v0.42.2
hugoreleaser [Thu, 28 Jun 2018 12:36:15 +0000 (12:36 +0000)]
releaser: Add release notes to /docs for release of 0.42.2

[ci skip]

6 years agoreleaser: Bump versions for release of 0.42.2
hugoreleaser [Thu, 28 Jun 2018 12:36:15 +0000 (12:36 +0000)]
releaser: Bump versions for release of 0.42.2

[ci skip]

6 years agoRelease 0.42.2
hugoreleaser [Thu, 28 Jun 2018 12:29:44 +0000 (12:29 +0000)]
Release 0.42.2

6 years agocommands: Fix broken server-reload on config changes
Bjørn Erik Pedersen [Thu, 28 Jun 2018 10:20:03 +0000 (12:20 +0200)]
commands: Fix broken server-reload on config changes

This was accidently broken in Hugo 0.42.

Fixes #4878

6 years agocommands: Fix broken server-reload on config changes
Bjørn Erik Pedersen [Thu, 28 Jun 2018 10:20:03 +0000 (12:20 +0200)]
commands: Fix broken server-reload on config changes

This was accidently broken in Hugo 0.42.

Fixes #4878

6 years agoUpdate GoReleaser config
Carlos Alexandro Becker [Thu, 28 Jun 2018 05:54:18 +0000 (02:54 -0300)]
Update GoReleaser config

6 years agotpl: Remove some "debug info"
Bjørn Erik Pedersen [Tue, 26 Jun 2018 09:33:12 +0000 (11:33 +0200)]
tpl: Remove some "debug info"

See #4881

6 years agotpl: Update internal pagination template to support Bootstrap 4
Bjørn Erik Pedersen [Tue, 26 Jun 2018 09:31:17 +0000 (11:31 +0200)]
tpl: Update internal pagination template to support Bootstrap 4

Fixes #4881