brevno-suite/hugo
9 years agoSingle rather than double backticks in types.md
Rick Cogley [Fri, 24 Apr 2015 09:10:51 +0000 (18:10 +0900)]
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.

9 years agoClarify hugo new command in types.md
Rick Cogley [Fri, 24 Apr 2015 09:05:50 +0000 (18:05 +0900)]
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.

9 years agoFix broken Travis tests
bep [Wed, 22 Apr 2015 16:59:46 +0000 (18:59 +0200)]
Fix broken Travis tests

No idea why these suddenly starts to fail.

9 years agoDo not fail on unknown files in /data
bep [Wed, 22 Apr 2015 16:36:07 +0000 (18:36 +0200)]
Do not fail on unknown files in /data

Fixes #1068

9 years agopagination: export pager to make Golint happy
bep [Tue, 21 Apr 2015 19:25:42 +0000 (21:25 +0200)]
pagination: export pager to make Golint happy

9 years agoUse fmt.Errorf to make Golint happy
bep [Tue, 21 Apr 2015 19:13:28 +0000 (21:13 +0200)]
Use fmt.Errorf to make Golint happy

9 years agoAdd shortcut to Scratch from shortcode
bep [Sun, 19 Apr 2015 12:50:24 +0000 (14:50 +0200)]
Add shortcut to Scratch from shortcode

9 years agodoc: clarify Scratch usage in shortcodes
bep [Sun, 19 Apr 2015 09:30:10 +0000 (11:30 +0200)]
doc: clarify Scratch usage in shortcodes

9 years agoCheck spelling and some minor additions to Ace doc
bep [Sat, 18 Apr 2015 21:06:14 +0000 (23:06 +0200)]
Check spelling and some minor additions to Ace doc

9 years agoAdd doc for Ace templates
bep [Sat, 18 Apr 2015 18:23:14 +0000 (20:23 +0200)]
Add doc for Ace templates

Fixes #1063

9 years agoExpand the ACE base template lookup pattern
bep [Sat, 18 Apr 2015 11:58:35 +0000 (13:58 +0200)]
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

9 years agoPolish func naming in shortcode handling
bep [Fri, 17 Apr 2015 22:40:54 +0000 (00:40 +0200)]
Polish func naming in shortcode handling

9 years agoRemove unused types Shortcode and ShortcodeFunc
bep [Fri, 17 Apr 2015 22:32:07 +0000 (00:32 +0200)]
Remove unused types Shortcode and ShortcodeFunc

9 years agoOnly write highlight to cache when CacheDir is set
bep [Thu, 16 Apr 2015 00:27:37 +0000 (02:27 +0200)]
Only write highlight to cache when CacheDir is set

To avoid writing cache files when testing.

9 years agoFix broken Highlight test
bep [Thu, 16 Apr 2015 00:20:15 +0000 (02:20 +0200)]
Fix broken Highlight test

9 years agoTemporarily disable Highlight test
bep [Wed, 15 Apr 2015 22:58:17 +0000 (00:58 +0200)]
Temporarily disable Highlight test

9 years agoAdd more options to highlight
bep [Wed, 15 Apr 2015 18:31:05 +0000 (20:31 +0200)]
Add more options to highlight

Fixes #1021

9 years agoFix potential Windows path issue with Pygments cache
bep [Tue, 14 Apr 2015 17:58:37 +0000 (19:58 +0200)]
Fix potential Windows path issue with Pygments cache

9 years agoAdded isso as a Disqus alternative to the docs
Florian Baumann [Thu, 2 Apr 2015 08:16:18 +0000 (10:16 +0200)]
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!

9 years agoAdd "Google Cloud Storage" article to docs Press page
Anthony Fok [Fri, 10 Apr 2015 20:19:54 +0000 (14:19 -0600)]
Add "Google Cloud Storage" article to docs Press page

See #1055

