Commit graph

2689 commits

Author SHA1 Message Date
bep
bea9280fb3 Do not add trailing slash to baseURL
Fixes #1105
2015-05-05 16:02:44 +02:00
bep
bef3df7481 Polish absurlreplacer 2015-05-04 12:51:52 +02:00
bep
be918d7145 Rename field i to the more descriptive idx 2015-05-04 00:06:00 +02:00
bep
be57b1fe10 absurlreplacer: remove superfluous code, take 2
```
benchmark                    old ns/op     new ns/op     delta
BenchmarkAbsURL              17946         17454         -2.74%
BenchmarkAbsURLSrcset        19236         18979         -1.34%
BenchmarkXMLAbsURLSrcset     19046         18688         -1.88%
BenchmarkXMLAbsURL           9561          9432          -1.35%

benchmark                    old allocs     new allocs     delta
BenchmarkAbsURL              24             24             +0.00%
BenchmarkAbsURLSrcset        29             29             +0.00%
BenchmarkXMLAbsURLSrcset     27             27             +0.00%
BenchmarkXMLAbsURL           12             12             +0.00%

benchmark                    old bytes     new bytes     delta
BenchmarkAbsURL              3139          3139          +0.00%
BenchmarkAbsURLSrcset        2374          2369          -0.21%
BenchmarkXMLAbsURLSrcset     2574          2572          -0.08%
BenchmarkXMLAbsURL           1871          1871          +0.00%

```

See #1059
2015-05-03 23:04:37 +02:00
bep
be4ca21746 absurlreplacer: remove superfluous code
```
benchmark                    old ns/op     new ns/op     delta
BenchmarkAbsURL              18381         17946         -2.37%
BenchmarkAbsURLSrcset        19531         19236         -1.51%
BenchmarkXMLAbsURLSrcset     19316         19046         -1.40%
BenchmarkXMLAbsURL           9818          9561          -2.62%

benchmark                    old allocs     new allocs     delta
BenchmarkAbsURL              24             24             +0.00%
BenchmarkAbsURLSrcset        29             29             +0.00%
BenchmarkXMLAbsURLSrcset     27             27             +0.00%
BenchmarkXMLAbsURL           12             12             +0.00%

benchmark                    old bytes     new bytes     delta
BenchmarkAbsURL              3139          3139          +0.00%
BenchmarkAbsURLSrcset        2354          2374          +0.85%
BenchmarkXMLAbsURLSrcset     2584          2574          -0.39%
BenchmarkXMLAbsURL           1864          1871          +0.38%
```

See #1059
2015-05-03 22:43:04 +02:00
bep
be96aacb11 Add benchmark tests for srcset handling
See #1059
2015-05-03 20:57:39 +02:00
bep
beb601c7ff Fix testdata: srcset items should be comma separated, according to spec
See #1059
2015-05-03 20:09:42 +02:00
bep
bee6a69846 canonifyurls in srcset
Speed is about the same as before, uses slightly less memory:

```
benchmark              old ns/op     new ns/op     delta
BenchmarkAbsURL        17302         17713         +2.38%
BenchmarkXMLAbsURL     9463          9470          +0.07%

benchmark              old allocs     new allocs     delta
BenchmarkAbsURL        28             24             -14.29%
BenchmarkXMLAbsURL     14             12             -14.29%

benchmark              old bytes     new bytes     delta
BenchmarkAbsURL        3422          3144          -8.12%
BenchmarkXMLAbsURL     1985          1864          -6.10%
```

Fixes #1059
2015-05-03 19:54:23 +02:00
bep
be6482603e Disable faulty range validation in apply
Fixed #1098
2015-05-02 11:32:28 +02:00
bep
bee521c68f Try to make it more visible that you have to set baseUrl 2015-05-02 00:24:47 +02:00
bep
be15927819 tpl: check that types in args match the target func's type
Fixes #1095
2015-05-01 17:00:34 +02:00
bep
be049ff96a absurl: export a base url var for testing 2015-05-01 12:29:03 +02:00
bep
be9df84772 shortcodeparser: fix panic on slash following opening shortcode comment
Fixes #1093
2015-04-30 15:59:07 +02:00
bep
be7b830f33 tpl: add sanity check to prevent panic in seq on big nums
Fixes #1092
2015-04-30 13:25:46 +02:00
bep
be190fdb0d tpl: check for too many arguments in apply
Fixes #1091
2015-04-30 11:41:27 +02:00
bep
be017f187e tpl: check slice bounds in slicestr
Fixes #1090
2015-04-30 11:26:45 +02:00
bep
be3b8a132b tpl: avoid panic on too few args to apply
Fixes #1089
2015-04-30 10:51:10 +02:00
bep
beacfcf865 doc: move the index func reference to where it's used 2015-04-29 22:40:33 +02:00
Rick Cogley
da08fad5f3 Add index reference to go template primer doc page
Related to @bjornerik 's answer in this discussion: http://discuss.gohugo.io/t/inserting-data-from-data-file-into-content-file-newbie-question/1002/3 ... I figured I'd make myself useful and add the reference to the index function, on the go template primer page.

