brevno-suite/hugo
7 years agoreleaser: Add release notes to /docs for release of 0.36 v0.36
hugoreleaser [Mon, 5 Feb 2018 15:22:26 +0000 (15:22 +0000)]
releaser: Add release notes to /docs for release of 0.36

[ci skip]

7 years agoreleaser: Bump versions for release of 0.36
hugoreleaser [Mon, 5 Feb 2018 15:22:26 +0000 (15:22 +0000)]
releaser: Bump versions for release of 0.36

[ci skip]

7 years agoRelease 0.336
Bjørn Erik Pedersen [Mon, 5 Feb 2018 15:10:16 +0000 (16:10 +0100)]
Release 0.336

7 years agoreleaser: Add release notes draft for 0.36
hugoreleaser [Mon, 5 Feb 2018 14:56:39 +0000 (14:56 +0000)]
releaser: Add release notes draft for 0.36

Rename to *-ready.md to continue. [ci skip]

7 years agodocs: Add documentation for smart cropping etc.
Bjørn Erik Pedersen [Mon, 5 Feb 2018 14:04:07 +0000 (15:04 +0100)]
docs: Add documentation for smart cropping etc.

7 years agoMerge commit 'c305e44f5f081e4436195923a4593e396f07cd49'
Bjørn Erik Pedersen [Mon, 5 Feb 2018 13:24:24 +0000 (14:24 +0100)]
Merge commit 'c305e44f5f081e4436195923a4593e396f07cd49'

7 years agoSquashed 'docs/' changes from dce236ad1..2fc775dec
Bjørn Erik Pedersen [Mon, 5 Feb 2018 13:24:00 +0000 (14:24 +0100)]
Squashed 'docs/' changes from dce236ad1..2fc775dec

2fc775dec Fix allLanguages code
dc6bfbedb Fix header level
6d652458c Fixed typo in docs.
2da6518be Fix broken build in previous commit
eabe7a40b Move some release notes to bundles to test the resource setup
34f2a41f2 Add featured image to news articles
bba1104b8 Update index.md
62bb8d826 Bundless > bundles
afea67773 Release notes spelling
f66d13af2 Release Hugo 0.35
613c50cdd releaser: Add release notes to /docs for release of 0.35
c9f7fd637 releaser: Bump versions for release of 0.35
360296c34 docs: Regenerate CLI docs
0d688633f Merge commit '337d0c5f516ee085205e8abefdb7f87e6d33ca05'
8fc9e325b command: Remove undraft command
f8cc6d51f docs: Re-generate CLI docs
556ea887a releaser: Prepare repository for 0.35-DEV

git-subtree-dir: docs
git-subtree-split: 2fc775dece2c5a76aaa3855b6dd054fd74c8738d

7 years agoresource: Add smart cropping
Bjørn Erik Pedersen [Sat, 3 Feb 2018 15:47:35 +0000 (16:47 +0100)]
resource: Add smart cropping

This commit `smart` as a new and default anchor in `Fill`.

So:

```html
{{ $image.Fill "200x200" }}
```

Is, with default configuration, the same as:

```html
{{ $image.Fill "200x200" "smart" }}
```

You can change this default in your `config.toml`:

```toml
[imaging]
[imaging]
resampleFilter = "box"

quality = 68

anchor = "Smart"
```

Fixes #4375

7 years agotpl: Ensure site templates can override theme templates
Cameron Moore [Mon, 5 Feb 2018 04:13:52 +0000 (22:13 -0600)]
tpl: Ensure site templates can override theme templates

The tplimpl package was misusing the TemplateLookupDescriptor.WorkingDir
field from the output package. By incorrectly setting it to the theme
directory instead of the site root, the user is unable to override theme
templates in some situations.

Fixes #3505

7 years agohugolib: Add additional test to TestTemplateLookupOrder
Cameron Moore [Mon, 5 Feb 2018 04:09:14 +0000 (22:09 -0600)]
hugolib: Add additional test to TestTemplateLookupOrder

