summaryrefslogtreecommitdiffstats
path: root/helpers
AgeCommit message (Collapse)Author
2017-06-21releaser: Prepare repository for 0.25-DEVBjørn Erik Pedersen
[ci skip]
2017-06-21releaser: Bump versions for release of 0.24Bjørn Erik Pedersen
[ci skip]
2017-06-20Support non-md files as archetype filesBjørn Erik Pedersen
It now properly uses the extension of the target file to determine archetype file. Fixes #3597 Fixes #3618
2017-06-19commands, create: Add .Site to the archetype templatesBjørn Erik Pedersen
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-16releaser: Prepare repository for 0.24-DEVBjørn Erik Pedersen
[ci skip]
2017-06-16releaser: Bump versions for release of 0.23Bjørn Erik Pedersen
[ci skip]
2017-06-13Run gofmt to get imports in line vs gohugoio/hugoBjørn Erik Pedersen
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-06-13Revert "releaser: Bump versions for release of 0.22.1"Bjørn Erik Pedersen
This reverts commit dce70fb7c5845ec5e410e4bf97c862d38cfec9a5.
2017-06-13releaser: Prepare repository for 0.23-DEVBjørn Erik Pedersen
2017-06-13releaser: Prepare repository for 0.22.1-DEVBjørn Erik Pedersen
[ci skip]
2017-06-13releaser: Bump versions for release of 0.22.1Bjørn Erik Pedersen
[ci skip]
2017-06-12releaser: Prepare repository for 0.23-DEVBjørn Erik Pedersen
[ci skip]
2017-06-12releaser: Bump versions for release of 0.22Bjørn Erik Pedersen
[ci skip]
2017-05-22releaser: Prepare repository for 0.22-DEVBjørn Erik Pedersen
[ci skip]
2017-05-22releaser: Bump versions for release of 0.21Bjørn Erik Pedersen
[ci skip]
2017-05-09helpers: Don't clean the path before JoinAlbert Nigmatzianov
Join will call Clean anyway.
2017-05-07helpers: Don't clean path twiceAlbert Nigmatzianov
Join calls Clean as it says in docs. Minor performance improvement: Before: Average time per operation: 432ms Average memory allocated per operation: 127322kB Average allocations per operation: 2138137 After: Average time per operation: 428ms Average memory allocated per operation: 127350kB Average allocations per operation: 2137892
2017-04-30tpl: Add template function namespacesCameron Moore
This commit moves almost all of the template functions into separate packages under tpl/ and adds a namespace framework. All changes should be backward compatible for end users, as all existing function names in the template funcMap are left intact. Seq and DoArithmatic have been moved out of the helpers package and into template namespaces. Most of the tests involved have been refactored, and many new tests have been written. There's still work to do, but this is a big improvement. I got a little overzealous and added some new functions along the way: - strings.Contains - strings.ContainsAny - strings.HasSuffix - strings.TrimPrefix - strings.TrimSuffix Documentation is forthcoming. Fixes #3042
2017-04-24Automate the Hugo release processBjørn Erik Pedersen
This commit adds a work flow aroung GoReleaser to get the Hugo release process automated and more uniform: * It can be run fully automated or in two steps to allow for manual edits of the relase notes. * It supports both patch and full releases. * It fetches author, issue, repo info. etc. for the release notes from GitHub. * The file names produced are mainly the same as before, but we no use tar.gz as archive for all Unix versions. * There isn't a fully automated CI setup in place yet, but the release tag is marked in the commit message with "[ci deploy]" Fixes #3358
2017-04-22helpers: Delete RenderingContext.getConfigAlbert Nigmatzianov
2017-04-13Get versions back to 0.20-DEVBjørn Erik Pedersen
This reverts commit 8ac1fcd0ceb5d2e55e16a9caa7f6f0d646a07668.
2017-04-13Prepare release 0.20.1v0.20.1Bjørn Erik Pedersen
2017-04-10all Bump to 0.21-DEVBjørn Erik Pedersen
2017-04-10all: Prepare Hugo 0.20 release versionv0.20Bjørn Erik Pedersen
2017-04-06helpers: Add new properties to ContentSpecAlbert Nigmatzianov
2017-04-04commands, helpers: Add correct verbose log level to the global loggersBjørn Erik Pedersen
We still use those in some cases.
2017-03-29hugolib, helpers: Reduce log level to WARN on .Render for non-regular pagesBjørn Erik Pedersen
We will eventually support all types in the Render method.
2017-03-28helpers, output: Fix spellingBjørn Erik Pedersen
2017-03-27output: Rename HTMLType etc. to HTMLFormatBjørn Erik Pedersen
2017-03-27hugolib: Revise paginator alias path handlingBjørn Erik Pedersen
2017-03-27Remove the now superflous defaultExtensionBjørn Erik Pedersen
And some other unsed fields and methods.
2017-03-27all: Propagate baseURL error to the callersBjørn Erik Pedersen
2017-03-27Add custom protocol support in PermalinkBjørn Erik Pedersen
2017-03-27output: Rework the base template logicBjørn Erik Pedersen
Extract the logic to a testable function and add support for custom output types. Fixes #2995
2017-03-27hugolib: Refactor/-work the permalink/target path logicBjørn Erik Pedersen
This is a pretty fundamental change in Hugo, but absolutely needed if we should have any hope of getting "multiple outputs" done. This commit's goal is to say: * Every file target path is created by `createTargetPath`, i.e. one function for all. * That function takes every page and site parameter into account, to avoid fragile string parsing to uglify etc. later on. * The path creation logic has full test coverage. * All permalinks, paginator URLs etc. are then built on top of that same logic. Fixes #1252 Fixes #2110 Closes #2374 Fixes #1885 Fixes #3102 Fixes #3179 Fixes #1641 Fixes #1989
2017-03-19Revert "helpers: Add a Debug method to DistinctLogger"Bjørn Erik Pedersen
Not needed. This reverts commit 4382a8a6a030520d9f094b3d7bb8f3ae3f08b187.
2017-03-18helpers: Add a Debug method to DistinctLoggerBjørn Erik Pedersen
2017-03-02helpers: Return partially cleaned URL in case of error in URLPrep anywayBjørn Erik Pedersen
Closes #2987
2017-03-01helpers: Remove unused argBjørn Erik Pedersen
2017-03-01Handle Hugo version strings with patch levelBjørn Erik Pedersen
Fixes #3025
2017-03-01helpers: Fix version string for Hugo 0.20 and similarBjørn Erik Pedersen
Fixes #3112
2017-02-27Bump version to 0.20-DEVBjørn Erik Pedersen
2017-02-27Update versions to 0.19 releaseBjørn Erik Pedersen
2017-02-21all: Add org-mode supportChase Adams
Fixes #1483 See #936
2017-02-17all: Refactor to nonglobal Viper, i18n etc.Bjørn Erik Pedersen
This is a final rewrite that removes all the global state in Hugo, which also enables the use if `t.Parallel` in tests. Updates #2701 Fixes #3016
2017-02-11Deprecate sourceRelativeLinksBjørn Erik Pedersen
Fixes #3028 Closes #3026 Closes #2891 Closes #2691
2017-02-04helpers: Fix misspellsbogem
2017-02-04all: Refactor to nonglobal file systemsBjørn Erik Pedersen
Updates #2701 Fixes #2951
2017-01-07helpers: Allow tilde in URLsBjørn Erik Pedersen
See #2177