Commit graph

4348 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
719251c1af
Bump the debouncer dependency
No practical difference.
2018-04-08 10:20:39 +02:00
Bjørn Erik Pedersen
8b2ef83bb1
Use a versioned debounce dependency 2018-04-07 18:09:31 +02:00
Bjørn Erik Pedersen
080302eb87
Fix handling of --contentDir etc. flag
We need to revisit the commands package re globals and tests, but this should fix the init order of flags and languages.

Fixes #4589
2018-04-07 16:40:45 +02:00
Anthony Fok
094ec17142
travis: Disable shallow clone to fix TestPageWithLastmodFromGitInfo
Fixes #4584
2018-04-07 06:54:24 -06:00
Anthony Fok
e84b7ade65
Revert "Disable failing test on Travis"
This reverts commit 2170943ae6
and commit 623c9afa84.
2018-04-07 06:53:47 -06:00
Bjørn Erik Pedersen
2817e84240 Fix handling of content files with "." in them
As in, more dots than just to separate the extension and any language indicator.

Fixes #4559
2018-04-07 10:57:29 +02:00
Bjørn Erik Pedersen
623c9afa84
And now really disable failing test on Travis
See #4584
2018-04-06 18:14:11 +02:00
Bjørn Erik Pedersen
2170943ae6
Disable failing test on Travis
See #4584
2018-04-06 17:31:13 +02:00
Bjørn Erik Pedersen
9cd4d35977
Revert "Try an older GitMap version"
This reverts commit 3a3261a3b9.
2018-04-06 12:01:38 +02:00
Bjørn Erik Pedersen
3a3261a3b9
Try an older GitMap version
To test if the test failures goes away.
2018-04-06 10:59:47 +02:00
Bjørn Erik Pedersen
6792d86ad0
hugolib: Set .Parent in bundled pages to its owner
Fixes #4582
2018-04-06 10:41:28 +02:00
hugoreleaser
e7d87e2410 releaser: Prepare repository for 0.39-DEV
[ci skip]
2018-04-05 16:39:05 +00:00
hugoreleaser
c475eab474 releaser: Add release notes to /docs for release of 0.38.1
[ci skip]
2018-04-05 16:35:25 +00:00
hugoreleaser
3a96fa40bf releaser: Bump versions for release of 0.38.1
[ci skip]
2018-04-05 16:35:25 +00:00
Bjørn Erik Pedersen
c356f1d417
Release 0.38.1 2018-04-05 18:31:17 +02:00
hugoreleaser
30c2c2f8ec releaser: Add release notes draft for 0.38.1
Rename to *-ready.md to continue. [ci skip]
2018-04-05 16:27:24 +00:00
Bjørn Erik Pedersen
f87239e4ca
Fix livereload for the home page bundle
Fixes #4576
2018-04-05 18:03:33 +02:00
Anthony Fok
db0633c1a4
snap: Revert to "mage test" because "mage check" fails
"mage check", which runs "go test", gofmt, "go vet", and
"go test -race", fails one way or another especially on
on non-amd64 architectures, and sometimes even on amd64 too.

Partially reverting my undocumented change in commit 294c0f8.

Fixes #4578
2018-04-05 09:35:47 -06:00
Anthony Fok
874159b543 snap: Add bash completion 2018-04-05 15:51:11 +02:00
Anthony Fok
294c0f8001 snap: Fix empty BuildDate in "hugo version"
Previously, "snap run hugo version" returns an empty BuildDate like so:

    Hugo Static Site Generator v0.38 linux/amd64 BuildDate:

Fix by overriding the default build target of snapcraft's go plugin.
2018-04-05 15:51:11 +02:00
Bjørn Erik Pedersen
a4deaeff0c
Fix some livereload content regressions
Introduced in Hugo 0.38.

