Commit graph

690 commits

Author SHA1 Message Date
spf13 141f3e19e0 Migrating Hugo to Afero for filesystem calls. 2014-11-01 11:57:29 -04:00
spf13 dfb8482569 Handlers WIP - Convert now working 2014-10-20 20:15:33 -04:00
spf13 30d4a26ba0 Handlers WIP (builds) 2014-10-20 17:51:53 -04:00
spf13 93f3d604c6 Handlers WIP 2014-10-20 17:42:16 -04:00
spf13 8bd0ffba43 Initial Handler Architecture WIP 2014-10-17 16:57:48 -04:00
spf13 20467e36b4 Improved error message when config file not found. 2014-10-16 20:20:39 -04:00
spf13 5dfc1dedb8 Big refactor of how source files are used. Also added default destination extension option. 2014-10-16 20:20:09 -04:00
bep 24bbfe7d32 Set Content-Type for livereload.js
The Content-Type was not set for livereload.js and was interpreteted by the browser as text/plain.

This commit sets it to application/javascript.

Fixes #562
2014-10-15 12:45:29 -04:00
bep 0167fb4803 Copy content from archetype
Prior to this commit only metadata were copied from archetype on content creation.

This commit includes the content if set in archetype. This is useful in situations with similar page structure.

Fixes #556
2014-10-15 12:40:12 -04:00
bep da5d98e958 Make First accept any int
TOML and YAML handles integers differently, creating issues when using integer values from configuration or front matter in the First template function.

This currently works in YAML (parses into int), but not in TOML (parses into int64).

This commit modifies First so it accepts any int.

Fixes #551
2014-10-15 12:39:09 -04:00
Jian Zhou d064139cee Fix spf13/hugo#467. RSSLink now point to index.xml 2014-10-15 12:36:06 -04:00
bep 16330cea91 Add nil-check to Intersect
The Intersect template-method would fail if one or both of the lists were nil (post vs page; post has tags, page has not).

This commit adds a nil-check and returns an empty result if any of the inputs are nil.

See #537
2014-10-15 12:31:22 -04:00
Will Stevens 1d4dde7ac3 added docs for 'intersect' and 'in' template functions 2014-10-15 12:30:10 -04:00
Anthony Fok ca7007bf26 Minor proofreading corrections to Hugo docs
- Add backticks and commas where necessary
- Remove some trailing whitespace
- Add front matter example in TOML
- Fix typo in one of the tags in Showcase
- Add 多说 (Duoshuo) as an alternative to Disqus
- Use internal links (i.e. without gohugo.io) where possible
- Use a colon to set off an example
- Change "it's" to "its" where appropriate
- Use typographical (i.e. curly) apostrophe on the front page
  where appropriate
- Capitalize "Github" as "GitHub"
2014-10-15 12:18:20 -04:00
bep 953cad6cbd Document manual breakpoint of .Summary
The use of <!--more--> to set the breakpoint for the generated page summary is mentioned in a release note, but not in the doc itself.

Very useful - and it leaves the formatting in place.
2014-10-15 12:15:59 -04:00
Raphael Estrada 3da97656ea add 'width' parameter to 'figure' shortcode 2014-10-15 12:09:26 -04:00
Mantas fb82f00f9d handle https prefixes in baseUrl 2014-10-07 17:18:45 -04:00
Oscar Bolmsten b98c2088f8 Minor fix to error message when copying static files 2014-10-07 17:17:51 -04:00
Joel Scoble 4b9e4c90d9 #462 fix, remove leading and trailing dashes from urlized slug. includes test changes 2014-10-07 17:05:11 -04:00
Joel Scoble f52e662890 Feed the titleized taxonomy key through string replace to replace '-' with ' ' for proper display of the taxonmy title 2014-10-07 17:01:39 -04:00
Will Stevens 938733f48f added In and Intersect template functions 2014-10-07 16:52:12 -04:00
Austin Ziegler 9cdd2e54c2 Use md5 against the file path for uniqueness. 2014-10-07 16:45:23 -04:00
Austin Ziegler 603b24a163 Make each generated page’s footnotes unique.
If content pages are fully rendered in a list page, footnotes that use
the same reference (`[^fn]`) will have duplicated anchors. This change
builds on #526 to put the page filename (`Page.File.Name`) as part of
the anchor for a footnote.

