Commit graph

2161 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
58802de313 No block support in shortcodes
So no need to check them.
2016-03-15 10:22:08 +01:00
Bjørn Erik Pedersen
3a2a4c3b07 tpl: Make the safeHTML and cousins accept more than strings 2016-03-14 22:27:40 +01:00
Bjørn Erik Pedersen
70739c972e Remove unnecessary type conversions 2016-03-14 20:35:50 +01:00
Bjørn Erik Pedersen
3a82ae7114 parser: Unexport some internals 2016-03-14 17:52:11 +01:00
Bjørn Erik Pedersen
5d915e7e96 helpers: Unexport some internals 2016-03-14 17:27:15 +01:00
Cameron Moore
aedb13b219 tpl: Fix race condition in regexp cache
Protect regular expression cache with a mutex.

Fixes #1973
2016-03-14 16:58:08 +01:00
Bjørn Erik Pedersen
f6c3ca8b2a transform: Remove unused code 2016-03-14 15:46:20 +01:00
Bjørn Erik Pedersen
263daaeabc target: Remove unused code 2016-03-14 15:44:45 +01:00
Bjørn Erik Pedersen
4ada1cab4d source: Remove unused code 2016-03-14 15:43:51 +01:00
Bjørn Erik Pedersen
df3f2af0a8 parser: Remove unused code 2016-03-14 15:42:59 +01:00
Bjørn Erik Pedersen
dea185aa9b hugolib: Remove unused code 2016-03-14 15:41:03 +01:00
Bjørn Erik Pedersen
c21dc16dbe commands: Remove unused code 2016-03-14 15:24:42 +01:00
Bjørn Erik Pedersen
91ffc76b24 helpers: Remove unused code 2016-03-14 15:20:36 +01:00
Bjørn Erik Pedersen
0fb31e4a82 Create an alias from shortcode.Page.Site to shortcode.Site
Fixes #1976
2016-03-14 14:10:15 +01:00
Bjørn Erik Pedersen
734dd1c4d0 Bump Pygment version to 2.1.3
Fixes #1969
2016-03-13 22:16:00 +01:00
Bjørn Erik Pedersen
542e220cc4 Make tests green on both Pygments 2.0.2 and 2.1.3
See #1969
2016-03-13 22:06:51 +01:00
Bjørn Erik Pedersen
988962e8b5 Add Pygments 2.0.2 to CircleCI build
Hugo tests fail with 2.1.*, that have to be fixed before we upgrade,  see #1969
2016-03-13 13:45:46 +01:00
Bjørn Erik Pedersen
989c7487eb Add emojify to the template func smoke tests 2016-03-12 16:53:39 +01:00
digitalcraftsman
612c61146d Docs: move tutorial screenshots in their own subfolder 2016-03-12 13:08:46 +01:00
JoeArizona
a103d58162 Docs: update Windows install instructions
- updated the instructions to account for Windows 10 path editor
- linked to third-party editors for pre-10 Windows
- separated instructions for technical and non-technical users changed
D drive paths to C drive since D is the default optical drive on most
Windows systems
- cut the assumption about 64-bit Windows since 32-bit binary is also available
- cut the assumption about command line since we're giving GUI instructions
to non-technical users
- cut a bug in the doc where we had people typing D: at the command prompt
*after* submitting `cd D:\Hugo\Sites.` Recommend snipping 386 and AMD from
ZIP file names, since they don't add useful info and will just confuse novices.
2016-03-12 13:02:54 +01:00
Jason Gowans
6fb4e0718a Docs: add Aerobatic as a deployment option in the Introduction 2016-03-12 12:19:56 +01:00
Jason Gowans
d9049752dc Docs: add tutorial for Hosting on Bitbucket 2016-03-12 12:19:31 +01:00
Daniel Compton
153dccc0e8 Add debugging steps for no variables defined 2016-03-12 21:44:50 +13:00
John Ku
0ab4162413 Ability to config layout and content dir via cli
fixes spf13/hugo#1598
2016-03-11 23:42:27 +01:00
Bjørn Erik Pedersen
cafb784799 Add emoji support
This uses the Emoji map from https://github.com/kyokomi/emoji -- but with a custom replacement implementation.

The built-in are fine for most use cases, but in Hugo we do care about pure speed.

The benchmarks below are skewed in Hugo's direction as the source and result is a byte slice,
Kyokomi's implementation works best with strings.

Curious: The easy-to-use `strings.Replacer` is also plenty fast.

