Commit graph

7471 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
5cb4e46cfa Squashed 'docs/' changes from 540aeddc7..41aae7abb
41aae7abb Better deploy script example

git-subtree-dir: docs
git-subtree-split: 41aae7abb37d43db3a38e09f2ef674cce2c98ce9
2019-07-24 09:36:50 +02:00
Bjørn Erik Pedersen
9f5a92078a
Add Hugo Modules
This commit implements Hugo Modules.

This is a broad subject, but some keywords include:

* A new `module` configuration section where you can import almost anything. You can configure both your own file mounts nd the file mounts of the modules you import. This is the new recommended way of configuring what you earlier put in `configDir`, `staticDir` etc. And it also allows you to mount folders in non-Hugo-projects, e.g. the `SCSS` folder in the Bootstrap GitHub project.
* A module consists of a set of mounts to the standard 7 component types in Hugo: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, and `archetypes`. Yes, Theme Components can now include content, which should be very useful, especially in bigger multilingual projects.
* Modules not in your local file cache will be downloaded automatically and even "hot replaced" while the server is running.
* Hugo Modules supports and encourages semver versioned modules, and uses the minimal version selection algorithm to resolve versions.
* A new set of CLI commands are provided to manage all of this: `hugo mod init`,  `hugo mod get`,  `hugo mod graph`,  `hugo mod tidy`, and  `hugo mod vendor`.

All of the above is backed by Go Modules.

