322 Commits

Author SHA1 Message Date
Anthony Fok
31a8a33dda Add safeUrl; disable safeHtmlAttr; rename safeCSS to safeCss
- Add `safeUrl` template function (Fixes #347)
- Add TestSafeUrl() fashioned after @tatsushid great examples
- Disable `safeHtmlAttr` pending further discussions on its other
  use cases because `safeUrl` is a cleaner solution to #347.
  (There are also `safeJs` and `safeJsStr` that we could implement
  if there are legitimate demands for them.)
- Rename `safeCSS` to `safeCss` (to follow the convention of `safeHtml`)
- Add/expand documentation on `safeHtml`, `safeCss` and `safeUrl`
2015-01-19 23:41:22 -07:00
Anthony Fok
360944bbb5 Revert "[Docs] Use <dl> for definition lists of variables"
This reverts commit 5d6dfe81b8c78d86fad677b4ba452b7bcf52aed9.

The extra styling in docs/static/css/style.css has been retained.
2015-01-19 11:44:14 -07:00
Anthony Fok
5360e6222e [Docs] New testimonials and press coverage
Found on @spf13's Twitter.  :-)

Prevent the testimonial dates from wrapping.

Also fix a few minor problems to get the home page
to validate as proper HTML5.
2015-01-19 04:16:54 -07:00
Anthony Fok
53d955ccfe [Docs] Limit .fa { display: inline } within #main-content
Otherwise the items in the side menu won't line up.
Sorry about this oversight in my recent commit.
2015-01-19 02:49:50 -07:00
Anthony Fok
4b486c4383 [Docs] Add FreeBSD logo beside the FreeBSD name
Extracted from https://www.freebsd.org/logo/logo-simple.svg
for temporary use until a future Font Awesome release adds
the `fa-freebsd` glyph (github/FortAwesome/Font-Awesome#1116)  :-)

Make .fa `display: inline` to prevent unwanted line-wrapping

Also make the menu item "Issue & Help" line up with the others.
2015-01-19 02:48:44 -07:00
Anthony Fok
11310eb86b [Docs] Use <dl> for definition lists of variables
Hopefully making them more semantic and easier to read,
though it is raw HTML so it is slightly more work to maintain.

Also made minor revisions to some of the variable descriptions
to be more informative, e.g. `:monthname` in permalinks use
full English names ("January" etc.)
2015-01-19 01:30:38 -07:00
bep
934d6cf8c0 Fix broken doc section 2015-01-19 08:14:57 +01:00
bep
69a245d50c Update release notes with the new Hugo var 2015-01-19 02:58:27 +01:00
bep
afc80c9a75 Merge branch 'master' of github.com:spf13/hugo 2015-01-19 02:41:16 +01:00
Derek Perkins
4666091180 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
Anthony Fok
7384d46df6 [Docs] Minor revisions to future v0.13 Release Note
And a tiny bit of copyediting here and there.
2015-01-18 13:27:09 -07:00
Anthony Fok
de139e67e7 [Docs] New "Troubleshooting Overview" page
Somewhat cheesy at the moment.
Pull requests to improve the page are very welcome!
2015-01-18 13:27:09 -07:00
bep
4fd126e58a Add trim and replace to release notes 2015-01-18 15:18:03 +01:00
Tom Helmer Hansen
41e60abcec Add trim and replace template functions 2015-01-18 14:54:26 +01:00
Anthony Fok
a935f49b0c 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
7ea228d6d8 Update gohugo.io front page for 2015; add @popthestack's testimony :-) 2015-01-17 13:07:54 -07:00
Anthony Fok
ac2f3a868f [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
c96ba38442 [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
94cf23951c Missing . on footer partials 2015-01-16 03:39:38 -07:00
bep
e7fa32c759 First take on release notes for 0.13 2015-01-14 13:54:38 +01:00
Anthony Fok
0cabe8abd4 Add an alias to the old URL of github-pages-blog.md 2015-01-13 21:24:58 -07:00
Anthony Fok
defb29772e Rename github_pages_blog.md to github-pages-blog.md 2015-01-13 21:19:20 -07:00
Anthony Fok
829e2cdf55 [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
1a014e6aac 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
30f93fdaf4 Tutorial: Automated deployments
Also fixed the next/prev for the tutorials
2015-01-12 22:59:14 -07:00
Anthony Fok
96b8dceb9b [Docs] Remove references to "ATOM" feeds
Thanks to @snej for reporting!

Fixes #790
2015-01-12 14:12:08 -07:00
David Kebler
6d10b8d953 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
46154cd101 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
Anthony Fok
57995fbb14 [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
2ba0cd9a9f Google Custom Search: Open link in _parent 2015-01-08 13:42:16 +01:00
Anthony Fok
458f02b4dd Add basic Google Custom Search to Hugo docs
Fixes #753
2015-01-08 00:17:01 -07:00
Jacob Gillespie
e3c1cc446e Rename to plainIdAnchors 2015-01-05 21:00:22 +01:00
Jacob Gillespie
a9fb5cffff Add Blackfriday: documentIDAnchor documentation 2015-01-05 21:00:22 +01:00
philgs
e1cf655ff2 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
a69cbde25f 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
57d7ee2413 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
Dave Johnston
ad0eb36029 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
Tatsushi Demachi
be81381358 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
24cad7f6c5 Implement apply.
- apply seq fn args…
2015-01-02 11:50:22 +01:00
Austin Ziegler
f05fa024f7 Add a chomp function.
- Mostly useful in pipelines.
2015-01-02 11:50:22 +01:00
Tom Helmer Hansen
c3e212b9f6 Fix EOF 2014-12-30 12:28:19 -07:00
Tom Helmer Hansen
d27f89080a Add www.thehome.dk to showcase 2014-12-30 12:28:19 -07:00
Tatsushi Demachi
8667c39158 Make 'where' template function accepts dot chaining key argument
'where' template function used to accept only each element's struct
field name, method name and map key name as its second argument. This
extends it to accept dot chaining key like 'Params.foo.bar' as the
argument. It evaluates sub elements of each array elements and checks it
matches the third argument value.

Typical use case would be for filtering Pages by user defined front
matter value. For example, to filter pages which have 'Params.foo.bar'
and its value is 'baz', it is used like

    {{ range where .Data.Pages "Params.foo.bar" "baz" }}
        {{ .Content }}
    {{ end }}

It ignores all leading and trailing dots so it can also be used with
".Params.foo.bar"
2014-12-29 12:53:41 +01:00
Anthony Fok
37d3646de8 [Docs] Mention support for the Ace HTML Template Engine 2014-12-27 00:58:50 -07:00
Anthony Fok
b26f855dd9 Docs copyediting: Add more external URLs; add backticks, etc. 2014-12-27 00:50:08 -07:00
Anthony Fok
292b8eb777 [Docs] Go 1.4+ required for building on Windows
See Issue #688 for more information.
2014-12-26 13:00:14 -07:00
bep
420ada28c9 Add anchor ref to Blackfriday doc 2014-12-26 18:11:05 +01:00
bep
c60ea3267a Add doc for Blackfriday configuration
See #686
2014-12-26 16:04:49 +01:00
Anthony Fok
63b7db7f1c Typo fix: "simple" → "simply" in templates/views.md
Thanks to @paulsullivan for catching that typo!
2014-12-24 16:58:28 -07:00
Anthony Fok
d248e59a11 Minor copyediting, no new content added. 2014-12-24 04:59:53 -07:00