Commit graph

2191 commits

Author SHA1 Message Date
ypnos 9f6b5ad3b4 Save auto-detected markup type in Page.Markup
If Page.Markup was not set by the user, it will now be set after
guessing from the file extension. This means, Page.Markup will be set in
any case. It can be used by a theme to differentiate between markup
types.

Fixes #1950
2016-04-09 00:48:53 +02:00
digitalcraftsman e6e98bf52d docs: Remove Mercurial from contribution tutorial
Fixes #2064
2016-04-08 21:52:50 +02:00
digitalcraftsman 6c900380dc tpl: Add replaceRE to the "smoke tests"
Fixes #2063
2016-04-08 21:36:35 +02:00
Bjørn Erik Pedersen f2ff77f3ac Make Hugo build without Mercurial
By creating a fork of the Bitbucket inflect repo. It hasn't changed since 2013,
so it must be considered pretty stable.

Fixes #2062
2016-04-08 21:11:44 +02:00
digitalcraftsman ebf3cef162 docs: Add "How to contribute to Hugo" tutorial 2016-04-08 19:18:58 +02:00
Nik Nyby 970f15cf7a docs: Use HTTPS links in README where appropriate 2016-04-08 19:14:08 +02:00
digitalcraftsman d3e829508b commands: Add helpful instuctions after "hugo new site"
Fixes #1164
2016-04-08 18:03:49 +02:00
Bjørn Erik Pedersen 1c3c148b38 hugolib: Un-export internal Site-methods
These are obviously internal and for the most part undocumented, creating lots of GoLint warnings.

See #1160
See #2014
2016-04-08 17:55:23 +02:00
Julien Chien 16ad628114 docs: Fix references to section list templates
Fixes #2032
2016-04-08 10:15:48 -05:00
Anthony Fok 6d2898b33b docs: Correct date for proper sorting in showcase 2016-04-08 20:23:10 +08:00
Bjørn Erik Pedersen 1873826651 docs: Add one more quote 2016-04-08 00:06:39 +02:00
Bjørn Erik Pedersen ef933e4a7f docs: Limit the quotes on front page to the last two years
We should get some new ones in there.

Also shuffle the order. This also means no merging into 0.15-docs ...

Which also means we should get a release out there ... soon!

See #2055

Also See https://github.com/BurntSushi/toml/issues/129 for an explanation to the little bit ugly dates.
2016-04-07 23:46:46 +02:00
Robert Basic 40f62a863c docs: Use data folder for website carousel
Fixes #2055
2016-04-07 22:50:38 +02:00
Sven Dowideit 1648e327c0 Document and clean SourceRelativeLinksEval code 2016-04-07 20:10:38 +02:00
Bjørn Erik Pedersen 819271cb78 Re-export the methods used in page group tests 2016-04-07 18:44:58 +02:00
Bjørn Erik Pedersen 3950b1375c hugolib: Camelcase ALL_CAPS vars and const in tests
See #2014
2016-04-07 16:10:41 +02:00
Bjørn Erik Pedersen 05b888877d huglib: Add even more missing GoDoc
See #2014
2016-04-07 16:05:23 +02:00
Bjørn Erik Pedersen 85bcac530a source: Add missing GoDoc in File
See #2014
2016-04-07 15:44:53 +02:00
Bjørn Erik Pedersen ddd02b2f6a hugolib: Camel-case ALL_CAPS const in test 2016-04-07 15:22:41 +02:00
Bjørn Erik Pedersen 98ee8c3f7b hugolib: Add GoDoc to pageGroup.go
See #2014
2016-04-07 15:21:41 +02:00
Bjørn Erik Pedersen 57c347e4cc hugofs: Fix GoDoc 2016-04-07 13:56:11 +02:00
Bjørn Erik Pedersen 969f9311c1 Build Hugo in Travis with race detection enabled 2016-04-07 13:40:18 +02:00
Bjørn Erik Pedersen fd5d573566 Add go test -race to make check 2016-04-07 13:36:48 +02:00
Bjørn Erik Pedersen 27f9e62bb3 Remove Wercker badge
See #2054
2016-04-07 13:28:26 +02:00
digitalcraftsman 5bfe16ef8d tpl: Add findRE template func 2016-04-05 22:26:03 +02:00
Bjørn Erik Pedersen 54750b0780 Do not create robots.txt by default
Meny people, including me, have a custom robots.txt in static.

Also remove that option from the command line; it doesn't feel
important enough.

Fixes ##2049
2016-04-05 22:20:39 +02:00
Philipp Oppermann 43b5dfabb5 Disable syntax guessing for PygmentsCodeFences by default
This disables highlighting for fenced code blocks without explicitly specified language. It also introduces a new `PygmentsCodeFencesGuessSyntax` config option (defaulting to false).