Add an additional test to "Variant 4, theme, use site base" to also test
for the index.html base (from by testing of #3505).  Also add a "name"
field to the test cases to make it easier to know which test is failing
versus just getting a slice index.

7 years agohugolib: Fix broken TestTemplateLookupOrder
Cameron Moore [Mon, 5 Feb 2018 04:04:40 +0000 (22:04 -0600)]
hugolib: Fix broken TestTemplateLookupOrder

It looks like we left some debugging code in place that caused all but
one test case to run.

7 years agoFix JSON array-based data file handling regression
Vas Sudanagunta [Fri, 2 Feb 2018 06:35:26 +0000 (01:35 -0500)]
Fix JSON array-based data file handling regression

This bug was introduced in Hugo 0.35.

Fixes #4361

7 years agoIncrease data directory test coverage
Vas Sudanagunta [Fri, 2 Feb 2018 06:28:24 +0000 (01:28 -0500)]
Increase data directory test coverage

*  Adds retro-coverage for #4361
*  Verifies open issues #4138, #3890, #4366, 4083
*  Removes test reliance on the very code it is testing (hugo/parser package).
   Expected results are now all built manually / are more precise.
   Tests can run against different versions (no linkage errs)

7 years agoreleaser: Prepare repository for 0.36-DEV
hugoreleaser [Wed, 31 Jan 2018 10:47:09 +0000 (10:47 +0000)]
releaser: Prepare repository for 0.36-DEV

[ci skip]

7 years agoreleaser: Add release notes to /docs for release of 0.35 v0.35
hugoreleaser [Wed, 31 Jan 2018 10:44:41 +0000 (10:44 +0000)]
releaser: Add release notes to /docs for release of 0.35

[ci skip]

7 years agoreleaser: Bump versions for release of 0.35
hugoreleaser [Wed, 31 Jan 2018 10:44:41 +0000 (10:44 +0000)]
releaser: Bump versions for release of 0.35

[ci skip]

7 years agoRelease 0.35
Bjørn Erik Pedersen [Wed, 31 Jan 2018 10:41:19 +0000 (11:41 +0100)]
Release 0.35

7 years agodocs: Regenerate CLI docs
Bjørn Erik Pedersen [Wed, 31 Jan 2018 10:40:30 +0000 (11:40 +0100)]
docs: Regenerate CLI docs

7 years agoreleaser: Add release notes draft for 0.35
hugoreleaser [Wed, 31 Jan 2018 10:13:23 +0000 (10:13 +0000)]
releaser: Add release notes draft for 0.35

Rename to *-ready.md to continue. [ci skip]

7 years agoMerge commit '337d0c5f516ee085205e8abefdb7f87e6d33ca05'
Bjørn Erik Pedersen [Wed, 31 Jan 2018 10:08:08 +0000 (11:08 +0100)]
Merge commit '337d0c5f516ee085205e8abefdb7f87e6d33ca05'

7 years agoSquashed 'docs/' changes from 56c34962c..dce236ad1
Bjørn Erik Pedersen [Wed, 31 Jan 2018 10:07:47 +0000 (11:07 +0100)]
Squashed 'docs/' changes from 56c34962c..dce236ad1

dce236ad1 Wrap up the bundle etc. edits for now
27d058566 Add the bundle tree to the organization bundle
a83f750dd Move organization.md to its own bundle
01ec4f462 Make the image docs a bundle
60de1e090 Some more resources copy-edits
05d763c0c Some resource copy-edits
6299d6dbb Update the imgproc shortcode
59e0fc209 Add headless bundle documentation
a3bbf60bf Link Page Resources page from Front Matter page
830576f86 Update order significance section, add counter section
3b1836509 Revert the recent change made to default list template
886ed0e10 Page Bundles draft rev 2
f530d1a7a image processing and page resources made into regular .md
ec47cecda Finalised Page Resources and Image Processing Moved Page Resources and Impage Processing out of the Bundle section and at the root of the Content Management section
253092335 Modified front matter metadata exemple. Added yaml version.
da5e4f476 Adding date in the front-matter; missed in previous commit
6bc3ced13 Add rough draft for page and section bundles
a0e44458f Image processing first draft, Resources second read/fix
2367f0b78 data: Remove duplicate layouts in table
c2f179839 First draft of bundles/resources (covers resources and metadata)
2a3f9a613 Add weights to pages in Bundles branch
9a0146cc0 Switch front-matter format of Bundles doc to yaml; add front-matter
1295fc083 First draft for Bundles documentation organization structure
5a2e52231 Fix archetype paths
9c2e5c063 Merge commit '22cced34fc608256f8271ad591a5ccca991bb164'
22cced34f Squashed 'themes/gohugoioTheme/' changes from 75da2f6b..ecad8247
55d16c9a1 Fix broken sentence in multilingual sections
a76895ad2 Replace the outdated Emacs package with new one
e6cf1dec0 Remove obsolete link to hugo roadmap
dd2fd145b Add GitLab Pages to mentioned hosters (#309)
a05ce6bf6 Add 0.34 release notes poster
5c0ebdfca Release 0.34
13c2f3dc8 Merge branch 'temp34'
e6b5ffa04 Add 0.34 poster
1e1960496 releaser: Add release notes to /docs for release of 0.34
ac3efe182 releaser: Bump versions for release of 0.34
8f91f62d8 Fixes #222
cca35dbe4 Fix example
eaaa21ca1 Add missing params key
00d0b0363 Adding new Blogger utility to tools/migrations
7d36d579e Updated the line number for Dockerfile pointer
852188f85 Update installing.md with Fedora instructions
4d151a3ab Update search.md
4c2750bfb Update deployment-with-nanobox.md
c3cc9cd49 configuration: Remove defaultExtension from docs
f7c96b4b5 Update GitHub Pages documentation
55787f09a Merge branch 'rmetzler-menu-link-title'
2abbd9bd9 Merge branch 'master' into menu-link-title
e1fd710b7 Bring archetypes in from theme.
daf6f51c0 Mention the significance of leading 0 in int fn string input
07f498755 Add documentation for `cond` function.
050ccd12b Add documentation for the .HasShortcode function
919af9071 Correct anchor under 'Add custom metadata to a Taxonomy Term'
55600b4ff More layouts work
201cf4f67 Add some more single page layout variants
d5e7c03e2 Rework the layouts doc
84622e67c Cleans up the code sample
c231c9bd5 Add a new note to 0.33 relnotes
328ec9930 Release 0.33
b108fcc7b Merge branch 'temp33' into next
ab9d9ee65 releaser: Prepare repository for 0.34-DEV
e20c75320 releaser: Add release notes to /docs for release of 0.33
49f24dcd1 releaser: Bump versions for release of 0.33
9c8e5e207 Update 0.33 poster
7655603c8 Regenerate the docshelper data
16dc99583 Add Hugo 0.33 poster
ce40cc197 Merge commit '3cf4300097610bb8b5bd0686d96d1df5db641895'
9a3085523 releaser: Prepare repository for 0.33-DEV
a52db97d8 fixing typos and syntax for consistency
64525670f ádd title to some menu entries. This needs hugo >= v0.32
85d415ab2 ádd examples for menu .Title and .Page

git-subtree-dir: docs
git-subtree-split: dce236ad1258a9d9a0ee209f02b2e1f65b46f0fb

7 years agoAdd "removable-media" interface to snapcraft.yaml
Anthony Fok [Wed, 31 Jan 2018 09:00:16 +0000 (02:00 -0700)]
Add "removable-media" interface to snapcraft.yaml

Closes #3837

7 years agoFix Docker build
Ryan Skoblenick [Wed, 31 Jan 2018 06:33:03 +0000 (01:33 -0500)]
Fix Docker build

The present Dockerfile in master does not build a Hugo container. The
build container prematurely exits because `dep ensure` can not locate
`Gopkg.toml` due to the source files not being copied/added to the
container prior to running this command. The minimal change require
to resolve the issue is merely move the ADD source before the RUN dep.

Fixes #4076
Resolves #4077

7 years agoreadme: Update list of "builders" to include myself
Bjørn Erik Pedersen [Tue, 30 Jan 2018 18:56:29 +0000 (19:56 +0100)]
readme: Update list of "builders" to include myself

7 years agoFix language params handling
Bjørn Erik Pedersen [Tue, 30 Jan 2018 16:51:18 +0000 (17:51 +0100)]
Fix language params handling

This fixes some issues with language params handling by separating params from configuration values per language.

This means that you can now do this:

```toml
[languages]
[languages.en]
languageName = "English"
weight = 1
title = "My Cool Site"
[languages.en.params]
myParam = "Hi!"
```

This is not a breaking change, but the above is a less suprising way of configuring custom params.

It also fixes some hard-to-debug corner-cases in multilingual sites.

Fixes #4356
Fixes #4352

7 years agocommands: Remove some now superflous Fast Render Mode code
Bjørn Erik Pedersen [Tue, 30 Jan 2018 09:47:38 +0000 (10:47 +0100)]
commands: Remove some now superflous Fast Render Mode code

Updates #4339

7 years agohugolib: Extract the Fast Render Mode logic into a method
Bjørn Erik Pedersen [Tue, 30 Jan 2018 09:33:57 +0000 (10:33 +0100)]
hugolib: Extract the Fast Render Mode logic into a method

This also improves on the previous commit as it takes pages without content files into account.

Closes #4339

7 years agohugolib: Handle newly created files in Fast Render Mode
Alexey Grachov [Sun, 28 Jan 2018 10:46:48 +0000 (12:46 +0200)]
hugolib: Handle newly created files in Fast Render Mode

Updates #4339

7 years agocommand: Remove undraft command
Robert Basic [Mon, 29 Jan 2018 15:21:42 +0000 (16:21 +0100)]
command: Remove undraft command

According to @bep, it is easier to undraft content by
editing manually the frontmatter of said content by
setting the draft flag to `false`, or removing it completely,
than to rely on the undraft command which is a source of
many bugs.

Fixes #4353

7 years agocommands: Mark deprecated flags in the CLI help
Bjørn Erik Pedersen [Mon, 29 Jan 2018 13:07:46 +0000 (14:07 +0100)]
commands: Mark deprecated flags in the CLI help

See #4347

7 years agohugolib: Deprecate useModTimeAsFallback
Bjørn Erik Pedersen [Mon, 29 Jan 2018 12:52:04 +0000 (13:52 +0100)]
hugolib: Deprecate useModTimeAsFallback

Fixes #4351

7 years agotpl: Update Twitter card to also consider images in .Resources
Bjørn Erik Pedersen [Mon, 29 Jan 2018 10:44:41 +0000 (11:44 +0100)]
tpl: Update Twitter card to also consider images in .Resources

The new lookup order:

1) Page.Params.images if set
2) Image resources: images with name "feature" (priority), "cover", "thumbnail"
3) Site.Params.images if set