Fixes #5973
Fixes #5996
Fixes #6010
Fixes #5911
Fixes #5940
Fixes #6074
Fixes #6082
Fixes #6092
2019-07-24 09:35:53 +02:00
Bjørn Erik Pedersen
47953148b6
deps: Tidy 2019-07-23 00:13:46 +02:00
Bjørn Erik Pedersen
2fc0abd22a
Fix livereload for @import case
Fixes #6106
2019-07-22 13:54:24 +02:00
peaceiris
53da3881de releaser: Remove unused function
gitLog function is not used
2019-07-20 12:33:30 +02:00
Bjørn Erik Pedersen
ac101aba4f
deps: Update xerrors
To get it to build on Go 1.13.
2019-07-19 09:09:04 +02:00
Bjørn Erik Pedersen
58a47ccde0
travis: Ignore errors in go mod download
It sometimes fails with 502 errors, but the dependency download later when tests are run.
2019-07-17 15:35:31 +02:00
Bjørn Erik Pedersen
95b1d3013b
deps: Update Chroma
Fixes #6088
2019-07-16 21:08:18 +02:00
Eric Selin
a5604e18b0
resource/postcss: Change postcss to check for local installation under node_modules/.bin
Fixes #5091
2019-07-16 10:02:20 +02:00
Bjørn Erik Pedersen
05d0eddd2b
Merge commit '35febb2e2a3780c3338a2665fddea7dda28a17f4' 2019-07-15 23:50:56 +02:00
Bjørn Erik Pedersen
35febb2e2a Squashed 'docs/' changes from 0c3c04fd6..540aeddc7
540aeddc7 Small fixes for Open Graph internal template
47bbb3fd7 Bump lodash.template from 4.4.0 to 4.5.0 in /themes/gohugoioTheme
64c1cc3db Update title.md
36c27be37 Update configuration.md
4627cfe9a added commento.io to the list
341d9d945 Fix link to font assets
4a6876dec Small typo fix in configuration.md
736d6ddd7 Add bypasscensorship.org showcase.
de7ab636b Use actual width in image processing examples
6c88ab2da Update directory-structure.md
88f559e81 Fix spelling mistakes
7bd427141 Rephrase four points from Hosting on Github docs
bce1b1832 Fix typos for absLangURL and relLangURL functions
abab57335 Update directory-structure.md
a6716f2ed Fix metadata list
5ef61d912 Fix typo
d9e467b8b Actuall show how to generate pages in quickstart
0aadc92e7 Update link to issue theme submission
b1902faaa Remove incorrect note about Hugo snap --classic use.
d451e7362 Update documentation on page variables
ab2233c39 Update publish_to_ghpages.sh
7c120346b Fix typo in syntax highlighting page.
f01dc555d Correct some typos
be825ade9 Videos plural produces og:video
bc962fbdf Updated installing.md file to include linuxbrew installation
08c9f8fc8 Mention 1 MB file size limit in readFile doc
7145e29e2 Fixes bad URL in menus.md for .hasChildren * part of issue #814
0edbd59c4 add warning about .Hugo variable being deprecated
77f74ced5 fix: typo in output-formats.md
f71b67f34 Correct typo "RFC339" to "RFC1123Z" (#837)
424c0207a baseurl -> baseURL
f4e24a03e Render launched; no invite code needed
37e1101d3 Add Render hosting guide
01d0a6481 Bump js-yaml from 3.12.0 to 3.13.1 in /themes/gohugoioTheme
edb7b36b0 Link site hierarchy schema to larger version
af72acda0 Fixes typo in fingerprint.md
0a738467b Adding required XML tag to sample templates
52211f656 Remove note that XML declaration is not needed
a39b9ac87 Adding required XML tag to sample templates
1a44d8a50 Add configuration information for Azure
5b7c6b5a1 remove google plus
5a64301ba HTTPS link to yaml.org/spec/

git-subtree-dir: docs
git-subtree-split: 540aeddc797658a2c3d0e49e944592d2b23b3bb8
2019-07-15 23:49:41 +02:00
Bjørn Erik Pedersen
c624a77992 tpl/collections: Add Merge function
Merges two maps recursively and returns a new one. Merge is case-insensitive.

Fixes #5992
2019-07-15 20:47:35 +02:00
Niklas Fasching
020086cb2b Add org to front matter formats
actually it's 5, there's also csv. Afaict it's not meant to be used in that way
though so let's just add org.
2019-07-10 11:14:37 +02:00
Niklas Fasching
8524baee16 deps: Update go-org
- added support for anonymous footnotes
- changed source block html output to more closely resemble emacs org-export
  output
2019-07-10 11:14:37 +02:00
Kaushal Modi
90b0127f63 Fix typo s/Meny/Menu/ 2019-07-09 17:28:53 +02:00
Bjørn Erik Pedersen
7611078dae
hugolib: Add testfile to .gitignore 2019-07-07 13:01:30 +02:00
Bjørn Erik Pedersen
b2a3d4644b
tpl/tplimpl: Regenerate templates 2019-06-26 22:39:32 +02:00
Mark Mandel
88c8a15be1 Pagination - do not render href if no next item
When using a html link checker with Hugo, this template consistently causes errors, as it renders `href=""` attributes when next/previous is disabled.

This change makes it so that the `href` attribute is not rendered at all if `HasNext` is false - which is better semantically, and makes link checking far easier.
2019-06-26 22:38:30 +02:00
Justin Van Patten
59c4bc52ed Include path to source page in non-relative ref/relref warning
We occasionally see warnings when building our site:

```
WARN 2019/06/25 23:07:08 make non-relative ref/relref page reference(s) in page %q absolute, e.g. {{< ref "/blog/my-post.md" >}}
```

But the `%q` value is missing, making it difficult to track down the source of the warning.

This change addresses that, by including the source path in the warning:

```
WARN 2019/06/25 23:07:31 make non-relative ref/relref page reference(s) in page "blog/my-post/index.md" absolute, e.g. {{< ref "/blog/my-post.md" >}}
```
2019-06-26 09:25:12 +02:00
Bjørn Erik Pedersen
dc1d4a9200
hugolib: Add another site benchmark
Also rework test test setup so the benchmarks can also be run as tests, which
is useful when creating new benchmarks an make sure they ... work.
2019-06-26 09:09:40 +02:00
Joshua Arnott
de7b9475c0 commands: Remove comma after URL in new site output
Some terminals include the comma in the URL when hyperlinking, resulting in a 404
2019-06-19 23:03:30 +02:00
Bjørn Erik Pedersen
d6ca728ff3
deps: Revert to an older version of Blackfriday
See #6040
2019-06-16 22:13:23 +02:00
Christian Oliff
ff10aa522d examples: Update link to prevent redirect 2019-06-12 13:56:05 +02:00
Christian Oliff
9f258d2b8f examples: Update URLs 2019-06-12 12:29:19 +02:00
Bjørn Erik Pedersen
31c9c690fd releaser: Update Go Releaser and consolidate the 2 configs
Fixes #5949
2019-06-11 00:02:06 +02:00
Bjørn Erik Pedersen
e8a716b23a tpl/collections: Fix slice type handling in sort
The `sort` template func was producing a `[]page.Page` which did not work in `.Paginate`.

Fixes #6023
2019-06-10 08:32:44 +02:00
Bjørn Erik Pedersen
3e6cb2cb77 hugolib: Fix bundle path when slug is set
Fixes #4870
2019-06-09 16:55:08 +02:00
Bjørn Erik Pedersen
8d898ad667 tpl/collections: Unwrap any interface value in sort and where
Hugo `0.55.0` introduced some new interface types for `Page` etc.

This worked great in general, but there were cases where this would fail in `where` and `sort`.

One such example would be sorting by `MenuItem.Page.Date` where `Page` on `MenuItem` was a small subset of the bigger `page.Page` interface.

This commit fixes that by unwrapping such interface values.

Fixes #5989
2019-06-09 16:54:36 +02:00
Niklas Fasching
fad183c4ae Refactor Org mode front matter: Introduce '#+KEY[]:' array notation
Hugo requires some front matter values to be arrays (e.g. for taxonomies).
Org mode front matter syntax (`#+KEY: VALUE`) does however not support anything
but string values normally - which is why goorgeous hardcoded the values for
the keys tags, categories & aliases to be parsed as string arrays. This causes
problems with custom taxonomies.

A simple thing we can do instead is make keywords ending in '[]' be parsed as
string arrays.
2019-06-08 10:13:00 +02:00
Niklas Fasching
b6867bf806 Improve Org mode support: Replace goorgeous with go-org
Sadly, goorgeous has not been updated in over a year and still has a lot of
open issues (e.g. no support for nested lists).

go-org fixes most of those issues and supports a larger subset of Org mode
syntax.
2019-06-08 10:13:00 +02:00
Robert van Gent
9df57154ee deploy: Default --target to the first deployment target 2019-06-08 00:41:59 +02:00
Vincent Fiduccia
35abce27ca Add safety barrier between concatenated javascript resources 2019-06-02 10:23:48 +02:00
Robert van Gent
8914fe7ed7 Update CLI doc for "long" form 2019-05-31 22:08:12 +02:00
Robert van Gent
b0f536fb27 Drop dashes in http header matcher attributes; other changes from code review 2019-05-31 22:08:12 +02:00
Robert van Gent
1384d77a04 docs: Add documentation for "hugo deploy" 2019-05-31 22:08:12 +02:00
Robert van Gent
5e83f42562 deploy: remove TODO comment about subfolders; handled by GoCDK blob URLs 2019-05-30 22:42:44 +02:00
Robert van Gent
b376b2685a deps: Update gocloud.dev to v0.15.0. 2019-05-30 22:07:04 +02:00
Anton Harniakou
fb007e9ae5 tpl/collections: Convert numeric values to float64 and compare them
Fixes #5685
2019-05-30 11:32:58 +02:00
Bjørn Erik Pedersen
4c560020bc
resources: Return nil when not found in resources.Get
Fixes #5999
2019-05-29 22:33:03 +02:00
Bjørn Erik Pedersen
d44d3ea898
deps: Update Viper
This will hopefully improve the dependency/install problems we have seen lately.

See #5954
2019-05-28 16:11:09 +02:00
Bruno Amaral
d1cf53f5f4 Remove references to Google+
According to google, this is no longer supported and structured data should be used instead: https://support.google.com/webmasters/answer/6083347?hl=en
2019-05-26 19:24:45 +02:00
Bjørn Erik Pedersen
811ee996a6
Update gitmap to get CommitDate field 2019-05-25 10:43:09 +02:00
Bjørn Erik Pedersen
4f61a926f6
Merge commit 'be04ece8590f775a52ea167fbe4555753e8c5211' 2019-05-25 10:41:51 +02:00
Bjørn Erik Pedersen
be04ece859 Squashed 'docs/' changes from 50c02516c..0c3c04fd6
0c3c04fd6 Merge pull request #827 from BCNelson/range-patch
b14dd3505 Updated link to Go Docs to more helpful page
c3d83149a Boolean Values in the Where Function
56d4cea3c hugo-extended no longer the default
e9b15c698 Update index.md
11de98e0d Release 0.55.6
d2def17f4 Merge branch 'release-0.55.6'
115457b70 releaser: Add release notes to /docs for release of 0.55.6
25855690d Fix misspelling
fc5e43db2 Update 404.md with Netlify Instructions
9f684318f Removed mentioning of removed --stepAnalysis command line option
86ba9071c Related md5 and aliases for sha1/sha256
15f48966a Added related sha function into the See Also
5e08b6930 Fix date description
908e87ab2 Revert docs/config.toml changes
c925646cf Add a "deploy" command
e765084dd Update sectionvars.md
e08be4d81 Update sectionvars.md
7c9653cbe Hugo 0.55.5
1035ff028 releaser: Add release notes to /docs for release of 0.55.5
cda21f9d4 docs: Regenerate docs helper

git-subtree-dir: docs
git-subtree-split: 0c3c04fd63a7f140bdca0d3ca9b1e9dc794ebd77
2019-05-25 10:41:23 +02:00
Ruslan Nasonov
5b4b8bb3c1 commands: Create new 'hugo list all' command
New:
- command `hugo list all`, return all posts meta in csv format

Refactoring:
- move common parts in commands/list.go to function `buildSites`
- change way to detect path to content

See #5904
2019-05-25 00:09:51 +02:00
Brice BERDAH
2278b0eb02 Medium -> Hugo exporting tool
Suggesting a simple yet powerful tool for people looking to export their Medium blog to Hugo
2019-05-24 15:35:41 +02:00
Brian 'Redbeard' Harrington
41974303f3 dockerfile: Switch base image for final build
Switching the base image for the final build to alpine as it still
provides a minimal interface, but has a mechanism for easily including
relevant CA certificates.  This is currently pinned to a tagged version,
though since none of the underlying mechanisms are used this should
balance both remaining stable, supported for a period of time, and
providing usable functionality.

Resolves #5970
Affects #5056
2019-05-23 12:49:13 -06:00
Bjørn Erik Pedersen
6b3f1a1002
Merge branch 'release-0.55.6' 2019-05-18 10:18:23 +02:00
hugoreleaser
fa8e334dae releaser: Prepare repository for 0.56.0-DEV
[ci skip]
2019-05-18 07:57:50 +00:00
hugoreleaser
a5d4c82d2f releaser: Add release notes to /docs for release of 0.55.6
[ci skip]
2019-05-18 07:55:28 +00:00