Commit graph

888 commits

Author SHA1 Message Date
bep 73d923e95d Fix HugoInfo init
See #570
2015-01-19 02:40:34 +01:00
Derek Perkins ac6b86aff8 Added top level .Hugo variable with version, commit and generator information + docs
Added Version, CommitHash and BuildDate to hugolib/hugo.go and used it in build
Removed commitHash and buildDate from commands/version.go and used hugolib vars
Removed getDateFormat function from commands/version.go

Conflicts:
	README.md
	docs/content/templates/variables.md
2015-01-19 01:22:23 +01:00
bep 90afe41e49 Add trim and replace to release notes 2015-01-18 15:18:03 +01:00
bep 4f4015d751 Make all the params to Replace an interface{} 2015-01-18 15:16:48 +01:00
Tom Helmer Hansen e08cabadb6 Rewrite first argument to interface{} 2015-01-18 14:54:26 +01:00
Tom Helmer Hansen 871e811339 Add trim and replace template functions 2015-01-18 14:54:26 +01:00
Anthony Fok 32d15d91fc Change CR+LF to LF on gohugo.io front page, saving 286 bytes
Also change mode 100755 to 100644.
2015-01-17 13:24:35 -07:00
Anthony Fok af956c41a3 Update gohugo.io front page for 2015; add @popthestack's testimony :-) 2015-01-17 13:07:54 -07:00
Anthony Fok b59dd163ec [Docs] More copyediting
* Add link to https://travis-ci.org/spf13/hugo
* Correct heading levels in docs/content/community/mailing-list.md
* Mention RFC 3339 as the `date` format set by `hugo new`
* Mention that `hugo new` does not add `draft = true` when the user
  provides an archetype
* List short examples of TOML and YAML side by side
* Compact the Math template functions into a table
* Put some notes into a blockquote
2015-01-17 00:45:53 -07:00
Anthony Fok 769ab9e224 [Docs] Adjust sidebar menu width and capitalization
Make the sidebar menu slightly wider so the arrow
does not get pushed to the next line.

Also remove `text-transform: capitalize;` so we can have,
e.g., "Table of Contents" rather than "Table Of Contents".
2015-01-17 00:11:17 -07:00
Tomas Roos a4da52622c Missing . on footer partials 2015-01-16 03:39:38 -07:00
Anthony Fok 508788e694 Update TestFixUrl() to expect BaseUrl to have trailing /
See #793, #799
2015-01-16 03:16:36 -07:00
Bjørn Erik Pedersen 3a9300ddc4 Merge pull request #798 from bjornerik/fix/nestedshortcodes
Fix issue with nested shortcodes
2015-01-16 11:06:17 +01:00
Anthony Fok 1cbdd3e59d Ensure that BaseUrl used in hugo server ends with /
Fixes #793, #799
2015-01-15 18:02:19 -07:00
bep 714abd5ce0 Fix issue with nested shortcodes
Fixes #797
2015-01-15 12:21:15 +01:00
Anthony Fok 9150a98f3e Replace if with with in embedded rss.xml
... resulting in a slightly more compact template.
2015-01-14 21:05:13 -07:00
Anthony Fok 208086ebff Add ".swx" suffix to file watcher's ignore list
When a user uses Vim to open a file, it briefly creates a
".filename.md.swx" file which needlessly triggers a website rebuild.

According to a comment in Vim's src/memline.c:

    /*
     * on MS-DOS compatible filesystems (e.g. messydos) file.doc.swp
     * and file.doc are the same file. To guess if this problem is
     * present try if file.doc.swx exists. If it does, we set
     * buf->b_shortname and try file_doc.swp (dots replaced by
     * underscores for this file), and try again. If it doesn't we
     * assume that "file.doc.swp" already exists.
     */
2015-01-14 19:29:56 -07:00
bep f0b3979a9f Disable shortcode processing for html files
May be enabled later, but then it will have to do the complete "shortcode dance".

