| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed to make shortcode users happy with the new multilanguage support,
but it will also solve many other related posts about "stuff not available in the shortcode".
We will have to revisit this re the handler chain at some point, but that will be easier
now as the integration test story has improved so much.
As part of this commit, the site-building tests in page_test.go is refreshed, they now
tests for all the rendering engines (when available), and all of them now uses the
same code-path as used in production.
Fixes #1229
Fixes #2323
Fixes ##1076
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Work In Progress!
This commit makes a rework of the build and rebuild process to better suit a multi-site setup.
This also includes a complete overhaul of the site tests. Previous these were a messy mix that
were testing just small parts of the build chain, some of it testing code-paths not even used in
"real life". Now all tests that depends on a built site follows the same and real production code path.
See #2309
Closes #2211
Closes #477
Closes #1744
|
|
|
|
|
|
| |
This commit also consolidates URLs on Node vs Page, so now .Permalink should be interoperable.
Note that this implementations should be fairly short-livded, waiting for #2297, but the API should be stable.
|
|
|
|
|
|
|
|
|
|
| |
And a Hugo global variable which contains the site under build.
This is really needed to get some level of control of the "multiple languages" in play.
There are still work related to this scattered around, but that will come.
With this commit, the multilingual feature is starting to work.
|
|
|
|
| |
Will revisit Node later.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements:
* support to render:
* content/post/whatever.en.md to /en/2015/12/22/whatever/index.html
* content/post/whatever.fr.md to /fr/2015/12/22/whatever/index.html
* gets enabled when `Multilingual:` is specified in config.
* support having language switchers in templates, that know
where the translated page is (with .Page.Translations)
(when you're on /en/about/, you can have a "Francais" link pointing to
/fr/a-propos/)
* all translations are in the `.Page.Translations` map, including the current one.
* easily tweak themes to support Multilingual mode
* renders in a single swift, no need for two config files.
Adds a couple of variables useful for multilingual sites
Adds documentation (content/multilingual.md)
Added language prefixing for all URL generation/permalinking see in the
code base.
Implements i18n. Leverages the great github.com/nicksnyder/go-i18n lib.. thanks Nick.
* Adds "i18n" and "T" template functions..
|
|
|
| |
Make `go vet` great again
|
| |
|
|
|
|
| |
See #2085
|
| |
|
|
|
|
| |
This reverts commit cd558958a0c0ecd06f7560a38e27334fe983e0de.
|
|
|
|
| |
Fixes #2057
|
|
|
|
|
|
|
| |
By creating a fork of the Bitbucket inflect repo. It hasn't changed since 2013,
so it must be considered pretty stable.
Fixes #2062
|
|
|
|
|
|
|
| |
These are obviously internal and for the most part undocumented, creating lots of GoLint warnings.
See #1160
See #2014
|
| |
|
|
|
|
| |
See #2014
|
|
|
|
|
|
|
|
|
|
| |
This also includes a refactor of the hugofs package and its usage.
The motivation for that is:
The Afero filesystems are brilliant. Hugo's way of adding a dozen of global variables for the different filesystems was a mistake. In readFile (and also in some other places in Hugo today) we need a way to restrict the access inside the working dir. We could use ioutil.ReadFile and implement the path checking, checking the base path and the dots ("..") etc. But it is obviously better to use an Afero BasePathFs combined witha ReadOnlyFs. We could create a use-once-filesystem and handle the initialization ourselves, but since this is also useful to others and the initialization depends on some other global state (which would mean to create a new file system on every invocation), we might as well do it properly and encapsulate the predefined set of filesystems. This change also leads the way, if needed, to encapsulate the file systems in a struct, making it possible to have several file system sets in action at once (parallel multilanguage site building? With Moore's law and all...)
Fixes #1551
|
| |
|
| |
|
|
|
|
|
|
| |
Fixing some breaking blogs on Go 1.6
Fixes #1879
|
| |
|
|
|
|
| |
These are of no interest outside the package.
|
|
|
|
| |
Fixes #1923
|
|
|
|
| |
This adds a test for the issue #1797 and its fix in 68e2e63.
|
|
|
|
| |
See #1753
|
|
|
|
|
|
| |
ala GitHub repository markdown for both md files and non-md files
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
|
|
|
|
| |
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
|
|
|
|
| |
Fixes #1470
|
|
|
|
| |
Fixes #1601
|
|
|
|
| |
See #1646
|
|
|
|
| |
See #959
|
| |
|
|
|
|
| |
Fixes #1235
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit replaces the regexp driven `replaceShortcodeTokens` with a handwritten one.
It wasnt't possible to handle the p-tags case without breaking performance.
This fix actually improves in that area:
```
benchmark old ns/op new ns/op delta
BenchmarkParsePage 142738 142667 -0.05%
BenchmarkReplaceShortcodeTokens 665590 575645 -13.51%
BenchmarkShortcodeLexer 176038 181074 +2.86%
benchmark old allocs new allocs delta
BenchmarkParsePage 87 87 +0.00%
BenchmarkReplaceShortcodeTokens 9631 9424 -2.15%
BenchmarkShortcodeLexer 274 274 +0.00%
benchmark old bytes new bytes delta
BenchmarkParsePage 141830 141830 +0.00%
BenchmarkReplaceShortcodeTokens 52275 35219 -32.63%
BenchmarkShortcodeLexer 30177 30178 +0.00%
```
Fixes #1148
|
|
|
|
| |
This reverts commit 99e250917ddc351d45adfeb81057ea3607d1b148.
|
|
|
|
| |
This reverts commit 32d91d616e99cd05b59644e292b29be415d5054f.
|
|
|
|
| |
This reverts commit 24351c58bedea72e4e113e2d2e5753a32ce2a0e3.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Section names are also used as the title of the list pages, but naming section folders as `Fish and Chips` and similar didn't work very well.
This commit fixes that.
This commit also changes the title casing of the section titles. Some may argue that this is a breaking change, but the old behaviour was also pretty broken,
even for languages that use title capitalizations, as it didn't follow any particular style guide, `fish and chips` became `Fish And Chips` etc.
Now it just turns the first letter into upper case, so `Fish and Chips` will be left as `Fish and Chips`.
People wanting the good old behaviour can use the `title` template func.
Fixes #1176
|
|
|
|
|
|
| |
To determine if a page is the "Home Page" has inspired lots of creativity in the template department.
This commit makes it simpler: IsHome will tell the truth.
|
|
|
|
| |
of order tested)
|
|
|
|
| |
See #988
|
| |
|
|
|
|
| |
Since a string is what's really needed.
|
|
|
|
|
|
| |
Have to convert path slashes to file path slashes before the URL path is compared to a file path.
Fixes #957
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First step to use initialisms that golint suggests,
for example:
Line 116: func GetHtmlRenderer should be GetHTMLRenderer
as see on http://goreportcard.com/report/spf13/hugo
Thanks to @bep for the idea!
Note that command-line flags (cobra and pflag)
as well as struct fields like .BaseUrl and .Url
that are used in Go HTML templates need more work
to maintain backward-compatibility, and thus
are NOT yet dealt with in this commit.
First step in fixing #959.
|
|
|
|
| |
Fixes #958
|