Fixes #4566
2018-04-05 14:28:45 +02:00
Anthony Fok
4d115c56fa Update github.com/bep/gitmap to fix snap build
Fixes #4538
2018-04-05 14:20:39 +02:00
Brian Fitzgerald
26f34fd59d Fix two tests that are broken on Windows
Put guards around TestPageBundlerCaptureSymlinks and
TestPageBundlerSiteWitSymbolicLinksInContent so that they aren't
run on Windows (they both use symbolic links and the Go library
implementation requires administrator mode on Windows).
2018-04-05 08:35:06 +02:00
Bjørn Erik Pedersen
730b66b652
commands: Handle mass content etc. edits in server mode
Fixes #4563
2018-04-04 09:29:59 +02:00
hugoreleaser
4f639d6bd5 releaser: Prepare repository for 0.39-DEV
[ci skip]
2018-04-02 11:06:04 +00:00
hugoreleaser
f7bc28c529 releaser: Add release notes to /docs for release of 0.38
[ci skip]
2018-04-02 11:03:32 +00:00
hugoreleaser
20e9c08e1f releaser: Bump versions for release of 0.38
[ci skip]
2018-04-02 11:03:32 +00:00
Bjørn Erik Pedersen
37140a093b
Release 0.38 2018-04-02 12:58:13 +02:00
hugoreleaser
da80163c75
releaser: Add release notes draft for 0.38
Rename to *-ready.md to continue. [ci skip]
2018-04-02 12:58:13 +02:00
Anthony Fok
60e66d12ea travis: Clean up and increase verbosity 2018-04-02 09:20:58 +02:00
Bjørn Erik Pedersen
ed8bf081fd Squashed 'docs/' changes from 3068989b9..d9c8fc220
d9c8fc220 Rebuild Chroma CSS
a9168b106 Adds missing word
ebaa172af Remove note about enabling custom GitLab domains
2ef3918b2 Add code toggler
41878b6ca Clarify the use of .GetPage with page bundles
ffcb26270 Fix broken link for configuration.md
1e72e2b3e Fixed typo in heading - Hightlighter
72b2db77c Change "on the form" to "of the form"
e15e6966f Fix example GitHub url

git-subtree-dir: docs
git-subtree-split: d9c8fc220710fe2bdcc2c61afd9e40e7233953cf
2018-04-02 08:53:34 +02:00
Bjørn Erik Pedersen
558825cc20
Merge commit 'ed8bf081fdbf336e026517b7e1b123c039014ab5' 2018-04-02 08:53:34 +02:00
Bjørn Erik Pedersen
10c33c17cd
docs: Generate docshelper data
And fix build ...
2018-04-02 08:52:42 +02:00
Bjørn Erik Pedersen
2c54f1ad48
docshelper: List Chroma lexers
Fixes #4554
2018-04-02 08:50:42 +02:00
Anthony Fok
eb15ac37ef travis: Run "gem install" without sudo
Running "sudo gem install" was causing random errors like the following:

ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied @ rb_sysopen - /home/travis/.rvm/gems/ruby-2.4.1/cache/asciidoctor-1.5.6.2.gem

Perhaps sudo is no longer necessary, even on OS X?  :-)
2018-04-02 08:15:35 +02:00
Bjørn Erik Pedersen
eb42774e58
Add support for a content dir set per language
A sample config:

```toml
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = true

[Languages]
[Languages.en]
weight = 10
title = "In English"
languageName = "English"
contentDir = "content/english"

[Languages.nn]
weight = 20
title = "På Norsk"
languageName = "Norsk"
contentDir = "content/norwegian"
```

The value of `contentDir` can be any valid path, even absolute path references. The only restriction is that the content dirs cannot overlap.

The content files will be assigned a language by

1. The placement: `content/norwegian/post/my-post.md` will be read as Norwegian content.
2. The filename: `content/english/post/my-post.nn.md` will be read as Norwegian even if it lives in the English content folder.

The content directories will be merged into a big virtual filesystem with one simple rule: The most specific language file will win.
This means that if both `content/norwegian/post/my-post.md` and `content/english/post/my-post.nn.md` exists, they will be considered duplicates and the version inside `content/norwegian` will win.

Note that translations will be automatically assigned by Hugo by the content file's relative placement, so `content/norwegian/post/my-post.md` will be a translation of `content/english/post/my-post.md`.

If this does not work for you, you can connect the translations together by setting a `translationKey` in the content files' front matter.

