Commit graph

3523 commits

Author SHA1 Message Date
Bjørn Erik Pedersen dd9b1baab0 hugolib: Make .Site.Sections return the top level sections
See #3591
2017-07-04 09:11:49 +02:00
Victor Kropp 1039356edf commands: Support human-readable YAML boolean values in undraft 2017-07-03 23:26:01 +02:00
Bjørn Erik Pedersen ccdd08d57a tpl/collections: Add Pages support to Intersect and Union
This enables `AND` (`intersect`)  and `OR` (`union`)  filters when combined with `where`.

Example:

```go
{{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }}
{{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }}
{{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }}
```

The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page params.

Fixes #3174
2017-07-03 21:48:03 +02:00
Bjørn Erik Pedersen d12cf5a25d tpl/collections: Fix In function for JSON arrays
Fixes #1468
2017-07-03 10:23:03 +02:00
Bjørn Erik Pedersen e10e51a008 parser: Fix handling of JSON front matter with escaped quotes
Fixes #3661
2017-07-03 09:01:54 +02:00
Artem Sidorenko 34c566773a tpl/math: Add log function
It might be very useful for building tag clouds.
2017-07-03 00:20:48 +02:00
Mitchell Cohen 41805dca9e hugolib: Render 404.html for all languages
Fixes #3598
2017-07-01 22:58:52 +02:00
coderzh 7ee1f25e9e hugo import jekyll support nested _posts directories
Fixes #1890
Closes #1911
2017-07-01 10:15:22 +02:00
Bjørn Erik Pedersen 3aa0e16d0c cache: Add even more concurrency to test 2017-06-28 22:47:28 +02:00
Bjørn Erik Pedersen b3c8056de2 cache: Add concurrent cache test 2017-06-28 22:44:37 +02:00
Bjørn Erik Pedersen fe132e1c3e vendor: Add missing WebP dependencies
See #3529
2017-06-28 22:16:45 +02:00
Bjørn Erik Pedersen 8431c8d39d tpl: Add WebP images support
Fixes #3529
2017-06-28 21:45:48 +02:00
Bruno Amaral da72805a43 tpl: Only show post's own keywords in schema.org
Fixes #2635
Closes #2646
2017-06-28 21:26:18 +02:00
Bjørn Erik Pedersen 72fd871710 hugolib: Add more summary test
Closes #2973
2017-06-28 20:30:26 +02:00
Maik Ellerbrock 118f8f7cf2 Dockerfile: Update Dockerfile and add Docker optimizations 2017-06-28 03:35:26 -06:00
Damir Vandic 56d82aa025 hugofs: Fix typo in code comment 2017-06-27 13:21:55 -06:00
Yihui Xie eccb064782 tpl: Simplify the Disqus template a little bit (#3655)
In accordance to the official guide: https://disqus.com/admin/universal/
2017-06-27 09:45:48 -06:00
Yihui Xie 2e1e4934b6 tpl: Improve the built-in Disqus template (#3639)
* Improve the built-in Disqus template

  Set `disqus_identifier`, `disqus_title`, and `disqus_url`
  only if the user has explicitly provided them.

  Do not load Disqus when the website is previewed locally,
  otherwise it is very confusing.

* Use disqus_config instead of three global variables

  https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables
2017-06-27 05:40:01 -06:00
Haishan Zhou a54404968a helpers: Add Blackfriday 'joinLines' extension support (#3574)
See https://github.com/russross/blackfriday/pull/334
"add an extension to handle Chinese (or CJK) newlines"
for more information.
2017-06-27 04:56:50 -06:00
Frank Braun bfce30d859 helpers: add --initial-header-level=2 to rst2html (#3528)
reStructuredText doesn't have explicit section levels but sets them in
the order of appearance. Since level 1 is already set from the title in
the front matter it makes more sense to start with level 2 when
converting with rst2html.
2017-06-27 04:26:33 -06:00
Anthony Fok 30e14cc316 Make --navigateToChanged more robust on Windows
This ensures the new "open 'current content page' in browser" works
on Windows, especially with Emacs and Vim.

Special thanks to @bep for coming up with the idea of the fix.

See #3645
2017-06-27 11:45:54 +02:00
Bjørn Erik Pedersen c825a73121 Support open "current content page" in browser
This commit adds a new `--navigateToChanged` and config setting with the same name, that, when running the Hugo server with live reload enabled, will navigate to the current content file's URL on save. 

This is really useful for site-wide content changes (copyedits etc.).
Fixes #3643
2017-06-26 21:34:16 +02:00
Bjørn Erik Pedersen 7198ea8a1e Revert "Remove docs building from CI builds"
Now /docs is a Git subtree, so now this should just work.

This reverts commit 214dbdfb6f.
2017-06-26 21:05:21 +02:00
Bjørn Erik Pedersen a7765bb3c1 Merge commit 'dd78d5b23fe597f4461aa4199401b4e07c0612e2' as 'docs' 2017-06-26 20:46:06 +02:00
Bjørn Erik Pedersen dd78d5b23f Squashed 'docs/' content from commit 5d9a6703
git-subtree-dir: docs
git-subtree-split: 5d9a6703591c29283800d7b9e4c5c85981ed86d6
2017-06-26 20:46:06 +02:00
Bjørn Erik Pedersen 31393f6024 Remove the docs submodule
Will be replaced by a Git subtree.

See #3647
2017-06-26 20:45:04 +02:00
Anthony Fok aff1ac3235 commands: Use example.com as homepage for new theme
The fictional siteforthistheme.com domain has been
squatted by Afternic of GoDaddy since November 2016...
2017-06-26 12:38:45 -06:00
Anthony Fok b463c5ad86 releaser: Remove trailing space in fixes list 2017-06-25 08:29:58 -06:00
Bjørn Erik Pedersen 1a041522df releaser: One more fix 2017-06-24 09:49:57 +02:00
Bjørn Erik Pedersen 3aade08977 releaser: Improve docs submodule handling
Still not optimal.
2017-06-24 09:18:57 +02:00
Bjørn Erik Pedersen 0e1bda34c3 vendor: Fix +-timezones in TOML
Fixes #29
2017-06-23 18:57:06 +02:00
Bjørn Erik Pedersen 2e4ccd3d34 create: Preserve shortcodes in archetype templates
Fixes #3623
2017-06-23 09:59:06 +02:00
Bjørn Erik Pedersen fd924d1802 commands: Create default archetype on new site
See #3626
2017-06-22 22:00:42 +02:00
Bjørn Erik Pedersen e908d955d2 create: Fix archetype regression when no archetype file
Fixes #3626
2017-06-22 22:00:42 +02:00
Bjørn Erik Pedersen 8b620f7a8a docs: Update 2017-06-21 21:41:40 +02:00
Bjørn Erik Pedersen 12611e0c64 Update docs 2017-06-21 21:39:33 +02:00
Anthony Fok 58ce9213c0 releaser: Fix typo, change "relase" to "release" 2017-06-21 21:37:53 +02:00
Bjørn Erik Pedersen ae3039b6e8 Update docs 2017-06-21 14:07:35 +02:00
Bjørn Erik Pedersen 3554fd1218 releaser: Prepare repository for 0.25-DEV
[ci skip]
2017-06-21 13:58:01 +02:00
Bjørn Erik Pedersen 1ac4dbb900 releaser: Update /docs to 0.24 [ci skip] 2017-06-21 13:53:23 +02:00
Bjørn Erik Pedersen 8f69fe57a4 releaser: Bump versions for release of 0.24
[ci skip]
2017-06-21 13:52:27 +02:00
Bjørn Erik Pedersen f8c5716adf releaser: Update /docs [ci skip] 2017-06-21 13:52:27 +02:00
Bjørn Erik Pedersen 2ba9a8769f releaser: Add release notes draft for 0.24 2017-06-21 13:51:05 +02:00
Bjørn Erik Pedersen c43b512b47 output: Identify extension-less text types as text
See #3614
2017-06-20 17:21:31 +02:00
Bjørn Erik Pedersen 19f2e72913 Support non-md files as archetype files
It now properly uses the extension of the target file to determine archetype file.

Fixes #3597
Fixes #3618
2017-06-20 13:41:48 +02:00
Bjørn Erik Pedersen 0f40e1fadf media, hugolib: Support extension-less media types
This change is motivated by Netlify's `_redirects` files, which is currently not possible to generate with Hugo.

This commit adds a `Delimiter` field to media type, which defaults to ".", but can be blanked out.

Fixes #3614
2017-06-20 11:04:14 +02:00
Bjørn Erik Pedersen 516e6c6dc5 hugolib: Add disableAliases
Note that even with this setting enabled, the aliases themselves are preserved on the pages.

The big motivation for this change is to be able to use the alias definitions to generate `.htaccess` or Netlify's `_redirect` files with server-side redirects.

Fixes #3613
2017-06-20 11:03:34 +02:00
Bjørn Erik Pedersen 3183b9a29d parser: Fix handling of quoted brackets in JSON front matter
Also remove a broken JSON test.

Fixes #3511
2017-06-19 16:45:52 +02:00
Bjørn Erik Pedersen 1a282ee432 vendor: Update Viper 2017-06-19 14:48:16 +02:00
Bjørn Erik Pedersen fb53987a4f hugolib: Fix error handling for JSON front matter
Fixes #3610
2017-06-19 14:41:03 +02:00