Commit graph

3813 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
adbd5bc47f
source: Enable disabled test 2017-11-19 14:35:49 +01:00
Bjørn Erik Pedersen
c1d325934e helpers: Remove (now) unused GetStaticDir
* In Hugo there is no single static dir
* It was used as a filter in the content dir, which makes no sense since any overlap here is impossible
2017-11-19 14:03:21 +01:00
Bjørn Erik Pedersen
d99db71ab5
livereload: Fix recently broken window.location.reload logic
Closes #4100
2017-11-18 10:54:07 +01:00
Bjørn Erik Pedersen
503ca6de6c Fix broken shortcodes for Ace and Amber
Fixes #4051
2017-11-18 10:41:31 +01:00
Bjørn Erik Pedersen
b3daa1f4bf hugolib: Fix .IsTranslated with identical filenames
This commit refines the key used to map translations:

* Use `translationKey` set in front matter
* Fall back to path + base filename (i.e. the filename without extension and language code)

Note that the Page Kinde will be prepended to both cases above. It does not make sense to have a section as translation for the home page.

Fixes #2699
2017-11-17 19:46:32 +01:00
Bjørn Erik Pedersen
df1677a6e8
Merge commit '05e42bc643f1840ed2ad9c2eff82a269d1381683' 2017-11-17 13:48:33 +01:00
Bjørn Erik Pedersen
05e42bc643 Squashed 'docs/' changes from e65df1059..a042b67b5
a042b67b5 Update installation instructions for Fedora, CentOS, Red Hat
e99dcb0b5 Document `:sections` placeholder for permalinks
f33c88a27 Fix and clarify documentation about Blackfriday extensions (mask)
5cab109c2 Add .Page.File documentation
62df7bb80 Add .Page.CurrentSection and .Page.Sections documentation
60b4414de Add .Page.Dir documentation
22038d1a8 shortcode-templates.md: Update year example
850d5ca41 Add note about theme versions in hosting-on-netlify.md
0509b8055 Update permalink example URL
c68d61d3a Mention the available 'width' argument in 'figure' shortcode
ed83b483a Update Nanobox deployment tutorial
a7422f35d shortcode-templates.md: Remove stray period
af2905fe4 Fix order of releases in news section
19d3ea064 Bump to 0.30.2
bbfa10343 Merge branch 'next'
36ed7cbe4 releaser: Prepare repository for 0.31-DEV
f689770f6 releaser: Add release notes to /docs for release of 0.30.2
0045e712a releaser: Bump versions for release of 0.30.2
a9efc3bbd Add slug to 0.30.1 relnotes
9cf47a4a1 Release 0.30.1
1fa0bb23d releaser: Prepare repository for 0.31-DEV
5582208b6 releaser: Add release notes to /docs for release of 0.30.1
09693d155 releaser: Bump versions for release of 0.30.1
58adf5d0d Merge commit '325009c3fd4ac90021897b7e3e025c14e70ce162'
4ef5dcb9b releaser: Prepare repository for 0.31-DEV
02938a788 releaser: Add release notes to /docs for release of 0.30.1
7cfd01fc6 releaser: Bump versions for release of 0.30.1
db3a68e24 Fix typo
95a5d8b46 Fix format of summaryLength in TOML example config
2ad649a92 Make terms in taxonomy examples more coherent
1fac1e662 Make a link specifically point to Pygments HTML Formatter docs
11ae6be03 Fix minor typos in v0.30 release notes

git-subtree-dir: docs
git-subtree-split: a042b67b5b8834ee8292849708cba724f5d6644e
2017-11-17 13:46:40 +01:00
Bjørn Erik Pedersen
0a81a6b4ba output: Fall back to unstranslated base template
Fixes #3893
2017-11-17 13:08:18 +01:00
Bjørn Erik Pedersen
60dfb9a6e0 Add support for multiple staticDirs
This commit adds support for multiple statDirs both on the global and language level.

A simple `config.toml` example:

