Quote from @spf13: "I also think it's the better default
and should continue to be the case going forward."
Also mention the use of `hugo config` to check the current value
of `canonifyurls`, thanks to suggestion by @bep.
Fixes#802
- Clarify that Hugo may be built wherever Go is available;
- Add links to Git, Mercurial and Go;
- Unlist Bazaar: No libraries that Hugo depends on use it any more;
- Suggest the user to simply run `make` to build `hugo`
to get `hugo version` to display the commit hash.
Some variables are currently not documented and others are explained
across the document. So, I tried to pull an overview from the source.
Pls double check. I am not 100% sure, what the purpose of some variables
is or whether they are only relevant for previous versions. Thanks
* Add meta author, description and generator tags
* Add Hugo version beside the logo and in the footer
* Suggest the user to run `go get -u -v` to update dependencies
* Requires Go 1.3+ rather than Go 1.1+
* Improve rendering/formatting in some places
* Add trailing slash to URLs where appropriate
* GitHub redirects all http requests to https, update accordingly
Make Blackfriday's `HTML_SMARTYPANTS_FRACTIONS` option
user-configurable. Defaults to `true` as before. See
discussions at:
http://discuss.gohugo.io/t/any-way-to-disable-smart-fractions/328
Thanks to @bjornerik and @spf13 for laying the groundwork
making it easy to expose Blackfriday's underlying configurable
options.
canonifyUrls=true, RelPermalink and baseUrl with sub-path did not work.
This fixes that by adding a check for canonifyUrl=trues=true in RelPermalink().
So given
- baseUrl "http://somehost.com/sub/"
- the path "some-path/file.html"
For canonifyUrls=false RelPermalink() returns "/sub/some-path/file.html"
For canonifyUrls=true RelPermalink() returns "/some-path/file.html"
In the last case, the Url will be made absolute and clickable in a later step.
This commit also makes the menu urls defined in site config releative. To make them work with canonifying of urls, the context root is prepended if canonifying is turned off.
Fixes#519Fixes#711
- 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`
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.
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.
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.)
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
* 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
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".
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.
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.
- 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.
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)
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.
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