9 years agoTypo in mathjax.md
Samuel Lelièvre [Fri, 10 Apr 2015 09:26:46 +0000 (11:26 +0200)]
Typo in mathjax.md

9 years agoAdd Google Cloud Storage to doc
complexsplit [Wed, 8 Apr 2015 03:02:20 +0000 (23:02 -0400)]
Add Google Cloud Storage to doc

10 years agoFix spelling mistake in comment
bep [Tue, 7 Apr 2015 13:17:24 +0000 (15:17 +0200)]
Fix spelling mistake in comment

10 years agoAdd custom Windows mousestrap message
bep [Tue, 7 Apr 2015 11:01:04 +0000 (13:01 +0200)]
Add custom Windows mousestrap message

Fixes #1022

10 years agoRemove section about the buildDate being configurable
bep [Mon, 6 Apr 2015 14:30:46 +0000 (16:30 +0200)]
Remove section about the buildDate being configurable

It isn't.

10 years agoFix README part about missing Windows tests
bep [Mon, 6 Apr 2015 13:15:51 +0000 (15:15 +0200)]
Fix README part about missing Windows tests

We now have AppVeyor.

10 years agoAdd git commit message guideline
bep [Mon, 6 Apr 2015 13:11:48 +0000 (15:11 +0200)]
Add git commit message guideline

Also rearranged the contribution section to get more attention to the important stuff.

10 years agotpl: split template.go
bep [Sun, 5 Apr 2015 19:03:16 +0000 (21:03 +0200)]
tpl: split template.go

The template funcs get their own file. This prevents having to scroll miles to get to the template infrastructure.

10 years agoDocument getenv template function
mdhender [Sun, 5 Apr 2015 01:07:25 +0000 (20:07 -0500)]
Document getenv template function

Add `getenv` to the template function documentation.

10 years agoAdd a section comparing the 'build' and 'server'
mdhender [Sat, 4 Apr 2015 08:13:06 +0000 (03:13 -0500)]
Add a section comparing the 'build' and 'server'

One of the first things that new users have to understand is the
difference between Hugo as a web server and Hugo as a web site
generator. Issue #852 asked for documentation to make that clear.

This patch updates the overview page with that information. It will
seem repetitive to users that understand the difference. Weigh that
against the needs of those that don't.

Reference #852

10 years agoSort function names in templates documentation
mdhender [Sat, 4 Apr 2015 09:12:11 +0000 (04:12 -0500)]
Sort function names in templates documentation

The documentation on the functions is long.  It is easier to find
a function name when they are sorted within the sections.

Fixes #981

10 years agodocs: how to compile on mac, fix minor errors
Alex Dunn [Sat, 4 Apr 2015 18:17:19 +0000 (11:17 -0700)]
docs: how to compile on mac, fix minor errors

10 years agohelpers: add some missing documentation
bep [Fri, 3 Apr 2015 20:29:57 +0000 (22:29 +0200)]
helpers: add some missing documentation

10 years agoFix the last Go Vet error
bep [Fri, 3 Apr 2015 20:18:16 +0000 (22:18 +0200)]
Fix the last Go Vet error

10 years agohugolib: make Page implement the ReaderFrom interface
bep [Fri, 3 Apr 2015 19:41:12 +0000 (21:41 +0200)]
hugolib: make Page implement the ReaderFrom interface

10 years agohelpers: fix some go vet errors
bep [Fri, 3 Apr 2015 19:20:27 +0000 (21:20 +0200)]
helpers: fix some go vet errors

10 years agoReturn early from DistinctErrorLogger's Printf
bep [Fri, 3 Apr 2015 19:16:36 +0000 (21:16 +0200)]
Return early from DistinctErrorLogger's Printf

10 years agoList directories being watched when server is run
Dylan MacKenzie [Thu, 2 Apr 2015 04:40:29 +0000 (21:40 -0700)]
List directories being watched when server is run

