Commit graph

90 commits

Author SHA1 Message Date
Rick Cogley
6b5ed88cde Edits on aliases, comments, theme customizing
Fleshed out aliases section, loading the "redirect" keyword so that it's easier to find. Specifically added a "how aliases work" section.

Added Discourse to comments section.

Fleshed out themes/customizing, because it seems to be the source of a lot of questions on the forum.
2015-05-16 15:38:18 +02:00
Rick Cogley
6453bb5838 Edit docs extras syntax highlighting.md
Added a bunch of clarifying narrative, looking at the discussion forum for what people are asking about, and what I myself was confused about.

* clearer separation of advantage of each style - server or client side - at the top
* inconsistent newlines (different column widths) so I just removed them from obvious paragraphs
* added that the highlight shortcode is not used for the client-side javascripts
* Hugo is taking crap for Pygments being slow, so tried to emphasize that's it's in Pygment's lap. I got your back, Hugo.
* On client-side added prism example
* More clarity on how the css and js needs to be added to your templates
* Explained how the client-side scripts work
2015-05-16 15:31:16 +02:00
bep
be72f234f8 docs: Use ToC length to pick the compact version 2015-05-11 22:23:35 +02:00
bep
be4f48652d Add ToC to long pages
* A compact, fixed box in the right screen
* Only for big screens, > 1200 px wide
2015-05-11 18:39:42 +02:00
bep
be0c1bfe13 Add docs for Section Menu for “the Lazy Blogger” 2015-05-10 16:18:19 +02:00
bep
be01f8430e Add shortcut to Scratch from shortcode 2015-04-19 14:50:27 +02:00
bep
bef25432d1 doc: clarify Scratch usage in shortcodes 2015-04-19 11:30:11 +02:00
bep
be24457acf Add more options to highlight
Fixes #1021
2015-04-15 20:31:06 +02:00
Florian Baumann
0fcb78e43b 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!
2015-04-10 22:45:22 -06:00
bep
72aa516c75 documentation: mention data files under liverload 2015-04-01 23:26:33 +02:00
bep
bec22f8981 Add pager size argument to paginator methods
Fixes #1013
2015-03-31 19:12:56 +02:00
Anthony Fok
b3bd71fec9 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.
2015-03-18 11:30:37 +01:00
Anthony Fok
a220a3ba37 [Docs] Copyedit http://gohugo.io/extras/dynamiccontent/ 2015-03-17 23:53:17 -06:00
bep
ab5862cd00 Allow the same shortcode to be used with or without inline content
Fixes #934
2015-03-02 21:49:33 +01:00
Anthony Fok
88e7c031a8 [Docs] Clarify the switch to canonifyurls = false as default
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
2015-02-21 14:50:14 -07:00
karland
e31536dd85 Add information to highlighting with Payments
Conflicts:
	docs/content/extras/highlighting.md
2015-02-17 12:35:39 -05:00
Cyrill Schumacher
41c0e82f95 Moved futured getSQL topic to another branch 2015-02-17 12:14:39 -05:00
Cyrill Schumacher
b209f44335 getJson and getCsv documentation proof reading by @msjulias 2015-02-17 12:14:39 -05:00
Cyrill Schumacher
4342dd84fc Update Dynamic Content docs 2015-02-17 12:14:39 -05:00
Cyrill Schumacher
48a6d44786 Update doc 2015-02-17 12:14:39 -05:00
Cyrill Schumacher
47b7cfeb44 Add getSQL idea 2015-02-17 12:14:39 -05:00
Cyrill Schumacher
fdf8db9c21 Initial doc file: Dynamic Content 2015-02-17 12:14:39 -05:00
Anthony Fok
cb9fa62743 [Docs] Minor copyediting of highlighting.md
Also add `apt-get` command for installing Pygments.
2015-02-17 01:59:40 -07:00
karland
bd0de85dbc Add information to highlighting with Pygments 2015-02-17 01:49:44 -07:00
Joseph Kaptur
462e666f45 Update docs so that figure includes the class parameter. 2015-02-14 18:35:00 -05:00
bep
4820683330 Doc Data Files: Add section about themes and expanded the example a bit 2015-02-12 09:09:35 +01:00
bep
371c148c34 Fix alias for data files doc 2015-02-09 16:58:12 +01:00
bep
03fff880ec Add docs for Data Files
Fixes #887
2015-02-09 16:52:52 +01:00
bep
dd9344816a Scratch doc: Use the special $ variable to prevent confusion 2015-02-01 20:36:43 +01:00
bep
f264076f66 Add doc for Scratch 2015-01-31 22:01:30 +01:00
Anthony Fok
ba44e860a3 [Docs] Copyediting
* 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
2015-01-28 18:02:40 -07:00
bep
0b5f8c8cb3 [doc] Improve paginator doc 2015-01-27 21:56:45 +01:00
bep
fb594fc6e0 Set detault for Paginate to 10
10 is a better default than 0, since no paginator pages will be created unles referenced by a `.Paginator`.