Fixes #4523
Fixes #4552
Fixes #4553
2018-04-02 08:06:21 +02:00
Bjørn Erik Pedersen
f27977809c
Update stale.yml 2018-04-01 21:36:00 +02:00
Bjørn Erik Pedersen
7a634898c3
Update Chroma
Fixes #4549
2018-03-31 10:51:01 +02:00
Ricardo N Feliciano
1823c053c8 Add .Site.IsServer
Fixes #4478
2018-03-30 20:15:22 +02:00
Anthony Fok
511d5d3b76 travis: Move to Ubuntu Trusty image 2018-03-26 09:09:58 -06:00
Anthony Fok
8299fa885c snap: Remove "make" from build-packages because we use mage now 2018-03-26 07:02:45 -06:00
Anthony Fok
06495f713b snapcraft.yaml: Call mage with "-v" for debugging
See #4538
2018-03-26 04:56:15 -06:00
Bjørn Erik Pedersen
93e24a03ce
hugolib: Fix freeze in invalid front matter error case
Fixes #4526
2018-03-24 10:06:58 +01:00
Bjørn Erik Pedersen
e9c7b6205f
Allow themes to define output formats, media types and params
This allows a `config.toml` (or `yaml`, ´yml`, or `json`)  in the theme to set:

1) `params` (but cannot override params in project. Will also get its own "namespace", i.e. `{{ .Site.Params.mytheme.my_param }}` will be the same as `{{ .Site.Params.my_param }}` providing that the main project does not define a param with that key.
2) `menu` -- but cannot redefine/add menus in the project. Must create its own menus with its own identifiers.
3) `languages` -- only `params` and `menu`. Same rules as above.
4) **new** `outputFormats`
5) **new** `mediaTypes`

This should help with the "theme portability" issue and people having to copy and paste lots of setting into their projects.

Fixes #4490
2018-03-21 09:22:19 +01:00
Bjørn Erik Pedersen
3d1a6e109c
hugolib: Add ConfigSourceDescriptor
To prepare for config in themes

See #4490
2018-03-20 21:30:43 +01:00
Bjørn Erik Pedersen
b6798ee867
Bump some deprecations 2018-03-20 21:13:44 +01:00
Bjørn Erik Pedersen
0a23baa6a9 Squashed 'docs/' changes from 211a3c613..3068989b9
3068989b9 Merge commit '7ae9cf2ccb3eecc1ff50f686925249d01cf37c6c'
7ae9cf2cc Squashed 'themes/gohugoioTheme/' changes from d7a475e7..a1768ebb
b55157fae Revert "Anchorify headings up to h4"
b63dd5566 Anchorify headings up to h4
edfe36a19 Test out trac as highlighter style
98dc8d269 Update multilingual.md
a6e4d92c0 Update multilingual.md
86a90edf9 Fix typo 'If will' to 'It will' line 41
6b626fac6 Add a tip for testing custom 404.html on hugo server
6bfc17cfc Update few links to now point to gohugoio organization repos
f66bad971 Remove unintended alias
3bc56e9ec Fix shortcode name in example: image -> img
251142388 Fix broken link
27245af6a Fix the minimum required git version for GH Pages flow
aefc87b4d Fix link in Forestry showcase
489ec5ea0 Squashed 'themes/gohugoioTheme/' changes from 6f3a8bf5..d7a475e7
308a616fd Merge commit '489ec5ea03799fa092d891838c1655e60b34f337'
a80859814 Adjust showcase description

git-subtree-dir: docs
git-subtree-split: 3068989b9c601146e8e6be8c4e8e2b2c679e5230
2018-03-20 21:11:45 +01:00
Bjørn Erik Pedersen
84f4b731d2
Merge commit '0a23baa6a90901f772c234107c4f12c16c76f4aa' 2018-03-20 21:11:45 +01:00
Bjørn Erik Pedersen
61f6e9f63b
tpl/transform: Add a comments test for Remarshal
See #4521
2018-03-20 18:23:32 +01:00
Bjørn Erik Pedersen
904a3d9ddf
Update Chroma to get Go template support
Fixes #4515
2018-03-19 09:19:47 +01:00