Fixes #4349

7 years agoresource: Make resource counters for name and title independent
Bjørn Erik Pedersen [Mon, 29 Jan 2018 09:44:09 +0000 (10:44 +0100)]
resource: Make resource counters for name and title independent

This is the most flexible with the current syntax, and probably what most people would expcect.

Updates #4335

7 years agocreate: Provide .Name to the archetype templates
Bjørn Erik Pedersen [Sun, 28 Jan 2018 18:38:10 +0000 (19:38 +0100)]
create: Provide .Name to the archetype templates

This value will have a better suited value to base the titles on in your archetype templates when creating bundle ´index.md` type of files.

The internal template is updates, but you will have to update any custom archetype template to use the new `.Name` variable:

```bash
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---
```

Fixes #4348

7 years agocommands: Deprecate CLI flags canonifyURLs, pluralizeListTitles, preserveTaxonomyName...
Bjørn Erik Pedersen [Sun, 28 Jan 2018 16:22:08 +0000 (17:22 +0100)]
commands: Deprecate CLI flags canonifyURLs, pluralizeListTitles, preserveTaxonomyNames, uglyURLs

You can of course still set them in site config.

Fixes #4347

7 years agohugolib: Fix --uglyURLs from comand line regression
Bjørn Erik Pedersen [Sun, 28 Jan 2018 16:03:10 +0000 (17:03 +0100)]
hugolib: Fix --uglyURLs from comand line regression

This bug was introduced in Hugo 0.33.

Fixes #4343

7 years agoOnly set 'url' if permalink in metadata and remove duplicate confirm msg
Colin Seymour [Thu, 11 Jan 2018 16:42:49 +0000 (16:42 +0000)]
Only set 'url' if permalink in metadata and remove duplicate confirm msg

The current behaviour addes a `url` attribute to the frontmatter of all posts imported from Jeklly and assumes the desired permalink structure is /:year/:month/:day/:title/. This may be the case for most peeps, but poses a problem for those that don't use this permalink structure as the `url` attribute takes precedence over the `permalink` attribute in the site-wide configuration meaning it can't be overruled.

This changes the behaviour to only set the `url` attribute if the `permalink` attribute is set in the Jekyll frontmatter.

The duplication of the confirmation message is also removed.

Tests have been updated to reflect this change in behaviour.

Fixes #1887

7 years agoFix handling of top-level page bundles
Bjørn Erik Pedersen [Sat, 27 Jan 2018 17:03:06 +0000 (18:03 +0100)]
Fix handling of top-level page bundles

Fixes #4332

7 years agotpl/collections: Seed random on init only
liguoqinjim [Sat, 27 Jan 2018 17:51:12 +0000 (01:51 +0800)]
tpl/collections: Seed random on init only

7 years agocommands: Fix baseURL server regression for multilingual sites
Bjørn Erik Pedersen [Sat, 27 Jan 2018 09:58:30 +0000 (10:58 +0100)]
commands: Fix baseURL server regression for multilingual sites

This was introduced in 6413559f7575e2653d76227a8037a7edbaae82aa a couple of days ago, and demonstrates that we really need better tests for the server/commands package.

Fixes #4333

7 years agoresource: Start Resources :counter first time they're used
Bjørn Erik Pedersen [Sat, 27 Jan 2018 09:22:42 +0000 (10:22 +0100)]
resource: Start Resources :counter first time they're used

This is less surprising and more flexible than the original implementation.

Given:

```toml
[[resources]]
  src = "documents/photo_specs.pdf"
  title = "Photo Specifications"