See #750
2015-01-26 15:26:19 +01:00
bep
a6d22bcf7d Add documentation for pagination
See #750
2015-01-26 14:56:26 +01:00
Naoya Inada
57b4f3310b Fix inverse notation 2015-01-25 00:13:10 -07:00
bep
1b42dc572a Fix RelPermalink() and Urls in menus vs canonifyUrls
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 #519
Fixes #711
2015-01-23 14:13:00 +01:00
Anthony Fok
743998306a [Docs] Document the new (temp?) default of canonifyurls = false
Also add a **Caveat** on http://gohugo.io/tutorials/github-pages-blog/
warning the reader that a `canonifyurls = true` must be added
for Spencer's old example files to work.

Fixes #802
2015-01-22 18:04:07 -07:00
Anthony Fok
53b4ab4cf3 Revert "[Docs] Use <dl> for definition lists of variables"
This reverts commit 5d6dfe81b8.

The extra styling in docs/static/css/style.css has been retained.
2015-01-19 11:44:14 -07:00
Anthony Fok
5d6dfe81b8 [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
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
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
Anthony Fok
ddf4190114 Docs copyediting: Add more external URLs; add backticks, etc. 2014-12-27 00:50:08 -07:00
Anthony Fok
68cea07072 Minor copyediting, no new content added. 2014-12-24 04:59:53 -07:00
Austin Ziegler
fd33e5d202 Documentation for ref and relref.
- Rejigged the weight of the extras/ content for the new crossreferences
  page.
- Used the new {{</*…*/>}} format for documenting highlighting and to
  prevent a warning about the missing `fig` shortcode.
2014-12-18 22:18:37 -05:00
Anthony Fok
a6d3862b87 Docs: Minor copyediting/proofreading
- Correct some typos
- Add backticks and commas where necessary
- Use fenced code blocks specifying "bash" as the language
  to avoid weird highlighting
- Place commas outside of quotation marks surroundingn codes
  to avoid possible confusion
- Suggest users to use the discussion forum rather than the
  mailing list
2014-12-08 22:44:30 +01:00
bep
728d0fa32c Update shortcode doc for 0.13-DEV
Update of the doc to reflect the shortcode  implemention in HEAD.
2014-11-18 12:26:33 -05:00
ls6
bcaf33418f Update shortcodes.md
A typo resulting in a broken link.
2014-11-18 10:15:05 -05:00
bep
55fcd2f30f Shortcode rewrite, take 2
This commit contains a restructuring and partial rewrite of the shortcode handling.

Prior to this commit rendering of the page content was mingled with handling of the shortcodes. This led to several oddities.

The new flow is:

1. Shortcodes are extracted from page and replaced with placeholders.
2. Shortcodes are processed and rendered
3. Page is processed
4. The placeholders are replaced with the rendered shortcodes

The handling of summaries is also made simpler by this.

This commit also introduces some other chenges:

1. distinction between shortcodes that need further processing and those who do not:

* `{{< >}}`: Typically raw HTML. Will not be processed.
* `{{% %}}`: Will be processed by the page's markup engine (Markdown or (infuture) Asciidoctor)

The above also involves a new shortcode-parser, with lexical scanning inspired by Rob Pike's talk called "Lexical Scanning in Go",
which should be easier to understand, give better error messages and perform better.

2. If you want to exclude a shortcode from being processed (for documentation etc.), the inner part of the shorcode must be commented out, i.e. `{{%/* movie 47238zzb */%}}`. See the updated shortcode section in the documentation for further examples.

The new parser supports nested shortcodes. This isn't new, but has two related design choices worth mentioning:

* The shortcodes will be rendered individually, so If both `{{< >}}` and `{{% %}}` are used in the nested hierarchy, one will be passed through the page's markdown processor, the other not.
* To avoid potential costly overhead of always looking far ahead for a possible closing tag, this implementation looks at the template itself, and is branded as a container with inner content if it contains a reference to `.Inner`

Fixes #565
Fixes #480
Fixes #461

And probably some others.
2014-11-17 18:32:06 -05:00
Justin Calleja
11ddc308e3 Fix for issue 583 2014-11-01 23:10:52 -04:00
Joel Scoble
d4ed59198a added note about pygment example code and markdown processing, updated example 2014-11-01 22:58:44 -04:00