Also, I moved the reference links to the bottom.

A general comment: as good as these docs are, the primer at this point makes some assumptions about audience knowledge, so some might find it lacking. Once I understand better, I might make some more clarifying edits.
2015-04-29 21:06:21 +02:00
bep
be15b07733 Fix typo in test 2015-04-29 19:22:11 +02:00
bep
bee1358e48 Return error from HandleShortcodes
To be able to test for it.
2015-04-29 19:08:27 +02:00
bep
be29c0bfbd Print ERROR on theme vs Hugo version mismatch
Fixes #1070
2015-04-28 20:39:25 +02:00
Rick Cogley
a8f91ace11 Clarify partials folder subfolders
A couple of edits to clarify that the layout/partials folder can contain arbitrarily-named subfolders, since I found the examples using ``{{ partial "post/tag/list" . }}`` confusing. Some folders are named specifically to work a certain way with hugo, but although the examples use key functional section and taxonomy names like post and tag, it does not matter what they are called. Hopefully this will help other newbs.
2015-04-27 11:44:26 +02:00
Rick Cogley
9e13ac9a8f Single rather than double backticks in types.md
Whoops, I had the new hugo new as double backticks but it appears only single are needed.
2015-04-25 00:06:29 +02:00
Rick Cogley
6b69f951c8 Clarify hugo new command in types.md
Elsewhere in the docs commands are entered as code, so to be consistent with that, added backticks and the word hugo.
2015-04-25 00:06:28 +02:00
bep
be2c67ad45 Fix broken Travis tests
No idea why these suddenly starts to fail.
2015-04-22 18:59:42 +02:00
bep
beb32af7a2 Do not fail on unknown files in /data
Fixes #1068
2015-04-22 18:35:56 +02:00
bep
be366bfe1e pagination: export pager to make Golint happy 2015-04-21 21:25:34 +02:00
bep
be8e6d4f1f Use fmt.Errorf to make Golint happy 2015-04-21 21:13:30 +02:00
bep
be01f8430e Add shortcut to Scratch from shortcode 2015-04-19 14:50:27 +02:00
bep
bef25432d1 doc: clarify Scratch usage in shortcodes 2015-04-19 11:30:11 +02:00
bep
be62c94872 Check spelling and some minor additions to Ace doc 2015-04-18 23:06:18 +02:00
bep
be7c1e5dd4 Add doc for Ace templates
Fixes #1063
2015-04-18 20:23:28 +02:00
bep
beff680534 Expand the ACE base template lookup pattern
The previous implementation didn't easily support the use case "I want one base template for the single pages, another for the rest".

The new lookup order is:

1. <current-path>/<template-name>-baseof.ace, e.g. list-baseof.ace
2. <current-path>/baseof.ace
3. _default/<template-name>-baseof.ace, e.g. list-baseof.ace.
4. _default/baseof.ace
2015-04-18 13:58:20 +02:00
bep
be46a4b9b0 Polish func naming in shortcode handling 2015-04-18 00:40:59 +02:00
bep
bed053071e Remove unused types Shortcode and ShortcodeFunc 2015-04-18 00:31:56 +02:00
bep
be0d977009 Only write highlight to cache when CacheDir is set
To avoid writing cache files when testing.
2015-04-16 02:27:23 +02:00
bep
bee52f85ae Fix broken Highlight test 2015-04-16 02:20:10 +02:00
bep
be6a92c8b6 Temporarily disable Highlight test 2015-04-16 00:58:21 +02:00
bep
be24457acf Add more options to highlight
Fixes #1021
2015-04-15 20:31:06 +02:00
bep
be540f5b8f Fix potential Windows path issue with Pygments cache 2015-04-14 19:58:33 +02:00
Florian Baumann
0fcb78e43b Added isso as a Disqus alternative to the docs
Hi,

I'm using isso with my hugo blog which works just fine.
I think this should be added to the docs :)

Thanks!
2015-04-10 22:45:22 -06:00
Anthony Fok
1b5b0b3a94 Add "Google Cloud Storage" article to docs Press page
See #1055
2015-04-10 14:19:54 -06:00
Samuel Lelièvre
1f4a3c1f38 Typo in mathjax.md 2015-04-10 18:18:14 +02:00
complexsplit
3b1db70af5 Add Google Cloud Storage to doc 2015-04-10 18:12:59 +02:00
bep
bebb1b9d5d Fix spelling mistake in comment 2015-04-07 15:17:24 +02:00
bep
be31b9e287 Add custom Windows mousestrap message
Fixes #1022
2015-04-07 13:01:11 +02:00
bep
be4a9dd5d2 Remove section about the buildDate being configurable
It isn't.
2015-04-06 16:30:49 +02:00
bep
be25acae28 Fix README part about missing Windows tests
We now have AppVeyor.
2015-04-06 15:15:54 +02:00
bep
be1b7f67d3 Add git commit message guideline
Also rearranged the contribution section to get more attention to the important stuff.
2015-04-06 15:12:01 +02:00