Commit graph

3616 commits

Author SHA1 Message Date
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
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
a7765bb3c1 Merge commit 'dd78d5b23fe597f4461aa4199401b4e07c0612e2' as 'docs' 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
Bjørn Erik Pedersen
662e12f348 commands, create: Add .Site to the archetype templates
This commit completes the "The Revival of the Archetypes!"

If `.Site` is used in the arcetype template, the site is built and added to the template context.

Note that this may be potentially time consuming for big sites.

A more complete example would then be for the section `newsletter` and the archetype file `archetypes/newsletter.md`:

```
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
tags:
- x
categories:
- x
draft: true
---

<!--more-->

{{ range first 10 ( where .Site.RegularPages "Type" "cool" ) }}
* {{ .Title }}
{{ end }}
```

And then create a new post with:

```bash
hugo new newsletter/the-latest-cool.stuff.md
```

**Hot Tip:** If you set the `newContentEditor` configuration variable to an editor on your `PATH`, the newly created article will be opened.

The above _newsletter type archetype_ illustrates the possibilities: The full Hugo `.Site` and all of Hugo's template funcs can be used in the archetype file.

Fixes #1629
2017-06-19 10:47:00 +02:00
Bjørn Erik Pedersen
422057f607 create: Use archetype template as-is as a Go template
This commit removes the fragile front matter decoding, and takes the provided archetype file as-is and processes it as a template.

This also means that we no longer will attempt to fill in default values for `title` and `date`.

The upside is that it is now easy to create these values in a dynamic way:

```toml
+++
title = {{ .BaseFileName | title }}
date = {{ .Date }}
draft = true
+++
```

You can currently use all of Hugo's template funcs, but the data context is currently very shallow:

* `.Type` gives the archetype kind provided
* `.Name` gives the target file name without extension.
* `.Path` gives the target file name
* `.Date` gives the current time as RFC3339 formatted string

The above  will probably be extended in #1629.

Fixes #452
Updates #1629
2017-06-18 19:06:28 +02:00
Bjørn Erik Pedersen
4aa1239070 Update links to new discuss URL 2017-06-17 10:06:49 +02:00
Bjørn Erik Pedersen
411ac93086 vendor: Update deps 2017-06-16 14:24:40 +02:00
Bjørn Erik Pedersen
4345026bd6 releaser: Add TODO 2017-06-16 10:11:02 +02:00
Bjørn Erik Pedersen
deffb4c3d9 releaser: Prepare repository for 0.24-DEV
[ci skip]
2017-06-16 09:52:02 +02:00
Bjørn Erik Pedersen
12b844daf0 releaser: Update /docs to 0.23 [ci skip] 2017-06-16 09:47:25 +02:00