Commit Graph
9901 Commits
Author SHA1 Message Date
Bjørn Erik Pedersen b5f39d23b8 all: Apply staticcheck recommendations 2019-03-24 16:14:51 +01:00
Bjørn Erik Pedersen 3011f36c27 hugolib: Remove unused slice 2019-03-24 16:14:51 +01:00
Bjørn Erik Pedersen d30e845485 Run gofmt -s 2019-03-23 20:15:06 +01:00
Alexandros 4d0f6ba47e Theme Components Support on the Hugo Themes Site (#769)
Since https://github.com/gohugoio/hugoThemes/pull/614 the Theme Site supports Hugo themes inheritance.
2019-03-23 20:09:07 +01:00
Bjørn Erik Pedersen 5bc64bf440 Make Page an interface
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  #5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

See #5074
Fixes #5763
Fixes #5758
Fixes #5090
Fixes #5204
Fixes #4695
Fixes #5607
Fixes #5707
Fixes #5719
Fixes #3113
Fixes #5706
Fixes #5767
Fixes #5723
Fixes #5769
Fixes #5770
Fixes #5771
Fixes #5759
Fixes #5776
Fixes #5777
Fixes #5778
2019-03-23 18:51:22 +01:00
Bjørn Erik Pedersen 597e418cb0 Make Page an interface
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  #5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

See #5074
Fixes #5763
Fixes #5758
Fixes #5090
Fixes #5204
Fixes #4695
Fixes #5607
Fixes #5707
Fixes #5719
Fixes #3113
Fixes #5706
Fixes #5767
Fixes #5723
Fixes #5769
Fixes #5770
Fixes #5771
Fixes #5759
Fixes #5776
Fixes #5777
Fixes #5778
2019-03-23 18:51:22 +01:00
Unknown f2ec3f2a6f Fix broken link 404
Link to front-matter was pointing to table-of-contents that gave a 404.
2019-03-21 12:46:48 +01:00
Bjørn Erik Pedersen af82c56c51 config: Remove superflous param 2019-03-21 09:13:16 +01:00
Ryan Watters 8dc14f5637 Update theme total on homepage (#765)
"300s of Themes" is not typical English usage and makes it sound like themes are packaged in groups of 300. I've changed this to "300+ Themes" to make more sense.
2019-03-19 18:22:29 +01:00
Daniel Compton 44f5c1c14c List future and expired dates in CSV format
It is useful to see the date that a post will be published, or the date
that it has expired, to build tooling around it. This commit writes
posts and their publish/expired date as CSV.

Fixes #5610
2019-03-19 00:33:02 +01:00
Christopher Geary 7838fd7e2d Update description of Atlas to reflect new changes 2019-03-17 21:19:38 +01:00
Bjørn Erik Pedersen 984a73af9e Update to Go 1.12.1 and Go 1.11.6
Fixes #5755
2019-03-17 08:37:42 +01:00
peaceiris 6abab23c69 update: total of hugo themes 2019-03-16 18:23:36 +01:00
Bjørn Erik Pedersen e54213f525 tpl/tplimpl: Fix mutex unlock 2019-03-16 09:40:27 +01:00
Bjørn Erik Pedersen 4a2a8afff2 commands: Fix doLiveReload logic
Fixes #5754
2019-03-14 21:39:00 +01:00
Bjørn Erik Pedersen 79d517d86c deps: Update Viper 2019-03-13 10:42:43 +01:00
Moritz »mo.« Sauer 1dba24fde6 Clarify: summaryLength uses words not characters 2019-03-13 10:16:14 +01:00
Rodolfo Carvalho 8c54f45d6e Add missing punctuation 2019-03-12 21:31:12 +01:00
hfte d170004817 Remove Hugo Frontend caddy-plugin
StaticGen will be removed in version 2.0 of the caddy filebrowser plugin.
https://github.com/filebrowser/filebrowser/pull/575
2019-03-12 15:55:29 -04:00
Bjørn Erik Pedersen 34c49d788c hugolib: Adjust site benchmark
Having all the pages with shortcodes isn't realistic.
2019-03-12 20:27:50 +01:00
Christian Oliff a7094ae620 remove unneeded meta tags
```
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
```
I realise that these meta tags aren't doing any harm - but they are not needed at all and take up a few bytes of the page loading.

- The `HandheldFriendly` meta tag was used for a very old version of BlackBerry.
REF: https://developer.blackberry.com/playbook/html5/documentation/handheldfriendly.html

- The `MobileOptimized` meta tag was used for a very old version of Windows Mobile 5 / 6 (before even Windows Phone 7, 8 and Windows Mobile 10!).
2019-03-11 10:45:18 -04:00
Devin Schulz f8b0f31c6d Fix typo in cross references
logg -> log
2019-03-11 15:33:03 +01:00
peaceiris 61781bab93 Fix: use gh shortcode correctly 2019-03-11 15:32:47 +01:00
Bjørn Erik Pedersen 357bfca431 Update files.md
Closes https://github.com/gohugoio/hugo/issues/5741
2019-03-07 22:28:17 +01:00
Gitiot d1d2406cc6 Updated Hugo convert to clarify for and not ..
.. for configuration files.
2019-03-07 07:51:54 -05:00
Rodolfo Carvalho 86850f3c33 Fix typos in multilingual.md 2019-03-07 12:59:44 +01:00
Bjørn Erik Pedersen b9e75afd6c Update to Go 1.12
Fixes #5716
2019-03-07 10:26:26 +01:00
Salim B b68d0d892f Fix typo 2019-03-07 08:45:15 +01:00
Bjørn Erik Pedersen dfc72d61a5 Remove Gitter dev chat link
Almost every question we get there belong on https://discourse.gohugo.io/
2019-03-07 00:37:50 +01:00
Bjørn Erik Pedersen 02eaddc2fb tpl/tplimpl: Fix template truth logic
Before this commit, due to a bug in Go's `text/template` package, this would print different output for typed nil interface values:

```
{{ if .AuthenticatedUser }}User is authenticated!{{ else }}{{ end }}
{{ if not .AuthenticatedUser }}{{ else }}}User is authenticated!{{ end }}
```

This commit works around this by wrapping every `if` and `with` with a custom `getif` template func with truth logic that matches `not`, `and` and `or`.

Those 3 template funcs from Go's stdlib are now pulled into Hugo's source tree and adjusted to support custom zero values, e.g. types that implement `IsZero`.

This means that you can now do:

```
{{ with .Date }}{{ . }}{{ end }}
```

And it would work as expected.

Fixes #5738
2019-03-06 22:52:38 +01:00
grahamjamesaddis bdf47e8da8 Update Travis config to work for forked builds 2019-03-05 14:26:49 +01:00
arrtchiu 371ff6c12b Add skipHTML option to blackfriday config 2019-03-04 11:27:18 +01:00
arrtchiu 75904332f3 Add skipHTML option to blackfriday config 2019-03-04 11:27:18 +01:00
Elliott Sales de Andrade 60c0eb4e89 Update stretchr/testify to 1.3.0. 2019-03-02 10:24:21 +01:00
Bjørn Erik Pedersen 8cba70e28c Document disableAliases
Closes https://github.com/gohugoio/hugo/issues/5722
2019-02-28 14:30:18 +01:00
Berin Larson c154c2f7b2 Rewrite relative action URLS
Fixes #5701
2019-02-26 11:31:34 +01:00
Anthony Metzidis 075b17ee1d Support Docker args TAGS, WORKDIR, CGO; speed up repetitive builds 2019-02-22 11:53:17 -08:00
Shohei Ueda 00e4402605 Remove extra whitespace 2019-02-20 15:07:08 +01:00
Bjørn Erik Pedersen b4148cd1d9 hugolib: Adjust test for Go 1.12 2019-02-19 21:47:38 +01:00
Alexandros 212d63e4cc Update with latest Theme Submission Guidelines (#744)
Closes #743 

- Added note that the content directory of an ExampleSite is now inherited from the HugoBasicExample for security reasons.
- Removed placeholder text for example README outline since there is no such outline.
- Instead I updated some of the points of what should be included in a README

cc: @digitalcraftsman
2019-02-17 11:01:16 +01:00
Juliano Appel Klein c24ea638ff Update frontends.md
Changing Hokus URL.
2019-02-15 20:19:09 +01:00
Bjørn Erik Pedersen 942bc19721 Add one more video 2019-02-13 13:14:11 +01:00
Bjørn Erik Pedersen 2e1e1091dd Update the rest of the videos
Closes #735
2019-02-13 12:45:23 +01:00
Bjørn Erik Pedersen a7dc70f2bd Add new installation video 2019-02-13 12:38:02 +01:00
Nikhil Swaminathan 1a78f84876 Hosting on AWS amplify 2019-02-07 19:00:56 +01:00
Anton Harniakou 908692fae5 Support nested keys/fields with missing values with the where function
Before this commit `where` would produce an error and bail building the
site. Now, `where` simply skips an element of a collection and does not
add it to the final result.

Closes #5637
Closes #5416
2019-02-06 19:53:34 +01:00
David Haberthür 112420c467 Fix typo
https://github.com/gohugoio/hugo/pull/5677, second try...
2019-02-04 22:19:19 +01:00
Bjørn Erik Pedersen 7e4b18c5ae commands: Update debouncer version 2019-02-02 14:05:28 +01:00
Jeff Delaney f723425e43 Add fireship.io bio to showcase 2019-02-02 10:10:00 +01:00
Iskander (Alex) Sharipov 483cf19d5d common/herrors: Fix args order in strings.TrimPrefix
Old code always returned "." or "" (if filepath.Ext(filename) returned ".").
Now it properly trims the prefix.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-02-02 09:55:31 +01:00