Commit graph

4126 commits

Author SHA1 Message Date
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
Bjørn Erik Pedersen
b502b9d8cc releaser: Bump versions for release of 0.23
[ci skip]
2017-06-16 09:41:39 +02:00
Bjørn Erik Pedersen
781a1539cc releaser: Update /docs [ci skip] 2017-06-16 09:41:39 +02:00
Bjørn Erik Pedersen
af85eb62b4 releaser: Adjust 2017-06-16 09:40:47 +02:00
Bjørn Erik Pedersen
882b2b61fc releaser: Add release notes draft for 0.23
[ci skip]
2017-06-16 09:08:13 +02:00
Bjørn Erik Pedersen
00e2fe077a releaser: Adapt release logic to docs submodule 2017-06-16 08:51:43 +02:00
Bjørn Erik Pedersen
ccb8300d38 Update logo link in README 2017-06-14 11:24:09 +02:00
Bjørn Erik Pedersen
214dbdfb6f Remove docs building from CI builds
We could probably get it working, but we have plenty of site tests now.
2017-06-14 11:16:06 +02:00
Bjørn Erik Pedersen
729be8074b commands: Adjust docs path 2017-06-14 10:37:58 +02:00
Bjørn Erik Pedersen
6cee0dfe53 Add docs as submodule 2017-06-14 10:35:24 +02:00
Bjørn Erik Pedersen
8be3934b59 docs: Remove
Docs site is moved to https://github.com/gohugoio/hugoDocs

Will be re-added here as a Git submodule.
2017-06-14 10:32:16 +02:00
Bjørn Erik Pedersen
fbb25014e1 Update Gitter link in README
That is still running under spf13.
2017-06-13 23:39:55 +02:00
Bjørn Erik Pedersen
bf5e59958d vendor: Update to new org name 2017-06-13 22:11:05 +02:00
Bjørn Erik Pedersen
86543d6a50 Change Windows build badge link, take #3 2017-06-13 22:05:39 +02:00
Bjørn Erik Pedersen
3b47805fdd Change Windows build badge link, take #2 2017-06-13 22:04:36 +02:00
Bjørn Erik Pedersen
e6ae32a0ba Update Windows build link 2017-06-13 22:03:05 +02:00
Bjørn Erik Pedersen
5103935ae8 hugolib: Disable shaky leaktest on CI 2017-06-13 21:22:47 +02:00
digitalcraftsman
95386544e8 Update links in CONTRIBUTING.md due to the org transition 2017-06-13 19:37:30 +02:00
digitalcraftsman
7b99fb9f1c Update source path in Dockerfile due to the org transition 2017-06-13 19:34:20 +02:00
digitalcraftsman
d531d17b3b Update clone folder in appveyor.yml due to the org transition 2017-06-13 19:32:14 +02:00
digitalcraftsman
9266bf9d4c Update import path in snapcraft.yaml due to the org transition 2017-06-13 19:28:34 +02:00
Bjørn Erik Pedersen
873a6f1885 Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
Bjørn Erik Pedersen
f503d76a3b Update Makefile vs gohugoio/hugo 2017-06-13 19:06:34 +02:00
Bjørn Erik Pedersen
93643860c9 Update README to point to gohugoio/hugo 2017-06-13 19:00:10 +02:00
Bjørn Erik Pedersen
db46bcf82d examples: Update examples to point to gohugoio/hugo 2017-06-13 18:59:38 +02:00
Bjørn Erik Pedersen
66d4850b89 docs: Update layout references to gohugoio/hugo 2017-06-13 18:56:22 +02:00
Bjørn Erik Pedersen
715ff1f874 docs: Update content references to gohugoio/hugo 2017-06-13 18:54:42 +02:00
Bjørn Erik Pedersen
c17ad675e8 all: Update textual references in Go source to point to gohugoio/hugo 2017-06-13 18:47:17 +02:00
Bjørn Erik Pedersen
d8717cd4c7 all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
Bjørn Erik Pedersen
2d08a296a2 vendor: Improve GitInfo
Closes #3533
Closes #3552
2017-06-13 17:47:54 +02:00
Bjørn Erik Pedersen
a9e551a100 Fix handling of duplicate footnotes
Closes #1912
2017-06-13 15:03:08 +02:00
Bjørn Erik Pedersen
2aafb24766 Revert "releaser: Bump versions for release of 0.22.1"
This reverts commit dce70fb7c5.
2017-06-13 14:26:56 +02:00
Bjørn Erik Pedersen
4bd5ce7ef3 releaser: Prepare repository for 0.23-DEV 2017-06-13 14:25:19 +02:00
Bjørn Erik Pedersen
0f78dd06a4 releaser: Prepare repository for 0.22.1-DEV
[ci skip]
2017-06-13 14:22:14 +02:00
Bjørn Erik Pedersen
714594a8b7 releaser: Add relase notes to /docs for release of 0.22.1
[ci skip]
2017-06-13 14:17:45 +02:00
Bjørn Erik Pedersen
dce70fb7c5 releaser: Bump versions for release of 0.22.1
[ci skip]
2017-06-13 14:17:15 +02:00
Bjørn Erik Pedersen
c84079baa9 releaser: Add release notes draft for 0.22.1
[ci skip]
2017-06-13 14:16:56 +02:00
Bjørn Erik Pedersen
a30023f5cb hugolib: Fix section logic for root folders with subfolders
This commit fixes an issue introduced in the recently released Hugo 0.22.

This logic did not handle the case with root sections with non-section subfolders very well.

Fixes #3586
2017-06-13 12:41:50 +02:00
Bjørn Erik Pedersen
1f26420d39 hugolib: Support sub-sections in permalink settings
This enables both the variants below:

Current (first level only):

```
"blog": ":section/:title",
```

Nested (all levels):

```
"blog": ":sections/:title",
```

Should ideally been part of Hugo 0.22, but better late than never ...

Fixes #3580
2017-06-13 11:42:32 +02:00
Bjørn Erik Pedersen
ff54b6bddc commands: Adjust rlimit to 64000
See #3582
2017-06-12 20:43:19 +02:00
Bjørn Erik Pedersen
629e1439e8 commands: Make error on setting rlimit a warning only
And reduce it to 10000.

Closes #3582
2017-06-12 20:35:19 +02:00