summaryrefslogtreecommitdiffstats
path: root/hugolib
AgeCommit message (Collapse)Author
2017-09-29Clean up lint in various packagesCameron Moore
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-29hugolib: Fix broken hightlighter smoke testBjørn Erik Pedersen
2017-09-29Change SummaryLength to be configurable (#3924)Brendan Roy
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-27hugolib: Move metrics output to the end of the site buildCameron Moore
2017-09-26metrics: Add simple template metrics featureCameron Moore
2017-09-25Use Chroma as new default syntax highlighterBjørn Erik Pedersen
If you want to use Pygments, set `pygmentsUseClassic=true` in your site config. Fixes #3888
2017-09-23Add liveReloadPort flag to serverBjørn Erik Pedersen
This makes live reloading behind a HTTPS proxy working, as in the example below using the service from https://ngrok.com: ``` hugo server -b https://ba6sdfe72.ngrok.io --appendPort=false --liveReloadPort=443 --navigateToChanged ``` Fixes #3882
2017-09-13tpl/tplimpl: Fix escaped HTML Go 1.9 multioutput issue (#3880)Bjørn Erik Pedersen
Fixes #3876
2017-09-08hugolib: Fix "published" front matter handlingBjørn Erik Pedersen
Also related: * support "modified" as an optional way to signal "last modified" * make sure all relevant page dates are also added to params Fixes #3867
2017-09-07hugolib: Fix typo in aquiredFiisio
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-06hugolib: Implement "related content"Bjørn Erik Pedersen
This closes #98, even if this commit does not do full content text search. We may revisit that problem in the future, but that deserves its own issue. Fixes #98
2017-08-18compare, hugolib, tpl: Add Eqer interfaceBjørn Erik Pedersen
And use it in `eq` and `ne` so `Page` values can be compared directly in the templates without thinking about it being a `Page` or a `PageOutput` wrapper. Fixes #3807
2017-08-17hugolib: Simplify Page.EqBjørn Erik Pedersen
2017-08-17hugolib: Do not return error in Eq on type mismatchBjørn Erik Pedersen
2017-08-16hugolib: Rename Page.Equals to Page.EqBjørn Erik Pedersen
To get the name in line with the template func `eq`.
2017-08-16hugolib: Add Page.EqualsBjørn Erik Pedersen
2017-08-14hugolib: Rewrite replaceDivider to reduce memory allocationBjørn Erik Pedersen
```bash name old time/op new time/op delta ReplaceDivider-4 9.76µs ±105% 7.96µs ±24% ~ (p=0.690 n=5+5) name old alloc/op new alloc/op delta ReplaceDivider-4 3.46kB ± 0% 1.54kB ± 0% -55.56% (p=0.008 n=5+5) name old allocs/op new allocs/op delta ReplaceDivider-4 6.00 ± 0% 1.00 ± 0% -83.33% (p=0.008 n=5+5) ```
2017-08-14hugolib: Extract replaceDivider logicBjørn Erik Pedersen
To its own function and add a test and a benchmark for it.
2017-08-12Add an iFrame title to the YouTube shortcodeNic Raboy
To accommodate modern web accessibility as outlined here https://dequeuniversity.com/tips/provide-iframe-titles
2017-08-09Add support for multiple config files via --config a.toml,b.toml,c.tomlJohan Gielstra
2017-08-08hugolib: More spellingBjørn Erik Pedersen
2017-08-07all: Fix spellingBjørn Erik Pedersen
And some other minor issues.
2017-08-07all: gofmt -sBjørn Erik Pedersen
2017-08-03Add some missing doc commentsJorin Vogel
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-02Remove sourceRelativeLinksBjørn Erik Pedersen
Fixes #3766
2017-08-01Switch from fork bep/inflect to markbates/inflectJorin Vogel
Original package has received updates the fork hasn't. Without fork updates are easier to maintain.
2017-07-31Make the title case style guide configurableBjørn Erik Pedersen
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-27Add --debug option to be improved on over timeMax Rydahl Andersen
Why: * first time using hugo I got very little info from --verbose output but I noticed there is quite a lot of useful DEBUG logging * asked for in other issues like https://github.com/gohugoio/hugo/issues/3514 This change addreses the need by: * adding a simple --debug flag which simply turns on debug level in stdout and logoutput if enabled.
2017-07-21hugolib: Support reflinks starting with a slashBjørn Erik Pedersen
Fixes #3703
2017-07-21helpers: Add --trace to asciidoctor argsVasyl Solovei
This will help to understand and fix errors by seeing stacktrace of an error. See #3714
2017-07-17hubolib: Add HasShortcodeBjørn Erik Pedersen
Fixes #3707
2017-07-14hugolib: Improve panic handling in layout renderingBjørn Erik Pedersen
2017-07-14hugolib: Make template panics into nice error messagesBjørn Erik Pedersen
2017-07-04output: Support templates per site/languageBjørn Erik Pedersen
This applies to both regular templates and shortcodes. So, if the site language is French and the output format is AMP, this is the (start) of the lookup order for the home page: 1. index.fr.amp.html 2. index.amp.html 3. index.fr.html 4. index.html 5. ... Fixes #3360
2017-07-04hugolib: Extend the sections APIBjørn Erik Pedersen
This commit adds some section related methods that have been asked for: * .CurrentSection * .IsDescendant * .IsAncestor Fixes #3591
2017-07-04hugolib: Make .Site.Sections return the top level sectionsBjørn Erik Pedersen
See #3591
2017-07-01hugolib: Render 404.html for all languagesMitchell Cohen
Fixes #3598
2017-06-28hugolib: Add more summary testBjørn Erik Pedersen
Closes #2973
2017-06-26Support open "current content page" in browserBjørn Erik Pedersen
This commit adds a new `--navigateToChanged` and config setting with the same name, that, when running the Hugo server with live reload enabled, will navigate to the current content file's URL on save. This is really useful for site-wide content changes (copyedits etc.). Fixes #3643
2017-06-20media, hugolib: Support extension-less media typesBjørn Erik Pedersen
This change is motivated by Netlify's `_redirects` files, which is currently not possible to generate with Hugo. This commit adds a `Delimiter` field to media type, which defaults to ".", but can be blanked out. Fixes #3614
2017-06-20hugolib: Add disableAliasesBjørn Erik Pedersen
Note that even with this setting enabled, the aliases themselves are preserved on the pages. The big motivation for this change is to be able to use the alias definitions to generate `.htaccess` or Netlify's `_redirect` files with server-side redirects. Fixes #3613
2017-06-19parser: Fix handling of quoted brackets in JSON front matterBjørn Erik Pedersen
Also remove a broken JSON test. Fixes #3511
2017-06-19hugolib: Fix error handling for JSON front matterBjørn Erik Pedersen
Fixes #3610
2017-06-13hugolib: Disable shaky leaktest on CIBjørn Erik Pedersen
2017-06-13Run gofmt to get imports in line vs gohugoio/hugoBjørn Erik Pedersen
2017-06-13all: Update textual references in Go source to point to gohugoio/hugoBjørn Erik Pedersen
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-06-13hugolib: Fix section logic for root folders with subfoldersBjørn Erik Pedersen
This commit fixes an issue introduced in the recently released Hugo 0.22. This logic did not handle the case with root sections with non-section subfolders very well. Fixes #3586
2017-06-13hugolib: Support sub-sections in permalink settingsBjørn Erik Pedersen
This enables both the variants below: Current (first level only): ``` "blog": ":section/:title", ``` Nested (all levels): ``` "blog": ":sections/:title", ``` Should ideally been part of Hugo 0.22, but better late than never ... Fixes #3580
2017-06-09hugolib: Make the RSS feed use the date for the node it representsBjørn Erik Pedersen
Closes #2708