Fixes part of issue 1030. Previously hugo only listed the content
directory as being watched. Now we list all files being watched
according to `commands.getDirList()`. We also introduce a RemoveSubpaths
function and test in the helpers module to reduce noise in the command
line output by not showing subdirectories of ones already being watched.

For example, instead of:
`Watching for changes in $HOME/blog/content`
We get:
`Watching for changes in
$HOME/blog/{data,content,layouts,static,themes/my-theme}`

10 years agodocumentation: mention data files under liverload
bep [Wed, 1 Apr 2015 21:25:18 +0000 (23:25 +0200)]
documentation: mention data files under liverload

10 years agoRemove paragraph tags produced by markdownify
bep [Wed, 1 Apr 2015 13:40:08 +0000 (15:40 +0200)]
Remove paragraph tags produced by markdownify

Fixes #1025

10 years agoMake contentTransformer names consistent
bep [Tue, 31 Mar 2015 22:54:26 +0000 (00:54 +0200)]
Make contentTransformer names consistent

10 years agoReturn error on wrong use of the Paginator
bep [Tue, 31 Mar 2015 20:33:24 +0000 (21:33 +0100)]
Return error on wrong use of the Paginator

`Paginate`now returns error when

1) `.Paginate` is called after `.Paginator`
2) `.Paginate` is repeatedly called with different arguments

This should help remove some confusion.

This commit also introduces DistinctErrorLogger, to prevent spamming the log for duplicate rendering errors from the pagers.

Fixes #993

10 years agoAdd pager size argument to paginator methods
bep [Tue, 31 Mar 2015 17:12:54 +0000 (19:12 +0200)]
Add pager size argument to paginator methods

Fixes #1013

10 years agoUpdates documentation with instructions for a Windows computer
mdhender [Tue, 31 Mar 2015 02:42:25 +0000 (21:42 -0500)]
Updates documentation with instructions for a Windows computer

Adds step-by-step instructions for installing from the official
tarball.

Fixes #1007

10 years agoCapitalize singular
Bruno Clermont [Sun, 15 Mar 2015 13:51:16 +0000 (20:51 +0700)]
Capitalize singular

Added in #523 it's ``Data.Singular``

10 years agoUpdates documentation with instructions for a Mac
Michael Henderson [Sun, 29 Mar 2015 04:02:57 +0000 (23:02 -0500)]
Updates documentation with instructions for a Mac

Adds step-by-step instructions for installing from both brew and
the official tarball. Not sure if steps for installing from source
belong here, so left them out.

Fixes #1005

10 years agoUpdate embedded rss.xml code in the docs
sainaen [Sat, 28 Mar 2015 09:41:44 +0000 (11:41 +0200)]
Update embedded rss.xml code in the docs

10 years agoAdd some more corner tests for ReaderContains
bep [Sun, 29 Mar 2015 23:22:08 +0000 (01:22 +0200)]
Add some more corner tests for ReaderContains

10 years agoFix shortcode handling in ToC
bep [Sun, 29 Mar 2015 20:27:14 +0000 (22:27 +0200)]
Fix shortcode handling in ToC

Fixes #1010

10 years agoHandle views in combo with Ace base templates
bep [Sun, 29 Mar 2015 19:12:13 +0000 (20:12 +0100)]
Handle views in combo with Ace base templates

As views looks like a regular template, but doesn't need a base template, we have to look inside it.

Altough really not needed by this commit, reading the full file content into memory just to do a substring search is a waste.
So this commit implements a `ReaderContains` func that in most cases should be much faster than doing an `ioutil.ReadAll` and `bytes.Contains`:

```
benchmark                   old ns/op     new ns/op     delta
BenchmarkReaderContains     78452         20260         -74.18%

benchmark                   old allocs     new allocs     delta
BenchmarkReaderContains     46             20             -56.52%

benchmark                   old bytes     new bytes     delta
BenchmarkReaderContains     46496         1258          -97.29%
```

Fixes #999