```
BenchmarkEmojiKyokomiFprint-4  	   20000	     86038 ns/op	   33960 B/op	     117 allocs/op
BenchmarkEmojiKyokomiSprint-4  	   20000	     83252 ns/op	   38232 B/op	     122 allocs/op
BenchmarkEmojiStringsReplacer-4	  100000	     21092 ns/op	   17248 B/op	      25 allocs/op
BenchmarkHugoEmoji-4           	  500000	      5728 ns/op	     624 B/op	      13 allocs/op
```

Fixes #1891
2016-03-11 15:51:37 -06:00
Salar Rahmanian
5926c6c8d5 Update showcase entry and article link to softinio.com 2016-03-11 22:31:59 +01:00
Cameron Moore
b8d3651242 tpl: Add replaceRE function
This commit addes a `replaceRE` template function.  Regexp patterns are compiled
once and cached.
2016-03-11 19:59:18 +01:00
Konstantin Kliakhandler
e9008b91fa Allow picking a specific file out of a gist 2016-03-11 18:29:07 +01:00
Bjørn Erik Pedersen
7cd69aaae8 Exit with error code on any error
Fixes #740
2016-03-11 10:57:13 +01:00
Bjørn Erik Pedersen
077b0fa71f Add package prefix to the commit message guidelines 2016-03-11 10:30:17 +01:00
Avery Rosen
0667d8a0f5 Add engineering.mongodb.com to the showcase 2016-03-10 21:46:12 +01:00
Bjørn Erik Pedersen
941b4caf57 tpl: Add Copyright reference to the Go authors
Also a reference to the `index`issue in Go's issue tracker.
2016-03-10 21:00:53 +01:00
Shekhar Gulati
6cb032b67e Docs: use Shekhar Gulati's Hugo tutorial as quickstart guide 2016-03-10 20:36:54 +01:00
Cameron Moore
2d0650dbd9 tpl: Add custom index function
This commit adds a custom index template function that deviates from the stdlib
simply by not returning an "index out of range" error if an array, slice or
string index is out of range.  Instead, we just return nil values.  This should
help make the new default function more useful for Hugo users.

Fixes #1949
2016-03-10 17:47:59 +01:00
Cameron Moore
f3f9763afd tpl: Add time note to default func description 2016-03-10 17:47:59 +01:00
Cameron Moore
09c8c17bf0 tpl: fix default function
This commit fixes a few things:

1. `given` is now a variadic parameter so that piping works properly
2. add separate template tests to make sure piping works
3. support time values
4. add more tests of the dfault function
2016-03-10 17:47:59 +01:00
Cameron Moore
0743646f32 docs: add better default example 2016-03-10 17:47:59 +01:00
Cameron Moore
ce9ee3cf49 tpl: Add default function 2016-03-10 17:47:59 +01:00
Marek Janda
0962470850 Make absURL properly handle baseURL with path component 2016-03-10 11:08:50 +01:00
digitalcraftsman
94c3825e5b Add md5 and sha1 template funcs 2016-03-10 11:03:06 +01:00
Ján Koščo
be3519fac0 Use default sitemap configuration for homepage
Fixes #1304
2016-03-10 11:02:00 +01:00
Ivan Fraixedes
0945673f05 Update Dockerfile to use golang:1.6 base image
Hugo has been confirmed which runs on Golang 1.6, as travis uses 1.6
vesion. Dockerfile must be consistend with it so it has to use golang:1.6
as base image than golang:1.5
2016-03-10 10:59:52 +01:00
Bjørn Erik Pedersen
a2abad9677 Add support for Go 1.6 block keyword in templates
NOTE: Needs Go 1.6 to use the new feature.

Fixes #1832
2016-03-10 10:53:54 +01:00
Bjørn Erik Pedersen
924028a9be Fix for page in multiple menus
Fixes #1934
2016-03-10 10:31:12 +01:00
Bjørn Erik Pedersen
973393c99e Create template clone for late template execution
Fixing some breaking blogs on Go 1.6

Fixes #1879
2016-03-09 14:37:58 +01:00
Bjørn Erik Pedersen
9896cd0030 Add reference to parent shortcode
Fixes #1936
2016-03-09 11:06:40 +01:00
Steve Moser
866176be97 Docs: fix missing words, tense in datadrivencontent.md 2016-03-07 20:39:55 +01:00
digitalcraftsman
7705e32ec2 Resize showcase thumbnail of h10n.me 2016-03-07 18:54:41 +01:00
Fabio Alessandro Locati
0f48631351 Add viglug website to showcase 2016-03-07 18:30:16 +01:00
Horst Gutmann
64ed64d93f Add h10n.me to the showcase 2016-03-07 18:09:01 +01:00