[[resources]]
  src = "**.pdf"
  name = "pdf-file-:counter"
```

Every `pdf` in the bundle will have an unique counter, but the `photo_specs.pdf` is still allowed to have its specific `title`.

If you change the above example to:

```toml
[[resources]]
  src = "documents/*specs.pdf"
  title = "Photo Specifications #:conter"
[[resources]]
  src = "**.pdf"
  name = "pdf-file-:counter"
```

We are talking about two different groups of documents, each with its own counters starting at 1.

Fixes #4335

7 years agotravis: Re-enable macOS builds
Bjørn Erik Pedersen [Fri, 26 Jan 2018 16:08:32 +0000 (17:08 +0100)]
travis: Re-enable macOS builds

7 years agoUpdate to Go 1.9.3
Bjørn Erik Pedersen [Fri, 26 Jan 2018 16:06:05 +0000 (17:06 +0100)]
Update to Go 1.9.3

Fixes #4328

7 years agoAdd a way to disable one or more languages
Bjørn Erik Pedersen [Thu, 25 Jan 2018 16:03:29 +0000 (17:03 +0100)]
Add a way to disable one or more languages

This commit adds a new config setting:

```toml
disableLanguages = ["fr"]
```

If this is a multilingual site:

* No site for the French language will be created
* French content pages will be ignored/not read
* The French language configuration (menus etc.) will also be ignored

This makes it possible to start translating new languages and turn it on when you're happy etc.

Fixes #4297
Fixed #4329

7 years agoFix "date" page param
Vas Sudanagunta [Fri, 26 Jan 2018 04:03:55 +0000 (23:03 -0500)]
Fix "date" page param

Add test coverage for all date type page params that shadow date type page variables.

Fixes #4323

7 years agoSupport pages without front matter
Vas Sudanagunta [Fri, 26 Jan 2018 03:54:15 +0000 (22:54 -0500)]
Support pages without front matter

* Page without front matter now treated same as a page with empty front matter.
* Test cases added to cover this and repro issue #4320.
* Type safety of front matter code improved.

Fixes #4320

7 years agoAdd page metadata dates tests
Vas Sudanagunta [Wed, 24 Jan 2018 14:21:55 +0000 (09:21 -0500)]
Add page metadata dates tests

7 years agohugolib: Remove unused code
Bjørn Erik Pedersen [Thu, 25 Jan 2018 16:08:18 +0000 (17:08 +0100)]
hugolib: Remove unused code

7 years agohugolib, output: Fix robots.txt in multihost mode
Bjørn Erik Pedersen [Thu, 25 Jan 2018 09:36:53 +0000 (10:36 +0100)]
hugolib, output: Fix robots.txt in multihost mode

Fixes #4193

7 years agodocs: Re-generate CLI docs
Bjørn Erik Pedersen [Thu, 25 Jan 2018 09:24:59 +0000 (10:24 +0100)]
docs: Re-generate CLI docs

7 years agoRemove and update deprecation status
Bjørn Erik Pedersen [Thu, 25 Jan 2018 08:58:55 +0000 (09:58 +0100)]
Remove and update deprecation status

7 years agooutput: Remove duplicate layout lookup layouts
Bjørn Erik Pedersen [Thu, 25 Jan 2018 08:37:05 +0000 (09:37 +0100)]
output: Remove duplicate layout lookup layouts

This can happen for sections if Type and Section are equal.

Of no real practical difference, but it makes the docs less confusing.

Fixes #4319

7 years agohugolib: Add the last lookup variant for the GetPage index
Bjørn Erik Pedersen [Wed, 24 Jan 2018 12:36:06 +0000 (13:36 +0100)]
hugolib: Add the last lookup variant for the GetPage index

Now, even for nun-bundles it is possible to do lookup without path or extension.

So, given `blog/my-blog-post.en.md` these lookups will succeed:

* `blog/my-blog-post.en.md`
* `blog/my-blog-post`
* `my-blog-post.en.md`
* `my-blog-post`

See #4312
See https://github.com/gohugoio/hugoDocs/issues/307

7 years agogithub: Shorten the stale setup
Bjørn Erik Pedersen [Wed, 24 Jan 2018 09:41:37 +0000 (10:41 +0100)]
github: Shorten the stale setup

7 years agoresource: Fix typo in comment
Alexey Grachov [Wed, 24 Jan 2018 09:24:21 +0000 (11:24 +0200)]
resource: Fix typo in comment

7 years agohugolib: Simplify bundle lookup via .Site.GetPage, ref, relref
Bjørn Erik Pedersen [Wed, 24 Jan 2018 08:47:30 +0000 (09:47 +0100)]
hugolib: Simplify bundle lookup via .Site.GetPage, ref, relref

Given a bundle in `blog/my-bundle/index.en.md` all of these will now worK:

* `blog/my-bundle/index.en.md`
* `blog/my-bundle/index`
* `blog/my-bundle`
* `my-bundle`

The last one is potentially ambigous.

Fixes #4312

7 years agoAdd a GetPage to the site benchmarks
Bjørn Erik Pedersen [Wed, 24 Jan 2018 08:08:26 +0000 (09:08 +0100)]
Add a GetPage to the site benchmarks

7 years agoAdd headless bundle support
Bjørn Erik Pedersen [Tue, 23 Jan 2018 13:02:54 +0000 (14:02 +0100)]
Add headless bundle support

This commit adds  support for `headless bundles` for the `index` bundle type.

So:

```toml
headless = true
```

In front matter means that

* It will have no `Permalink` and no rendered HTML in /public
* It will not be part of `.Site.RegularPages` etc.

But you can get it by:

* `.Site.GetPage ...`

The use cases are many:

* Shared media galleries
* Reusable page content "snippets"
* ...

Fixes #4311

7 years agoMerge matching resources params maps
Bjørn Erik Pedersen [Tue, 23 Jan 2018 09:02:44 +0000 (10:02 +0100)]
Merge matching resources params maps

This allows setting default params values in the more general resource matchers. I also allows override with more specific values if needed.

```toml
[[resources]]
src = "documents/photo_specs.pdf"
title = "Photo Specifications"
[resources.params]
ref = 90564687
icon = "photo"
[[resources]]
src = "documents/guide.pdf"
title = "Instruction Guide"
[resources.params]
ref = 90564568
[[resources]]
src = "documents/checklist.pdf"
title = "Document Checklist"
[resources.params]
ref = 90564572
[[resources]]
src = "documents/payment.docx"
title = "Proof of Payment"
[[resources]]
src = "documents/*.pdf"
title = "PDF file"
[resources.params]
icon = "pdf"
[[resources]]
src = "documents/*.docx"
title = "Word document"
[resources.params]
icon = "word"