See ##674
2015-01-14 20:49:43 +01:00
bep 4f66acdce7 First take on release notes for 0.13 2015-01-14 13:54:38 +01:00
Anthony Fok fc39019ffe Add an alias to the old URL of github-pages-blog.md 2015-01-13 21:24:58 -07:00
Anthony Fok 433ce3b742 Rename github_pages_blog.md to github-pages-blog.md 2015-01-13 21:19:20 -07:00
Anthony Fok 4107fd50a8 [Docs] More random revision and copyediting
General revisions to (hopefully) make the documentation
easier to understand and more comprehensive.

Revise "Strange EOF error" troubleshooting page to say that
a fix is in place for the upcoming Hugo v0.13.

Also add more external links, and cute icons from Font Awesome.
2015-01-13 20:48:44 -07:00
Dan Hersam 6fda9012d6 Fixed error in tutorial, added site variable docs
While following the github pages tutorial I found some issues. These are
the commands I ran that worked.

Added site variables to the docs from the code.
2015-01-12 23:00:28 -07:00
Arjen Schwarz 6c5a7b7b64 Tutorial: Automated deployments
Also fixed the next/prev for the tutorials
2015-01-12 22:59:14 -07:00
Anthony Fok 700c2b8f22 Trivial fixes to get RSS 2.0 feeds to validate.
RSS 2.0 requires the email be listed in `<author>`,
and `UTC` as a timezone is not accepted, but `UT` or `GMT` are.

See #789 for more information.  Thanks to @snej for the report!
2015-01-12 22:24:37 -07:00
Anthony Fok 5bfc812dc6 [Docs] Remove references to "ATOM" feeds
Thanks to @snej for reporting!

Fixes #790
2015-01-12 14:12:08 -07:00
Anthony Fok 6ee35f654f Correct typo in hugolib/path_separators_windows_test.go 2015-01-12 13:15:04 -07:00
Anthony Fok a4eef4eb16 Correct spelling of two test files: seperators → separators 2015-01-11 02:21:51 -07:00
Tatsushi Demachi 78e9229c52 Fix "hugo new" EOF error with an archetype file without the final EOL
This rewrites `extractFrontMatterDelims` function to make it work with
an archetype file without the final EOL and adds more detailed error
messages and comments.

It also removes `matches` and `matches_quick` functions which aren't
called anywhere.
2015-01-10 19:48:35 +01:00
David Kebler b6ab661893 note in archetype.md to alert that ending carriage return may be nessary to avoid EOF errors. 2015-01-09 22:08:35 +01:00
Anthony Fok b0181e278b Some more random copyediting of Hugo docs
- Change "livereload" and "live reload" to "LiveReload";
 - Add a `$ ` prompt before example command lines
   (not exhaustive, work in progress);
 - Remove unnecessary whitespace from partials;
 - Revise the blackfriday options table in overview/configuration.md
   to make it narrower.
 - Manually set the language for highlight.js where appropriate
 - Rename "404" to "Custom 404 page", and remove incorrect reference
   to "homepage"
 - Credit the author of tutorials/github_pages_blog.md
   (Similar notes are necessary for other contributed pages where
    "I" am not spf13 to avoid reader confusion.)
 - Add CSS for `kbd` and `table` etc. to css/style.css;
 - etc.
2015-01-09 11:51:15 -07:00
Marek Stanley 49f5eb5c84 Moved a test regarding a content.go function to a new test file content_test.go.
Added some tests for general helpers, especially as a way to document the expected behavior,
and as a warm-up welcome contribution.
2015-01-09 12:42:13 +01:00
bep 2b46f3e51e Do not exit server watch on error
Before this commit any error (typically a YAML typing error in front matter) would exit server on rebuild when running `hugo server -w`.

This is very annoying as it doesn't give you any chance to fix the typo other than doing a manual restart.

This commit fixes that by just logging these errors when these rebuilds happen when changes are detected.

