When constructing permalinks, ensure that most inputs used as path
segments are normalized with PathSpec.MakeSegment instead of
PathSpec.URLize.
The primary exception to that rule is with taxonomy titles in
pageToPermalinkTitle(). The approach taken here is to use URLize for
taxonomy pages. Everything else will use MakeSegment. The reason for
this exception is that people use taxonomies such as "s1/p1" to generate
URLs precisely they way they wish (see #5223). Tests have been added to
check for this case.
Fixes#4926
Fix broken links for Dev Chat that point to broken gitter.im room.
Remove lines about `mage vendor` target that is no longer available.
Remove broken table of contents links for headings in CONTRIBUTING.md
Fix typo
Previously, calls to *Page.Eq(nil) would always return false because the
unwrapPage func didn't support the nil case. Add support for unwrapping
nil to a *Page.
Fixes#5043
In Hugo `0.49` we improved type support in `slice`. This has an unfortunate side effect in that `resources.Concat` now expects something that can resolve to `resource.Resources`.
This worked for most situations, but when you try to `slice` different `Resource` objects, you would be getting `[]interface {}` and not `resource.Resources`. And `concat` would fail:
```bash
error calling Concat: slice []interface {} not supported in concat.
```
This commit fixes that by simplifying the type checking logic in `Slice`:
* If the first item implements the `Slicer` interface, we try that
* If the above fails or the first item does not implement `Slicer`, we just return the `[]interface {}`
Fixes#5269
The original implementation of NumFmt did not take into account that the
options delimiter (a space) could be a valid option. Adding a delim
parameter seems like the simplest, safest, and most flexible way to
solve this oversight in a backwards-compatible way.
Fixes#5260
Introduce new page position variables in order to fix the ordering issue
of `.Next` and `.Prev` while also allowing an upgrade path via
deprecation.
`.NextInSection` becomes `.NextPageInSection`.
`.PrevInSection` becomes `.PrevPageInSection`.
`.Next` becomes a function returning `.PrevPage`.
`.Prev` becomes a function returning `.NextPage`.
Fixes#1061
e5e98b950 Update code-toggle.md
340c9c623 Update 'Fetch from Github' installation instructions in line with Github README
d9f06c23c Add tip about clearing browser cache (#608)
7c9df4731 Adding Remark as additional Comments Alternatives for hugo (#607)
b1ce8bf02 Revert "Temp change of baseURL"
fdbc582ff Temp change of baseURL
5ec663bd6 Fix wrong date in frontmatter config example (#602)
0b3022eb1 Fix broken link to https://www.wercker.com (#603)
b4a7e31a6 Turn off minification
bfcc1ac21 Add a Tweet
8be09c0b4 Remove unused data file
git-subtree-dir: docs
git-subtree-split: e5e98b950ca631c3135ac2f4446c79d71d2196be
Given this content:
```bash
archetypes
├── default.md
└── post-bundle
├── bio.md
├── images
│ └── featured.jpg
└── index.md
```
```bash
hugo new --kind post-bundle post/my-post
```
Will create a new folder in `/content/post/my-post` with the same set of files as in the `post-bundle` archetypes folder.
This commit also improves the archetype language detection, so, if you use template code in your content files, the `.Site` you get is for the correct language. This also means that it is now possible to translate strings defined in the `i18n` bundles, e.g. `{{ i18n "hello" }}`.
Fixes#4535
It is slightly slower, but correctnes is, of course, more important:
```bash
benchmark old ns/op new ns/op delta
BenchmarkSortByWeightAndReverse-4 367 645 +75.75%
benchmark old allocs new allocs delta
BenchmarkSortByWeightAndReverse-4 2 2 +0.00%
benchmark old bytes new bytes delta
BenchmarkSortByWeightAndReverse-4 64 64 +0.00%
```
Running the same benchmark without any cache (i.e. resorting the slice on every iteration) and then compare it to the current version shows that it still is plenty worth it:
```bash
▶ benchcmp 2.bench 1.bench
benchmark old ns/op new ns/op delta
BenchmarkSortByWeightAndReverse-4 1358757 645 -99.95%
benchmark old allocs new allocs delta
BenchmarkSortByWeightAndReverse-4 17159 2 -99.99%
benchmark old bytes new bytes delta
BenchmarkSortByWeightAndReverse-4 274573 64 -99.98%
```
Closes#5239
Add @onedrawingperday to the release credit list. The activity on the theme repo is increasing and the work he and @digitalcraftsman
is doing is very much appreciated.