1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

392 Commits

Author SHA1 Message Date
1d52bfbb47 releaser: Prepare repository for 0.31-DEV
[ci skip]
2017-10-19 11:35:38 +00:00
bf633ea2f2 releaser: Bump versions for release of 0.30.2
[ci skip]
2017-10-19 11:34:09 +00:00
bc53cd7b15 releaser: Prepare repository for 0.31-DEV
[ci skip]
2017-10-19 05:43:34 +00:00
89a3f47a21 releaser: Bump versions for release of 0.30.1
[ci skip]
2017-10-19 05:41:50 +00:00
45e0908b86 releaser: Prepare repository for 0.31-DEV
[ci skip]
2017-10-16 08:40:34 +00:00
811f381e23 releaser: Bump versions for release of 0.30
[ci skip]
2017-10-16 08:39:00 +00:00
7c30e2cbb0 Add table linenos support for Chroma highlighter
Fixes #3915
2017-10-14 16:00:27 +02:00
a58741a172 helpers: Fix broken test 2017-10-04 09:27:15 +02:00
47fdfd5196 Clean up lint in various packages
Changes fall into one of the following:

- gofmt -s
- receiver name is inconsistent
- omit unused 2nd value from range
- godoc comment formed incorrectly
- err assigned and not used
- if block ends with a return statement followed by else
2017-09-29 16:23:16 +02:00
d45e358a05 helpers: Fix broken Chroma test 2017-09-29 10:40:56 +02:00
8717a60cc0 Change SummaryLength to be configurable (#3924)
Move SummaryLength into the ContentSpec struct and refactor the
relevant summary functions to be methods of ContentSpec. The new
summaryLength struct member is configurable by the summaryLength config
value, and the default remains 70. Also updates hugolib/page to use the
refactored methods.

Resolves #3734
2017-09-29 09:04:55 +02:00
f806e951fd releaser: Prepare repository for 0.30-DEV
[ci skip]
2017-09-26 19:24:34 +00:00
396759a09b releaser: Bump versions for release of 0.29
[ci skip]
2017-09-26 19:23:15 +00:00
404e2994e5 releaser: Prepare repository for 0.29-DEV
[ci skip]
2017-09-25 08:00:38 +00:00
9e850c1f64 releaser: Bump versions for release of 0.28
[ci skip]
2017-09-25 07:59:12 +00:00
fb33d8286d Use Chroma as new default syntax highlighter
If you want to use Pygments, set `pygmentsUseClassic=true` in your site config.

Fixes #3888
2017-09-25 08:59:02 +02:00
5c3b210368 releaser: Prepare repository for 0.28-DEV
[ci skip]
2017-09-13 13:13:28 +02:00
18126434f1 releaser: Bump versions for release of 0.27.1
[ci skip]
2017-09-13 11:03:59 +00:00
0375cbd025 releaser: Prepare repository for 0.28-DEV
[ci skip]
2017-09-11 05:33:02 +00:00
828eb70fa6 releaser: Bump versions for release of 0.27
[ci skip]
2017-09-11 05:32:02 +00:00
d2249c5099 Set up Hugo release flow on CircleCI
This rewrites the release logic to use CircleCI 2.0 and its approve workflow in combination with the state of the release notes to determine what to do next.

Fixes #3779
2017-09-10 17:14:02 +02:00
c8257f8b72 Render task list item inside label for correct accessibility
Fixes #3303
2017-08-09 20:09:43 +02:00
40d7d3baa8 releaser: Prepare repository for 0.27-DEV
[ci skip]
2017-08-07 09:13:50 +02:00
b36f6e31e0 releaser: Bump versions for release of 0.26
[ci skip]
2017-08-07 09:05:07 +02:00
f768c27f0d helpers: Remove some unused funcs 2017-08-03 15:59:10 +02:00
81c13171a9 Add some missing doc comments
As pointed out by the linter, some exported functions and types are
missing doc comments.
The linter warnings have been reduced from 194 to 116.
Not all missing comments have been added in this commit though.
2017-08-03 15:57:51 +02:00
9891c0fb0e Remove sourceRelativeLinks
Fixes #3766
2017-08-02 22:04:38 +02:00
481924b34d helpers: Fix broken TaskList in Markdown
As per the referenced issue, if the task list in Markdown has
nothing before it, it will be rendered wrongly:

```
---
title: "My First Post"
date: 2017-07-29T20:21:57+02:00
draft: true
---

* [ ] TaskList

```

is rendered as:

```
<ul> class="task-list"
<li><input type="checkbox" disabled class="task-list-item"> TaskList</li>
</ul>
```

The problem lies in the `List` function of `HugoHTMLRenderer`, it had
a hardocded index of `4` for the first `>` of the list, it is used to
insert the class into the text before the closing bracket, but that
hardcoded index is only right when there is a newline before the
opening bracket, which is the case when there is anything in the
document before the task list, but if there is nothing, then there is
no newline, and the correct index of the first `>` will be `3`.

To fix that we're changing the hardcoded index to be dynamic by using
`bytes.Index` to find it properly. We're also adding a test case to
make sure this is tested against.

Fixes #3710
2017-08-02 00:33:37 +02:00
8fb594bfb0 Make the title case style guide configurable
This works for the `title` func and the other places where Hugo makes title case.

* AP style (new default)
* Chicago style
* Go style (what we have today)

Fixes #989
2017-07-31 22:16:46 +02:00
cb9dfc2613 helpers: Add support for French Guillemets
Fixes #3725
2017-07-29 10:10:40 +02:00
b60aa1a504 helpers: Add --trace to asciidoctor args
This will help to understand and fix errors by
seeing stacktrace of an error.

See #3714
2017-07-21 03:07:56 -06:00
91f410ea90 Bump versions to 0.26-DEV 2017-07-10 09:16:02 +02:00
aded65b71d releaser: Prepare repository for 0.25-DEV
[ci skip]
2017-07-10 09:02:20 +02:00
0e09be7b3c releaser: Bump versions for release of 0.25.1
[ci skip]
2017-07-10 08:57:34 +02:00
1e19a98451 releaser: Prepare repository for 0.26-DEV
[ci skip]
2017-07-07 09:34:13 +02:00
6e086e3d03 releaser: Bump versions for release of 0.25
[ci skip]
2017-07-07 09:23:54 +02:00
5f831a6223 releaser: Replace the magic version handling
Take the new version as a string value.
2017-07-05 14:27:43 +02:00
a1d260b41a hugolib: Extend the sections API
This commit adds some section related methods that have been asked for:

* .CurrentSection
* .IsDescendant
* .IsAncestor

Fixes #3591
2017-07-04 09:11:49 +02:00
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
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
3554fd1218 releaser: Prepare repository for 0.25-DEV
[ci skip]
2017-06-21 13:58:01 +02:00
8f69fe57a4 releaser: Bump versions for release of 0.24
[ci skip]
2017-06-21 13:52:27 +02:00
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
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
deffb4c3d9 releaser: Prepare repository for 0.24-DEV
[ci skip]
2017-06-16 09:52:02 +02:00
b502b9d8cc releaser: Bump versions for release of 0.23
[ci skip]
2017-06-16 09:41:39 +02:00
873a6f1885 Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
d8717cd4c7 all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
2aafb24766 Revert "releaser: Bump versions for release of 0.22.1"
This reverts commit dce70fb7c5845ec5e410e4bf97c862d38cfec9a5.
2017-06-13 14:26:56 +02:00
4bd5ce7ef3 releaser: Prepare repository for 0.23-DEV 2017-06-13 14:25:19 +02:00