```bash
staticDir = ["static1", "static2"]
[languages]
[languages.no]
staticDir = ["staticDir_override", "static_no"]
baseURL = "https://example.no"
languageName = "Norsk"
weight = 1
title = "På norsk"

[languages.en]
staticDir2 = "static_en"
baseURL = "https://example.com"
languageName = "English"
weight = 2
title = "In English"
```

In the above, with no theme used:

the English site will get its static files as a union of "static1", "static2" and "static_en". On file duplicates, the right-most version will win.
the Norwegian site will get its static files as a union of "staticDir_override" and "static_no".

This commit also concludes the Multihost support in #4027.

Fixes #36
Closes #4027
2017-11-17 11:01:46 +01:00
Bjørn Erik Pedersen
2e0465764b Add multilingual multihost support
This commit adds multihost support when more than one language is configured and `baseURL` is set per language.

Updates #4027
2017-11-17 11:01:46 +01:00
Bjørn Erik Pedersen
6233ddf9d1
tpl/partials: Fix the lock contention in cached partial
Fixes #4086
2017-11-16 11:59:45 +01:00
Bjørn Erik Pedersen
e66d813bcb
gopkg: Update Chroma to get SVG support 2017-11-16 08:30:51 +01:00
Bjørn Erik Pedersen
f5ed04bd4a
tpl/partials: Fix cache locking
To make sure a cached partial is ony executed  exactly once.

Performance same:

```bash
name                         old time/op    new time/op    delta
TemplateParamsKeysToLower-4    17.2µs ± 0%    16.5µs ± 0%   ~     (p=1.000 n=1+1)
Partial-4                      18.6µs ± 0%    19.4µs ± 0%   ~     (p=1.000 n=1+1)
PartialCached-4                64.2ns ± 0%    63.7ns ± 0%   ~     (p=1.000 n=1+1)

name                         old alloc/op   new alloc/op   delta
TemplateParamsKeysToLower-4    2.66kB ± 0%    2.66kB ± 0%   ~     (all equal)
Partial-4                      1.31kB ± 0%    1.31kB ± 0%   ~     (all equal)
PartialCached-4                 0.00B          0.00B        ~     (all equal)

name                         old allocs/op  new allocs/op  delta
TemplateParamsKeysToLower-4      92.0 ± 0%      92.0 ± 0%   ~     (all equal)
Partial-4                        41.0 ± 0%      41.0 ± 0%   ~     (all equal)
```
2017-11-16 01:23:37 +01:00
Bjørn Erik Pedersen
7730d683e8
tplimpl: Make partial benchmarks use RunParallel
See #4086
2017-11-16 01:13:07 +01:00
Bjørn Erik Pedersen
bb048d811d
Use ms precision for static change logging 2017-11-15 08:52:29 +01:00
Bjørn Erik Pedersen
9299a16c99
circleci: Bump to Go 1.9.2
Closes #4064
2017-11-11 09:46:35 +01:00
Bjørn Erik Pedersen
a9be687b81
hugolib: Pre-allocate some slices 2017-11-11 09:39:43 +01:00
Bjørn Erik Pedersen
b32ffed6ab
Update Chroma to get the latest SASS lexer
Fixes #4069
2017-11-09 14:15:12 +01:00
Bjørn Erik Pedersen
77cbd001ff
Update Travis and snapcraft to Go 1.9.2
See #4064
2017-11-08 00:37:59 +01:00
Bjørn Erik Pedersen
764f1304e1
hugolib: Add some more taxonomy permalinks test cases
See #1208
2017-11-07 23:42:47 +01:00
Brian Chen
d9a78b61ad Handle Taxonomy permalinks
Return the correct virtual Section for Taxonomy and TaxonomyTerm.
Restrict permalink expansion to only Pages and Taxonomies, but then
actually use expanded permalinks even for non-Pages.