10 years agoHash all pygments parameters.
Ruben Vermeersch [Sun, 29 Mar 2015 10:55:46 +0000 (12:55 +0200)]
Hash all pygments parameters.

Ensures that Hugo rehighlights source code whenever one of the
highlighting options changes.

10 years agoUse helpers.FilePathSeparator const
bep [Sat, 28 Mar 2015 20:46:02 +0000 (21:46 +0100)]
Use helpers.FilePathSeparator const

10 years agoFix section name guessing on Windows
Nuno Antunes [Sat, 28 Mar 2015 16:22:34 +0000 (16:22 +0000)]
Fix section name guessing on Windows

10 years agoCache pygments rendering between runs
Ruben Vermeersch [Fri, 27 Mar 2015 16:05:17 +0000 (17:05 +0100)]
Cache pygments rendering between runs

Fixes #1000

10 years agoAdd support for Ace base and inner templates
bep [Thu, 26 Mar 2015 16:22:45 +0000 (17:22 +0100)]
Add support for Ace base and inner templates

Fixes #994
Fixes #511

10 years agoAdd missing ".adoc" extension in handler_page.go
Anthony Fok [Wed, 25 Mar 2015 02:27:06 +0000 (20:27 -0600)]
Add missing ".adoc" extension in handler_page.go

Commit 358dcce supposedly added ".adoc" extension recognition
for AsciiDoc, but one place was missed.

Thanks to @sjfloat for reporting the bug!
See discussions at #470.

10 years agoChange to variadic int args in Slicestr
bep [Mon, 23 Mar 2015 18:18:17 +0000 (19:18 +0100)]
Change to variadic int args in Slicestr

Makes for a better template api.

10 years agoImplement substr template function
Anthony Fok [Mon, 23 Mar 2015 17:23:13 +0000 (11:23 -0600)]
Implement substr template function

Its behavior is similar to that in JavaScript
with special handling of negative length as found in in PHP.

Fixes #991

10 years agoRename Slice to Slicestr
bep [Mon, 23 Mar 2015 15:24:18 +0000 (16:24 +0100)]
Rename Slice to Slicestr

Fixes #990

10 years agoPolish Slice doc
bep [Mon, 23 Mar 2015 11:42:42 +0000 (12:42 +0100)]
Polish Slice doc

10 years agoRename Substr to Slice
bep [Mon, 23 Mar 2015 11:18:34 +0000 (12:18 +0100)]
Rename Substr to Slice

That is whas was implemented, not Substr.

Also make the API more similar to Go's internal slice by making both the start and end indices optional.

See #990

10 years agoPolish Substr and Split tests
bep [Sun, 22 Mar 2015 12:52:35 +0000 (13:52 +0100)]
Polish Substr and Split tests

10 years agoAdd Substr and Split template functions
Xin Fan [Fri, 20 Mar 2015 02:44:53 +0000 (13:44 +1100)]
Add Substr and Split template functions

Both of these can take any type the cast lib can turn into a string.

10 years agoPull Data Files tests into its own file
bep [Thu, 19 Mar 2015 16:23:14 +0000 (17:23 +0100)]
Pull Data Files tests into its own file

10 years agoFormat docs
bep [Thu, 19 Mar 2015 01:09:42 +0000 (02:09 +0100)]
Format docs

10 years agoRename interface contentRewriter to contentTransformer
bep [Thu, 19 Mar 2015 00:55:49 +0000 (01:55 +0100)]
Rename interface contentRewriter to contentTransformer

Is is a much better name.

10 years agoChange safeHTtml to safeHTML in sitemap template
bep [Wed, 18 Mar 2015 20:27:29 +0000 (21:27 +0100)]
Change safeHTtml to safeHTML in sitemap template

10 years agotemplate: add some missing test cases for First
bep [Wed, 18 Mar 2015 19:47:10 +0000 (20:47 +0100)]
template: add some missing test cases for First

10 years agotransform: remove some superfluous int conversions
bep [Wed, 18 Mar 2015 19:18:18 +0000 (20:18 +0100)]
transform: remove some superfluous int conversions