```

In the above `TOML` example, `photo_specs.pdf` will get the `photo` icon, the other pdf files will get the default `pdf` icon.

Note that in the example above, the order matters: It will take the first value for a given params key, title or name that it finds.

Fixes #4315

7 years agoAdd some general code contribution criterias
Bjørn Erik Pedersen [Tue, 23 Jan 2018 12:33:51 +0000 (13:33 +0100)]
Add some general code contribution criterias

7 years agotravis: Disable macOS builds for now
Bjørn Erik Pedersen [Tue, 23 Jan 2018 11:59:40 +0000 (12:59 +0100)]
travis: Disable macOS builds for now

Travis have not been able to build those the last week or so.

7 years agohelpers: Avoid unescape in highlight
Bjørn Erik Pedersen [Tue, 23 Jan 2018 08:48:04 +0000 (09:48 +0100)]
helpers: Avoid unescape in highlight

Fixes #4219

7 years agoTighten page kind logic, introduce tests
Vas Sudanagunta [Sun, 21 Jan 2018 19:40:58 +0000 (14:40 -0500)]
Tighten page kind logic, introduce tests

7 years agoreleaser: Prepare repository for 0.35-DEV
hugoreleaser [Mon, 22 Jan 2018 12:08:54 +0000 (12:08 +0000)]
releaser: Prepare repository for 0.35-DEV

[ci skip]

7 years agoreleaser: Add release notes to /docs for release of 0.34 v0.34
hugoreleaser [Mon, 22 Jan 2018 12:06:38 +0000 (12:06 +0000)]
releaser: Add release notes to /docs for release of 0.34

[ci skip]

7 years agoreleaser: Bump versions for release of 0.34
hugoreleaser [Mon, 22 Jan 2018 12:06:38 +0000 (12:06 +0000)]
releaser: Bump versions for release of 0.34

[ci skip]

7 years agoRelease 0.34
Bjørn Erik Pedersen [Mon, 22 Jan 2018 11:58:55 +0000 (12:58 +0100)]
Release 0.34

7 years agoreleaser: Add release notes draft for 0.34
hugoreleaser [Mon, 22 Jan 2018 10:40:52 +0000 (10:40 +0000)]
releaser: Add release notes draft for 0.34

Rename to *-ready.md to continue. [ci skip]

7 years agoresource: Avoid some strings.ToLower in globbing
Bjørn Erik Pedersen [Mon, 22 Jan 2018 10:29:02 +0000 (11:29 +0100)]
resource: Avoid some strings.ToLower in globbing

See #4301

7 years agoreleaser: Fix BuildDate in release binaries
Bjørn Erik Pedersen [Mon, 22 Jan 2018 10:21:58 +0000 (11:21 +0100)]
releaser: Fix BuildDate in release binaries

Fixes #4299

7 years agoresource: Add Match and GetMatch
Bjørn Erik Pedersen [Sat, 20 Jan 2018 17:07:41 +0000 (18:07 +0100)]
resource: Add Match and GetMatch

These methods takes a glob pattern as argument:

* by default matching from the bundle root
* matching is case insensitive and the separator is Unix style slashes: "/"
* the bundle root does (by default) not start with a leading slash
* if you renames the `Name` for the rsource in front matter (`src=...`), then that is the value used in `Match`.
* double asterisk matches beyond directory borders, so "**.jpg" will match any JPEG image in the bundle

See https://github.com/gobwas/glob

This commit also deprecates `ByPrefix` and `GetByPrefix`.

This should also be more effective, given a fair amount of reuse of the glob patterns:

```bash
BenchmarkResourcesByPrefix-4         300000          4284 ns/op        1130 B/op           7 allocs/op
BenchmarkResourcesMatch-4            300000          5220 ns/op         505 B/op           3 allocs/op
```

Fixes #4301

7 years agohugolib: Fix handling of pages bundled in sub-folders in ByPrefix etc.
Bjørn Erik Pedersen [Sat, 20 Jan 2018 16:11:03 +0000 (17:11 +0100)]
hugolib: Fix handling of pages bundled in sub-folders in ByPrefix etc.

Fixes #4295

7 years agooutput: Add some more layout docshelper variants
Bjørn Erik Pedersen [Fri, 19 Jan 2018 10:39:34 +0000 (11:39 +0100)]
output: Add some more layout docshelper variants

7 years agohugolib: Add validation for defaultContentLanguage
Bjørn Erik Pedersen [Fri, 19 Jan 2018 07:24:10 +0000 (08:24 +0100)]
hugolib: Add validation for defaultContentLanguage

When `languages` are defined, then `defaultContentLanguage` must match one of those.

Fixes #4298

7 years agoreleaser: Prepare repository for 0.34-DEV
hugoreleaser [Thu, 18 Jan 2018 10:16:12 +0000 (10:16 +0000)]
releaser: Prepare repository for 0.34-DEV

[ci skip]

7 years agoreleaser: Add release notes to /docs for release of 0.33 v0.33
hugoreleaser [Thu, 18 Jan 2018 10:13:30 +0000 (10:13 +0000)]
releaser: Add release notes to /docs for release of 0.33

[ci skip]

7 years agoreleaser: Bump versions for release of 0.33
hugoreleaser [Thu, 18 Jan 2018 10:13:30 +0000 (10:13 +0000)]
releaser: Bump versions for release of 0.33

[ci skip]

7 years agoRelease 0.33
Bjørn Erik Pedersen [Thu, 18 Jan 2018 09:56:35 +0000 (10:56 +0100)]
Release 0.33

7 years agoreleaser: Add release notes draft for 0.33
hugoreleaser [Thu, 18 Jan 2018 09:24:11 +0000 (09:24 +0000)]
releaser: Add release notes draft for 0.33

Rename to *-ready.md to continue. [ci skip]

7 years agooutput: Redo the docshelper layouts examples
Bjørn Erik Pedersen [Thu, 18 Jan 2018 09:16:21 +0000 (10:16 +0100)]
output: Redo the docshelper layouts examples

7 years agoMerge commit '3cf4300097610bb8b5bd0686d96d1df5db641895'
Bjørn Erik Pedersen [Wed, 17 Jan 2018 21:33:07 +0000 (22:33 +0100)]
Merge commit '3cf4300097610bb8b5bd0686d96d1df5db641895'

7 years agoSquashed 'docs/' changes from ddb7d8fae..56c34962c
Bjørn Erik Pedersen [Wed, 17 Jan 2018 21:31:25 +0000 (22:31 +0100)]
Squashed 'docs/' changes from ddb7d8fae..56c34962c

56c34962c Fix multilingual config examples
14fa0b4ed Release 0.32.4
18779d54a releaser: Add release notes to /docs for release of 0.32.4
0d47d0673 releaser: Bump versions for release of 0.32.4
424acf02e Release 0.32.3
f6f04e084 releaser: Prepare repository for 0.33-DEV
1a9b36286 releaser: Add release notes to /docs for release of 0.32.3
9284c3284 releaser: Bump versions for release of 0.32.3
796082289 Fix min Go version in installing
74625a654 Add alias to multilingual.md
bf65732b4 Add some new tweets to the front page
7f263353e Bump Netlify to 0.32.2
cbb3a4f1c Update 0.32.2 release notes
e90ae4b4e releaser: Prepare repository for 0.33-DEV
ee74a8f4f releaser: Add release notes to /docs for release of 0.32.2
d889c4fa4 releaser: Bump versions for release of 0.32.2
4a46d3aca Merge commit 'eb738cd35cca1ffc68c5ed688dbe2a19108e8761'
b98d95ff2 releaser: Prepare repository for 0.33-DEV

git-subtree-dir: docs
git-subtree-split: 56c34962c92706792231fd5056d33186b11c4e33

7 years agoImprove .Site.GetPage for regular translated pages
Bjørn Erik Pedersen [Wed, 17 Jan 2018 18:26:34 +0000 (19:26 +0100)]
Improve .Site.GetPage for regular translated pages

You can still use the full path with extensions, but to get the current language version:

* If the content file lives in `/content/blog/mypost.en.md`
* Use `.Site.GetPage "page" "blog/mypost"`

Fixes #4285

7 years agoresource: Use path.Match instead of filepath.Match
Bjørn Erik Pedersen [Wed, 17 Jan 2018 19:47:35 +0000 (20:47 +0100)]
resource: Use path.Match instead of filepath.Match

They behave similar, but it is a path we're matching.

See #4244

7 years agoresource: Add front matter metadata to Resource
Bjørn Erik Pedersen [Mon, 15 Jan 2018 19:40:39 +0000 (20:40 +0100)]
resource: Add front matter metadata to Resource

This commit expands the Resource interface with 3 new methods:

* Name
* Title
* Params

All of these can be set in the Page front matter. `Name` will get its default value from the base filename, and is the value used in the ByPrefix and GetByPrefix lookup methods.

Fixes #4244

7 years agoUpdate Afero to avoid panic on "file name is too long"
Bjørn Erik Pedersen [Mon, 15 Jan 2018 19:33:03 +0000 (20:33 +0100)]
Update Afero to avoid panic on "file name is too long"

Fixes #4240

7 years agoresource: Fix handling of very long image file names
Bjørn Erik Pedersen [Mon, 15 Jan 2018 19:22:14 +0000 (20:22 +0100)]
resource: Fix handling of very long image file names

Fixes #4261

7 years agocommands: And now really fix the server watch logic
Bjørn Erik Pedersen [Mon, 15 Jan 2018 09:02:17 +0000 (10:02 +0100)]
commands: And now really fix the server watch logic

See #4275

7 years agocommands: Fix server without watch
Bjørn Erik Pedersen [Sun, 14 Jan 2018 19:58:52 +0000 (20:58 +0100)]
commands: Fix server without watch

This was broken in Hugo 0.30.

Fixes #4275

7 years agoUpdate Chroma and other third-party deps
Bjørn Erik Pedersen [Sun, 14 Jan 2018 19:32:42 +0000 (20:32 +0100)]
Update Chroma and other third-party deps

Fixes #4267

7 years agocommands: Remove superflous BuildDate logic
Bjørn Erik Pedersen [Sun, 14 Jan 2018 19:08:28 +0000 (20:08 +0100)]
commands: Remove superflous BuildDate logic

Fixes #4272

7 years agolayout: Respect Type and Layout for list template selection
Bjørn Erik Pedersen [Sat, 13 Jan 2018 16:21:42 +0000 (17:21 +0100)]
layout: Respect Type and Layout for list template selection

This commit also has some other nice side-effects:

* The layout logic is unified for all page types, which should make it less surprising
* Page.Render now supports all types
* The legacy "indexes" type is removed from the template lookup order. This is an undocumented type from early Hugo days. This means that having a template in, say, `/layouts/indexes/list.html` will no longer work.
* The theme override logic is improved. As an example, an `index.html` in theme will now wn over a `_default/list.html` in the project, which most will expect.

Fixes #3005
Fixes #3245

7 years agoRun benchmarks 3 times
Bjørn Erik Pedersen [Sat, 13 Jan 2018 23:49:01 +0000 (00:49 +0100)]
Run benchmarks 3 times

7 years agoresource: Add some GoDoc
Bjørn Erik Pedersen [Fri, 12 Jan 2018 23:08:21 +0000 (00:08 +0100)]
resource: Add some GoDoc

7 years agohugolib: Allow url in front matter for list type pages
Bjørn Erik Pedersen [Fri, 12 Jan 2018 16:17:10 +0000 (17:17 +0100)]
hugolib: Allow url in front matter for list type pages

This enables some potential foot-shooting, but is needed for some special URL requirements.

Fixes #4263

7 years agoresource: Implement Resources.ByPrefix
Bjørn Erik Pedersen [Fri, 12 Jan 2018 17:06:35 +0000 (18:06 +0100)]
resource: Implement Resources.ByPrefix

Fixes #4266

7 years agoresource: Make GetByPrefix work for Page resources
Bjørn Erik Pedersen [Fri, 12 Jan 2018 16:46:50 +0000 (17:46 +0100)]
resource: Make GetByPrefix work for Page resources

Fixes #4264

7 years agoSupport uglyURLs per section
Bjørn Erik Pedersen [Thu, 11 Jan 2018 16:46:43 +0000 (17:46 +0100)]
Support uglyURLs per section

Fixes #4256

7 years agoresource: Make .Resources.GetByPrefix case insensitive
Bjørn Erik Pedersen [Thu, 11 Jan 2018 17:58:53 +0000 (18:58 +0100)]
resource: Make .Resources.GetByPrefix case insensitive

Fixes #4258

7 years agoUpdate CONTRIBUTING.md
Vas Sudanagunta [Wed, 3 Jan 2018 01:22:37 +0000 (20:22 -0500)]
Update CONTRIBUTING.md