This would fix discussion [116](http://discuss.gohugo.io/t/footnote-references-are-duplicated-on-list-pages/116).
2014-10-07 16:44:28 -04:00
Austin Ziegler e68e7ef96f Configure footnote rendering.
- The config file can provide FootnoteAnchorPrefix, which will be used
  by blackfriday when rendering to HTML. A value of `q:` has the effect
  of making the anchor for a footnote `[^footie]` be `fn:q:footie`. The
  default is `""`.

- The config file can provide FootnoteReturnLinkContents, which will be
  used by blackfriday when rendering to HTML. A value of `^` has the
  effect of making the return link be `^` instead of `[return]`.
2014-10-07 16:43:33 -04:00
Jorin Vogel eeaf343a14 Mention .Params and .Page variables in shortcode docs. Also highlight variables. 2014-10-02 13:53:36 -04:00
Kartik Singhal 1614b82452 Correct desc for hugo new command 2014-10-02 13:47:25 -04:00
Aurelius Prochazka c739ec228c Removed text from code block. 2014-10-02 13:45:47 -04:00
Kartik Singhal 879e90dca7 Switch to new hompage 2014-10-02 13:39:59 -04:00
spf13 e3d4d40d32 better error messages for template errors 2014-10-02 13:37:38 -04:00
Nate Finch 3f59abe885 add some information to rendering errors so it's easier to tell what's failing. 2014-09-29 09:19:39 -04:00
Austin Ziegler def79376c4 Make taxonomy documentation match the example. 2014-09-24 14:56:53 -04:00
Kartik Singhal 3060307085 Make highlight.js example clearer
Provide the missing step to actually use the library. Should be helpful for a newbie.
2014-09-24 14:56:44 -04:00
spf13 b81ebf2ada Making the install on the homepage a bit more clear 2014-09-22 22:08:08 -04:00
Alex Dunn 4e4ea9583f instructions for Homebrew installation
updated installation page of documentation, and changed "Download" button on index.html to scroll to bottom where multiple installation options are featured

getting the scrolldown to work required removing the fixed positioning on #action and on the footer
2014-09-22 21:51:19 -04:00
spf13 26e44506e9 adding memstat option to server 2014-09-22 09:45:05 -04:00
Tatsushi Demachi 5d565c34e5 Extend template's basic math functions to accept float, uint and string values 2014-09-22 09:01:40 -04:00
spf13 d5308e6f6f Adding a community link to the homepage 2014-09-19 08:32:25 -04:00
spf13 bf980bc138 switching website to gohugo.io & adding links to discuss 2014-09-18 21:22:04 -04:00
rybi 1a0dc0b936 Update urls.md
Corrected the --uglyUrls flag, wouldn't work if lowercase.
2014-09-18 13:06:02 -04:00
Nate Finch b590de6917 limit the number of goroutines used in taxonomy rendering to gomaxprocs*4 2014-09-14 07:23:03 -04:00
Nate Finch 49045b1cbc limit the number of goroutines we use for page rendering to gomaxprocs*4 2014-09-14 07:01:40 -04:00
Nate Finch cf3e748bd9 remove unused field 2014-09-12 07:25:45 -04:00
Nate Finch a72ca38c07 make the value of the BuildDrafts flag available to templates.This can be useful for if you only want to show some specific information on your local machine and/or when showing drafts. 2014-09-11 17:24:10 -04:00
Nate Finch 7142374332 Sort by title if dates are the same 2014-09-11 17:23:01 -04:00
Alex Dunn 275e1c0d23 more examples and explanation of go templating
Emphasizing to people (like me) who aren't familiar with Go that just because something's not mentioned in the Hugo docs doesn't mean it's not possible
2014-09-11 17:22:08 -04:00
Joel Scoble becd4fe337 refactor handling of amber to AddTemplateFile as the TODO note stated. Used switch statement to make it easier to add other template support 2014-09-11 17:09:16 -04:00
Joel Scoble 4e9b04086a fix tags not being in lowercase, #491 2014-09-11 17:03:31 -04:00
Daniel Fairhead 012a473e27 added "eq" function to docs. 2014-09-11 17:02:20 -04:00
bep df489b4712 Enable soft livereload of CSS and images
Prior to this commit a dummy JavaScript filename was sent to LiveReload when changing a static file (CSS, image etc.), forcing a full browser reload of the page.

This commit fixes this by sending the relative file path of the changed static resource, enabling partial live reloading for CSS- and image-changes. If more than one static file happens to end up in the same changeevent-batch, it will fall back to do a full refresh. To enable this logic, the change events with names ending with ".goutputstream*" is now filtered out as temporary.

Changes in dynamic content behaves like before.

Issue #490
2014-09-11 16:58:06 -04:00
Nate Finch 0099b5a3cb Change all uses of sort.Sort to sort.Stable.Using sort.Stable ensures that even if the sort keys are the same, the order of the sort will not randomly change. Using the old sort.Sort, if you had pages with no date, the lists of those pages would randomly reorder every time you regenerate the list, causing spurious changes to the output. Now they'll always get ordered in the same way. 2014-09-09 09:22:16 -04:00