10 years agoRemove URL param from exported AbsURL methods
bep [Wed, 18 Mar 2015 18:42:46 +0000 (19:42 +0100)]
Remove URL param from exported AbsURL methods

This is to make it clear that there is only one URL in play,
the BaseURL.

10 years agoUn-export ContentReWriter
bep [Wed, 18 Mar 2015 16:33:12 +0000 (17:33 +0100)]
Un-export ContentReWriter

10 years agoWrite to rotating ContentReWriter in transformer chain
bep [Tue, 17 Mar 2015 23:36:48 +0000 (00:36 +0100)]
Write to rotating ContentReWriter in transformer chain

This commit adds the interface ContentReWriter in the tranformer chain.

This is backed by two pooled byte buffers, alternating between being the reader or the writer.

This keeps the performance characteristic of the old implementation, but in a thread safe way.

Fixes #911

Benchmark old vs new:

benchmark              old ns/op     new ns/op     delta
BenchmarkAbsURL        17614         17384         -1.31%
BenchmarkXMLAbsURL     9431          9248          -1.94%

benchmark              old allocs     new allocs     delta
BenchmarkAbsURL        24             28             +16.67%
BenchmarkXMLAbsURL     12             14             +16.67%

benchmark              old bytes     new bytes     delta
BenchmarkAbsURL        3295          3424          +3.92%
BenchmarkXMLAbsURL     1954          1987          +1.69%

10 years agoComment out shaky Seq test
bep [Wed, 18 Mar 2015 11:42:00 +0000 (12:42 +0100)]
Comment out shaky Seq test

10 years agoCalculate the next Hugo version in Deprecated
bep [Wed, 18 Mar 2015 11:27:56 +0000 (12:27 +0100)]
Calculate the next Hugo version in Deprecated

Deprecation will be an ongoing activity for many future versions.

10 years agoRefactor Hugo version
bep [Wed, 18 Mar 2015 11:23:13 +0000 (12:23 +0100)]
Refactor Hugo version

Put version handling into the helpers package so it can be used by many,
and split version and suffix to make it possible to calculate the next Hugo version.

10 years agoAdd UrlPath to the deprecated list
bep [Wed, 18 Mar 2015 10:30:23 +0000 (11:30 +0100)]
Add UrlPath to the deprecated list

10 years agoImprove type handling in Seq
bep [Wed, 18 Mar 2015 10:10:04 +0000 (11:10 +0100)]
Improve type handling in Seq

10 years agoUpdate Hugo docs with the initialisms suggested by golint
Anthony Fok [Wed, 18 Mar 2015 06:44:12 +0000 (00:44 -0600)]
Update Hugo docs with the initialisms suggested by golint

In particular:

 * .Url → .URL (for node, menu and paginator)
 * .Site.BaseUrl → .Site.BaseURL
 * getJson → getJSON
 * getCsv → getCSV
 * safeHtml → safeHTML
 * safeCss → safeCSS
 * safeUrl → safeURL

Continued effort in fixing #959.

10 years agoMore initialism corrections (golint)
Anthony Fok [Wed, 18 Mar 2015 05:16:54 +0000 (22:16 -0700)]
More initialism corrections (golint)

Thanks to @bep's new, brilliant helpers.Deprecated() function,
the following functions or variables are transitioned to their
new names, preserving backward compatibility for v0.14
and warning the user of upcoming obsolescence in v0.15:

 * .Url → .URL (for node, menu and paginator)
 * .Site.BaseUrl → .Site.BaseURL
 * .Site.Indexes → .Site.Taxonomies
 * .Site.Recent → .Site.Pages
 * getJson → getJSON
 * getCsv → getCSV
 * safeHtml → safeHTML
 * safeCss → safeCSS
 * safeUrl → safeURL

Also fix related initialisms in strings and comments.

Continued effort in fixing #959.