Fixes #781
2015-01-09 12:40:48 +01:00
Anthony Fok 190964c57b [Docs] New Troubleshooting section
With two entries of frequently encountered or obscured troubles so far:

- "Categories with accented characters" Unicode NFC/NFD mismatch
   on Mac OS X (See #739)
- `hugo new` aborts with cryptic EOF error (See #776)
2015-01-08 18:29:05 -07:00
bep cb909cde5a Google Custom Search: Open link in _parent 2015-01-08 13:42:16 +01:00
Anthony Fok eba33459dd Add basic Google Custom Search to Hugo docs
Fixes #753
2015-01-08 00:17:01 -07:00
Tatsushi Demachi d12f6cd775 Fix echoParam template function to accept string key name
This changes `echoParam` template function behavior to accept not only
an array or a slice and its index pair but also a map and its key pair.

This also changes the function that float and uint values are treated as
a valid result type of it.

Fix #771
2015-01-08 02:32:17 +01:00
Jacob Gillespie c0f54aefe3 Rename to plainIdAnchors 2015-01-05 21:00:22 +01:00
Jacob Gillespie a0e44bb71d Add Blackfriday: documentIDAnchor documentation 2015-01-05 21:00:22 +01:00
Jacob Gillespie 4adf58cce7 Group both options under Blackfriday: documentIDAnchor 2015-01-05 21:00:22 +01:00
Jacob Gillespie b7716948bc Add config options: disable footnote anchor prefix and header ID suffix
New config options:

* DisableFootnoteAnchorPrefix - bool - default: false
* DisableHeaderIDSuffix - bool - default: false
2015-01-05 21:00:22 +01:00
philgs dca6eabaca Add config file example to variables.md
Add a config file example for setting .Site.Params to variables.md. This addresses my confusion in [issue #766](https://github.com/spf13/hugo/issues/766).
2015-01-05 18:51:36 +01:00
philgs 0b7392b3db Update configuration.md
Update configuration.md to show setting variables for .Site.Params in TOML config file
2015-01-05 18:51:36 +01:00
philgs e6c27f76aa Add example code to Summaries
I was initially confused about how to use summaries. The only example code I found in the docs was on the page for list nodes, but that uses `Render "summary"`, which is for views, not an article summary. I thought a little example here might clarify the issue for future users.
2015-01-05 18:44:25 +01:00
Nathan Youngman d376314763 use fsnotify 0.9.3
This contains a few fixes (v0.9.1 through v0.9.3) but the same API and few internal changes.

https://github.com/go-fsnotify/fsnotify/blob/master/CHANGELOG.md#v093--2014-12-31

A good first step before switching to v1.
2015-01-05 18:31:51 +01:00
Dave Johnston a5f5106154 Add in-section Next/Prev content pointers
Conflicts:
	docs/content/meta/release-notes.md
	docs/content/templates/variables.md
2015-01-05 18:26:09 +01:00
bep 837922d32b Add ERROR logging on invalid date and publishdate
Having correct dates is important in Hugo. Previously date parsing errors were swallowed, leading to confusing results.

This commit adds ERROR logging when date or publishdate in front matter cannot be parsed into a time.Time.
2015-01-05 12:44:41 +01:00
Tatsushi Demachi 0d17ee7ed4 Add operator argument to where template function
It allows to use `where` template function like SQL `where` clause.
For example,

    {{ range where .Data.Pages "Type" "!=" "post" }}
        {{ .Content }}
    {{ end }}

Now these operators are implemented:

    =, ==, eq, !=, <>, ne, >=, ge, >, gt, <=, le, <, lt, in, not in

It also fixes `TestWhere` more readable
2015-01-04 12:15:17 +01:00
Austin Ziegler ae9c25afc0 Implement apply.
- apply seq fn args…
2015-01-02 11:50:22 +01:00
Austin Ziegler 6033abe1e7 Add a chomp function.
- Mostly useful in pipelines.
2015-01-02 11:50:22 +01:00