Fixes #1208.
2017-11-07 23:05:48 +01:00
Bjørn Erik Pedersen
23ba779fab i18n: Support unknown language codes
Fixes #3564
2017-11-06 20:27:41 +01:00
Bjørn Erik Pedersen
550cec0b1f gopkg: Bump go-i18n version
See #3564
2017-11-06 20:27:41 +01:00
Bjørn Erik Pedersen
b88a105a7c
Revert "i18n: Allow custom language codes"
This reverts commit bb04010cbf.
2017-11-05 10:20:39 +01:00
Bjørn Erik Pedersen
b3443b3d0c
Revert "i18n: Prevent data race in lang code handling"
This reverts commit c97216e4f0.
2017-11-05 10:20:30 +01:00
Bjørn Erik Pedersen
c97216e4f0 i18n: Prevent data race in lang code handling
See #3564
2017-11-04 10:48:29 +01:00
Kevin Gimbel
bb04010cbf i18n: Allow custom language codes
Use the new `RegisterPluralSpec` function to register all defined
languages. This allows the usage of language identifiers which are not
part of the Unicode CLDR standard.

Closes #3564
2017-11-04 10:48:29 +01:00
Artem Sidorenko
76dc811c65 tpl/math: Refactor Mod with cast
It makes the code smaller
2017-10-30 21:55:36 +01:00
Kaushal Modi
488631fe0a Add support for height argument to figure shortcode
Fixes #4014
2017-10-29 20:46:57 +01:00
Rizky Agung
fdd62eb4c3 Add linebreak to README.md for better readability 2017-10-28 12:57:15 +02:00
Kaushal Modi
b6f2e3b438 Update toml dependency revision in Gopkg.lock too
Part 2 of
c61998d3ac

Related: #3998
2017-10-23 21:15:44 +02:00
Kaushal Modi
c61998d3ac Update toml dep to fetch its latest master branch instead of v0.3.0
toml v0.3.0 was released in March 2017 and is missing few fixes made in toml
package after the fact. So use the master branch instead.

This fixes a regression when switch was made from govendor vendor.json dep
management to Go dep.

Fixes #3998
2017-10-23 19:44:41 +02:00
Bjørn Erik Pedersen
45ad8ac381
vendor: Lock mage to v1
Dep insists on adding a dependency for it, so we might as well lock it to the correct version.

Fixes #3997
2017-10-23 13:37:59 +02:00
Bjørn Erik Pedersen
133cfd1710 mage: Skip Check on Go 1.8
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
db1a5af15d Gopk.toml cleanup
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
9ccc958ce7 Update Dockerfile and Snap build to reflect move to dep
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
30e471b8c6 Update CONTRIBUTING to reflect Go Dep
Closes #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
f711b170e4 Update magefile to use Go Dep
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
9536f7cd05 Adjust some deps versions
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
1ac47cd88a Run dep init
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
ba0b22ef44 vendor: Remove to prepare for dep
See #3988
2017-10-21 19:30:23 +02:00
Nate Finch
c9c19d7945 Fix error handling in mage build
* print gofmt errors
* don't error on lint failures
* explanatory comments and fix an error text
2017-10-21 17:37:00 +02:00
hugoreleaser
1d52bfbb47 releaser: Prepare repository for 0.31-DEV
[ci skip]
2017-10-19 11:35:38 +00:00
hugoreleaser
142ebba2c5 releaser: Add release notes to /docs for release of 0.30.2
[ci skip]
2017-10-19 11:34:09 +00:00
hugoreleaser
bf633ea2f2 releaser: Bump versions for release of 0.30.2
[ci skip]
2017-10-19 11:34:09 +00:00
Bjørn Erik Pedersen
6faf47e8dd
0.30.2 Release 2017-10-19 13:30:39 +02:00
hugoreleaser
7954bc0f0f releaser: Add release notes draft for 0.30.2
Rename to *-ready.md to continue. [ci skip]
2017-10-19 11:28:20 +00:00
Bjørn Erik Pedersen
c4bf03a558
releaser: Improve release notes front matter 2017-10-19 12:34:03 +02:00
Bjørn Erik Pedersen
3164103310
commands: Support Fast Render mode with sub-path in baseURL
Fixes #3981
2017-10-19 10:09:04 +02:00
Bjørn Erik Pedersen
6a5170116c
Merge commit '325009c3fd4ac90021897b7e3e025c14e70ce162' 2017-10-19 07:59:48 +02:00