10 years agoPress: Add "Migrating to Hugo From Octopress" by Nathan LeClaire
Anthony Fok [Wed, 18 Mar 2015 06:32:19 +0000 (00:32 -0600)]
Press: Add "Migrating to Hugo From Octopress" by Nathan LeClaire

10 years ago[Docs] Copyedit http://gohugo.io/extras/dynamiccontent/
Anthony Fok [Wed, 18 Mar 2015 05:53:17 +0000 (23:53 -0600)]
[Docs] Copyedit gohugo.io/extras/dynamiccontent/

10 years agoUse ReaderToString in site tests
bep [Tue, 17 Mar 2015 17:14:29 +0000 (18:14 +0100)]
Use ReaderToString in site tests

Since a string is what's really needed.

10 years agoFix crossrefs on Windows
bep [Tue, 17 Mar 2015 14:38:48 +0000 (15:38 +0100)]
Fix crossrefs on Windows

Have to convert path slashes to file path slashes before the URL path is compared to a file path.

Fixes #957

10 years agoAdd "getenv" as an wrapper for os.Getenv
quoha [Mon, 16 Mar 2015 01:56:20 +0000 (20:56 -0500)]
Add "getenv" as an wrapper for os.Getenv

Add a wrapper for the os.Getenv function. The
wrapper takes as input a string that is assumed to be an exported
variable name.

Fixes #977

10 years agoremoved duplicate word in readme
Vitaly Haritonsky [Sat, 14 Mar 2015 10:58:03 +0000 (12:58 +0200)]
removed duplicate word in readme

10 years agoRevert "Added image support to the sitemap.xml template"
bep [Fri, 13 Mar 2015 23:03:34 +0000 (00:03 +0100)]
Revert "Added image support to the sitemap.xml template"

This reverts commit 3c147bd41922c4f0ac81bc1e1f2ffab8093d5d1c.

Fixes #972

10 years agoAdded image support to the sitemap.xml template
Derek Perkins [Tue, 25 Nov 2014 02:59:26 +0000 (19:59 -0700)]
Added image support to the sitemap.xml template

Conflicts:
tpl/template_embedded.go

10 years agoAdd Seq template func
bep [Tue, 24 Feb 2015 09:56:16 +0000 (10:56 +0100)]
Add Seq template func

Very similar to GNU's seq.

Fixes #552

Conflicts:
tpl/template.go

10 years agoExperimental AsciiDoc support with external helpers
Anthony Fok [Fri, 23 Jan 2015 18:59:14 +0000 (11:59 -0700)]
Experimental AsciiDoc support with external helpers

See #470

 * Based on existing support for reStructuredText files

 * Handles content files with extensions `.asciidoc` and `.ad`

 * Pipes content through `asciidoctor --safe -`.
   If `asciidoctor` is not installed, then `asciidoc --safe -`.

 * To make sure `asciidoctor` or `asciidoc` is found, after adding
   a piece of AsciiDoc content, run `hugo` with the `-v` flag
   and look for this message:

        INFO: 2015/01/23 Rendering with /usr/bin/asciidoctor ...

Caveats:

 * The final "Last updated" timestamp is currently not stripped.

 * When `hugo` is run with `-v`, you may see a lot of these messages

        INFO: 2015/01/23 Rendering with /usr/bin/asciidoctor ...

   if you have lots of `*.ad`, `*.adoc` or `*.asciidoc` files.

 * Some versions of `asciidoc` may have trouble with its safe mode.
   To test if you are affected, try this:

        $ echo "Hello" | asciidoc --safe -
        asciidoc: ERROR: unsafe: ifeval invalid
        asciidoc: FAILED: ifeval invalid safe document

   If so, I recommend that you install `asciidoctor` instead.

Feedback and patches welcome!

Ideally, we should be using https://github.com/VonC/asciidocgo,
@VonC's wonderful Go implementation of Asciidoctor.  However,
there is still a bit of work needed for asciidocgo to expose
its API so that Hugo can actually use it.