To enable syntax guessing again, add the following to your config file: `PygmentsCodeFencesGuessSyntax = true`

This is a breaking change.
2016-04-04 22:19:36 +02:00
ysqi 0698f294c6 docs: Add yushuangqi.com to the showcase 2016-04-04 20:37:39 +02:00
digitalcraftsman dea06f863e docs: embed YouTube video in Windows installation tutorial 2016-04-03 14:28:12 +02:00
JohnBlood 2304614639 docs: Update set PATH instructions for Windows 2016-04-03 14:22:50 +02:00
Robert Basic 21e0515fed docs: Fix menu in firefox
Fixes #1875
2016-04-03 14:04:48 +02:00
JohnBlood 1adf40355b docs: Add alternative for Wordpress import
I have had trouble getting the Wordpress to Hugo exporter working, so I
added this tip for others to take advantage of.
2016-04-03 13:35:42 +02:00
Bjørn Erik Pedersen f0dbf2c88f tpl: Add the other test case for hasPrefix 2016-04-03 01:59:47 +02:00
Bjørn Erik Pedersen aaee038581 tpl: Sort the smoke tests 2016-04-03 01:57:22 +02:00
digitalcraftsman 80d02a14ab tpl: Add hasPrefix to the template funcs' "smoke test" 2016-04-03 01:30:14 +02:00
digitalcraftsman 4502c4e3ae docs: Add documentation for hasPrefix template func
Fixes #2039
2016-04-03 00:44:43 +02:00
Cameron Moore fe929114d3 tpl: Fix panic in sort of nil sequence
Properly handle a nil sequence in the sortSeq function.  Test included.
Discovered while using `range sort .Site.Data.source.Undefined "foo"`.
2016-04-02 23:06:48 +02:00
Cameron Moore d15fda5000 tpl: Fix panic in pairList.Less
While sorting on data sources with missing fields, a panic can occur in
pairList.Less if `Interface()` is called on a invalid `reflect.Value`.
This commit detects an invalid Value and replacing it with a zero value
for the comparison.
2016-04-02 23:01:36 +02:00
Robert Basic 7d5c9fbf44 Make ByCount sort consistently
When two or more taxonomies have the same number of pages,
sort them by name to have consistent ByCount sorting of
taxonomies.

Fixes #1930
2016-04-02 22:59:10 +02:00
Bjørn Erik Pedersen c6c2c689d6 hugofs: Add missing not nil checks to tests 2016-04-02 01:23:12 +02:00
Bjørn Erik Pedersen b678e90db7 Use to most specific interface in WriteDestPage 2016-04-02 00:04:08 +02:00
Bjørn Erik Pedersen c2277fcbc1 docs: Add doc and a test for readDir
Fixes #2009
2016-03-31 23:16:42 +02:00
Bjørn Erik Pedersen cb89ae63e9 tpl: Make readDir use the WorkingDir fs
Fixes #2010
2016-03-31 23:06:51 +02:00
Bjørn Erik Pedersen 4f66f790b1 Add readFile template func
This also includes a refactor of the hugofs package and its usage.

The motivation for that is:

The Afero filesystems are brilliant. Hugo's way of adding a dozen of global variables for the different filesystems was a mistake. In readFile (and also in some other places in Hugo today) we need a way to restrict the access inside the working dir. We could use ioutil.ReadFile and implement the path checking, checking the base path and the dots ("..") etc. But it is obviously better to use an Afero BasePathFs combined witha ReadOnlyFs. We could create a use-once-filesystem and handle the initialization ourselves, but since this is also useful to others and the initialization depends on some other global state (which would mean to create a new file system on every invocation), we might as well do it properly and encapsulate the predefined set of filesystems. This change also leads the way, if needed, to encapsulate the file systems in a struct, making it possible to have several file system sets in action at once (parallel multilanguage site building? With Moore's law and all...)

Fixes #1551
2016-03-31 21:24:18 +02:00
digitalcraftsman a89035bdaa docs: Mention CLA in the showcase contribution guidelines 2016-03-30 18:01:50 +02:00
Rob Muhlestein 6a3a6f683d docs: Remove incorrent reference to list.html 2016-03-30 17:54:31 +02:00
digitalcraftsman 93e41a1fb2 docs: Fix typo in templates/functions.md 2016-03-28 17:04:29 +02:00
Rob Muhlestein d65fbfe16c docs: Add surge.sh to main page of static site hosters
See #1994
2016-03-28 16:44:13 +02:00
Robert Basic effaf6c2c9 docs: Document GitHub flavoured code fences
Fixes #1259
2016-03-28 16:38:28 +02:00
Robert Basic e35a69216e docs: Document lastmod variable
Fixes #1351
2016-03-28 16:33:50 +02:00