Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-23all: Use jww instead of fmt for printingbogem
This is an attempt to unify method for printing.
2016-11-07commands, tpl: Get rid of repeating viper accessesAlbert Nigmatzianov
* all: Delete some blank lines * commands, tpl: Get rid of repeating viper accesses
2016-11-05helpers: Golint fixesBjørn Erik Pedersen
2016-10-24all: Unify case of config variable namesAlbert Nigmatzianov
All config variables starts with low-case and uses camelCase. If there is abbreviation at the beginning of the name, the whole abbreviation will be written in low-case. If there is abbreviation at the end of the name, the whole abbreviation will be written in upper-case. For example, rssURI.
2016-10-24Avoid reading from Viper for path and URL funcsBjørn Erik Pedersen
The gain, given the "real sites benchmark" below, is obvious: ``` benchmark old ns/op new ns/op delta BenchmarkHugo-4 14497594101 13084156335 -9.75% benchmark old allocs new allocs delta BenchmarkHugo-4 57404335 48282002 -15.89% benchmark old bytes new bytes delta BenchmarkHugo-4 9933505624 9721984424 -2.13% ``` Fixes #2495
2016-10-19Add page context to error logging in renderingchoeppler
Add logging of the errors/warnings which rst2html outputs to its stderr stream when rendering rst documents. Note that rst2html outputs warnings and errors to stderr but it also adds them to the generated html. -> hugo logs everything in stderr as error. Add / complete adding page context (path to file being rendered) to anything logged by getRstContent and getAsciidocContent. See #2570
2016-10-16helpers: Slight improvement of ToLowerMapBjørn Erik Pedersen
See #2581
2016-10-16Fix case issue Viper vs Blackfriday configBjørn Erik Pedersen
There are still work to be done in the case department, but that will have to be another day. Fixes #2581 See https://github.com/spf13/viper/issues/261
2016-10-13Add context to asciidoc/-tor error loggingC. Hoeppler
Add DocumentName (path to the file being rendered) to RenderingContext and use that information to include the path in the error print. See #2399 Closes #2567
2016-10-13Add logging of asciidoc/-tor errorsC. Hoeppler
Add logging of the errors which asciidoc and asciidoctor output to their stderr stream when converting asciidoc documents. Note that asciidoctor's exit code may be SUCCESS even if there are ERROR messages in its stderr output (tested with Asciidoctor 0.1.4 and 1.5.5). Therefore log the stderr output whenever it is non-empty. See #2399
2016-10-07release: version bump to v0.18-DEVSteve Francia
2016-10-07release: version bump to 0.17Steve Francia
2016-10-06Whitelist startinline pygments optionKim Gressens
2016-09-28Deprecate PageMeta.WordCount etc.Bjørn Erik Pedersen
Fix #2503
2016-09-19Remove some unused varsBjørn Erik Pedersen
2016-09-18helpers: Skip TestGetRealPath on Windows when not in CIBjørn Erik Pedersen
`os.Symlink` needs administrator rights on Windows, and this seems to be the simplest fix while still getting the tests run on Appveyor. Fixes #2476
2016-09-18Fail early in TestGetRealPathBjørn Erik Pedersen
See #2476
2016-09-15Make paginate settings configurable per languageBjørn Erik Pedersen
Fixes #2449
2016-09-14Lazy calculate WordCount, ReadingTime and FuzzyWordCountBjørn Erik Pedersen
This avoids having to execute these expensive operations for sites not using these values. This commit sums up a set of wordcounting and autosummary related performance improvements. The effect of these kind of depends on what features your site use, but a benchmark from 4 Hugo sites in the wild shows promise: ``` benchmark old ns/op new ns/op delta BenchmarkHugo-4 21293005843 20032857342 -5.92% benchmark old allocs new allocs delta BenchmarkHugo-4 65290922 65186032 -0.16% benchmark old bytes new bytes delta BenchmarkHugo-4 9771213416 9681866464 -0.91% ``` Closes #2378
2016-09-14Improve TotalWords counter funcBjørn Erik Pedersen
It is obviously more efficient when we do not care about the actual words. ``` BenchmarkTotalWords-4 100000 18795 ns/op 0 B/op 0 allocs/op BenchmarkTotalWordsOld-4 30000 46751 ns/op 6400 B/op 1 allocs/op ```
2016-09-14Avoid splitting words for summaryBjørn Erik Pedersen
For people using autogenerated summaries, this is one of the hot spots in the memory department. We don't need to split al the content into words to do proper summary truncation. This is obviously more effective: ``` BenchmarkTestTruncateWordsToWholeSentence-4 300000 4720 ns/op 0 B/op 0 allocs/op BenchmarkTestTruncateWordsToWholeSentenceOld-4 100000 17699 ns/op 3072 B/op 3 allocs/op ```
2016-09-14helpers: Improve the language prefix logicBjørn Erik Pedersen
See #2444
2016-09-13helpers: Avoid adding language prefix if already presentBjørn Erik Pedersen
Fixes #2444
2016-09-12Add Language.LanguageNameBjørn Erik Pedersen
Fixes #2435
2016-09-11Replace some leftover os.Stat with hugofs.SourceBjørn Erik Pedersen
2016-09-11Handle symlink change eventBjørn Erik Pedersen
Hugo 0.16 announced support for symbolic links for the root folders, /content, /static etc., but this got broken pretty fast. The main problem this commit tries to solve is the matching of file change events to "what changed". An example: ContentDir: /mysites/site/content where /mysites/site/content is a symlink to /mycontent /mycontent: /mypost1.md /post/mypost2.md * A change to mypost1.md (on OS X) will trigger a file change event with name "/mycontent/mypost1.md" * A change to mypost2.md gives event with name "/mysites/site/content/mypost2.md" The first change will not trigger a correct update of Hugo before this commit. This commit fixes this by doing a two-step check: 1. Check if "/mysites/site/content/mypost2.md" is within /mysites/site/content 2. Check if "/mysites/site/content/mypost2.md" is within the real path that /mysites/site/content points to Fixes #2265 Closes #2273
2016-09-09Add TODO list support for BlackfridayBjørn Erik Pedersen
* Add CSS class to TODO list and list items * Add a flag to turn task list support off Fixes #2269
2016-09-08Fix shortcode vs pygmentsBjørn Erik Pedersen
This is the nth attempt to fix an issue by changing the placeholder token pattern, but now we actually have tests for all the historic trouble cases. Fixes #2223
2016-09-08Reset the i18n func map on reloadBjørn Erik Pedersen
Also improve the error message on missing resource bundles.
2016-09-06Make it the DEV versionBjørn Erik Pedersen
2016-09-06Small adjustment to SiteInfo initBjørn Erik Pedersen
After a visual inspection to make (pretty) sure it is correct re multiple languages. Updates #2309
2016-09-06Fix YAML loading of multilingual configBjørn Erik Pedersen
And some other minor fixes from code review. Updates #2309
2016-09-06Add temp MULTILINGUAL version suffix to this branchBjørn Erik Pedersen
For people having trouble building this. Now `hugo version` should print something like: ``` Hugo Static Site Generator v0.17-MULTILINGUAL BuildDate: 2016-08-10T08:20:36+02:00 ```
2016-09-06Render main content language in root by defaultBjørn Erik Pedersen
Fixes #2312
2016-09-06Multilingual TODO-fixes, take 1Bjørn Erik Pedersen
See #2309
2016-09-06Improve language handling in URLsBjørn Erik Pedersen
The current "rendering language" is needed outside of Site. This commit moves the Language type to the helpers package, and then used to get correct correct language configuration in the markdownify template func. This commit also adds two new template funcs: relLangURL and absLangURL. See #2309
2016-09-06Make it possible to configure Blackfroday per languageBjørn Erik Pedersen
See #2309
2016-09-06Render the shortcodes as late as possibleBjørn Erik Pedersen
This is needed to make shortcode users happy with the new multilanguage support, but it will also solve many other related posts about "stuff not available in the shortcode". We will have to revisit this re the handler chain at some point, but that will be easier now as the integration test story has improved so much. As part of this commit, the site-building tests in page_test.go is refreshed, they now tests for all the rendering engines (when available), and all of them now uses the same code-path as used in production. Fixes #1229 Fixes #2323 Fixes ##1076
2016-09-06Optimize the multilanguage build processBjørn Erik Pedersen
Work In Progress! This commit makes a rework of the build and rebuild process to better suit a multi-site setup. This also includes a complete overhaul of the site tests. Previous these were a messy mix that were testing just small parts of the build chain, some of it testing code-paths not even used in "real life". Now all tests that depends on a built site follows the same and real production code path. See #2309 Closes #2211 Closes #477 Closes #1744
2016-09-06Add multilingual support in HugoAlexandre Bourget
Implements: * support to render: * content/post/whatever.en.md to /en/2015/12/22/whatever/index.html * content/post/whatever.fr.md to /fr/2015/12/22/whatever/index.html * gets enabled when `Multilingual:` is specified in config. * support having language switchers in templates, that know where the translated page is (with .Page.Translations) (when you're on /en/about/, you can have a "Francais" link pointing to /fr/a-propos/) * all translations are in the `.Page.Translations` map, including the current one. * easily tweak themes to support Multilingual mode * renders in a single swift, no need for two config files. Adds a couple of variables useful for multilingual sites Adds documentation (content/multilingual.md) Added language prefixing for all URL generation/permalinking see in the code base. Implements i18n. Leverages the great github.com/nicksnyder/go-i18n lib.. thanks Nick. * Adds "i18n" and "T" template functions..
2016-08-30helpers: Fix bug in emoji rendererCameron Moore
Fixes #2391
2016-08-18docs: Correct all erroneous swaps of "it's" and "its"Mark D. Blackwell
2016-08-04Fix the time template func testBjørn Erik Pedersen
By making it not depend on the locale setup.
2016-07-30Return specific error on walk path too shortBjørn Erik Pedersen
2016-07-30Adjust the sanity check to path length 4Bjørn Erik Pedersen
2016-07-30Add sanity check to the file walkerBjørn Erik Pedersen
As more tests now hit the virtual filesystem, add this check to prevent any walking of the entire file system.
2016-07-30Do not return empty theme dirsBjørn Erik Pedersen
This prevents reading data etc. from the root. Fixes #2320
2016-07-30Handle errors during filesystem walkBjørn Erik Pedersen
Fixes #2318
2016-07-22Simplify the configuration of HugoHTMLRendererBjørn Erik Pedersen
2016-07-11Fix panic when using URLizeMathias Biilmann
Using URLize on a string like '100%-true' would cause a panic