Until then, hope this "experimental AsciiDoc support through external
helpers" can serve as a stopgap solution for our community. :-)

2015-01-30: Updated for the replaceShortcodeTokens() syntax change
2015-02-21: Add `.adoc` extension as suggested by @Fale

Conflicts:
helpers/content.go

10 years agoDo not ERROR-log missing /data dir
bep [Thu, 12 Mar 2015 20:44:36 +0000 (21:44 +0100)]
Do not ERROR-log missing /data dir

Fixes #930

10 years agosource: add some test cases for File
bep [Thu, 12 Mar 2015 19:50:44 +0000 (20:50 +0100)]
source: add some test cases for File

10 years agoAdd double checking in Deprecated
bep [Thu, 12 Mar 2015 17:51:31 +0000 (18:51 +0100)]
Add double checking in Deprecated

To prevent possible duplicate log statements.

10 years agoAdd deprecated logger
bep [Thu, 12 Mar 2015 15:10:14 +0000 (16:10 +0100)]
Add deprecated logger

10 years ago[Docs] Update and expand http://gohugo.io/overview/usage/
Anthony Fok [Thu, 12 Mar 2015 14:53:48 +0000 (08:53 -0600)]
[Docs] Update and expand gohugo.io/overview/usage/

The `hugo help` output as shown in http://gohugo.io/overview/usage/
was not yet updated for v0.13. Thanks to @alebaffa for the heads up!

Also:
 - Clarify that, after using `hugo server`, the bare `hugo` command
   need to be run before deployment.
 - Add a section on running `hugo` as production web server,
   and add links to two blog posts of two Hugo users sharing
   their experience.

Partially fixes: #852 and #937

10 years agoUpdate press coverage: Fix URL; new tutorial in Chinese
Anthony Fok [Thu, 12 Mar 2015 14:50:31 +0000 (08:50 -0600)]
Update press coverage: Fix URL; new tutorial in Chinese

10 years agoRemove trailing space from site build statistics
Anthony Fok [Thu, 12 Mar 2015 14:46:42 +0000 (08:46 -0600)]
Remove trailing space from site build statistics

10 years agoCorrect initialisms as suggested by golint
Anthony Fok [Wed, 11 Mar 2015 17:34:57 +0000 (11:34 -0600)]
Correct initialisms as suggested by golint

First step to use initialisms that golint suggests,
for example:

    Line 116: func GetHtmlRenderer should be GetHTMLRenderer

as see on http://goreportcard.com/report/spf13/hugo

Thanks to @bep for the idea!

Note that command-line flags (cobra and pflag)
as well as struct fields like .BaseUrl and .Url
that are used in Go HTML templates need more work
to maintain backward-compatibility, and thus
are NOT yet dealt with in this commit.

First step in fixing #959.

10 years agodoArithmetic: add test for division by zero
bep [Wed, 11 Mar 2015 09:25:53 +0000 (10:25 +0100)]
doArithmetic: add test for division by zero

10 years agoAdd some basic tests for doArithmetic
bep [Wed, 11 Mar 2015 00:29:18 +0000 (01:29 +0100)]
Add some basic tests for doArithmetic

We might have to take precision into account for floating point nubers ... at some point.

10 years agoSkip directories like node_modules from the watchlist
Anthony Fok [Tue, 10 Mar 2015 22:55:23 +0000 (16:55 -0600)]
Skip directories like node_modules from the watchlist

A local `node_modules` directory can easily contain
tens of thousands of files, easily exhausting the tiny
default max open files limit especially on OS X Yosemite,
in spite of the fact that  Hugo already had code in place
since February 2014 to try to raise the maxfiles ulimit.

Also skip `.git` and `bower_components` directories.

The file watching situation will improve when
https://github.com/go-fsnotify/fsevents become ready,
but until then, we will be thrifty.  :-)

Thanks to @chibicode for the suggestion.

See #168 for continued discussions.