Commit graph

57 commits

Author SHA1 Message Date
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
Anthony Fok
ca7007bf26 Minor proofreading corrections to Hugo docs
- Add backticks and commas where necessary
- Remove some trailing whitespace
- Add front matter example in TOML
- Fix typo in one of the tags in Showcase
- Add 多说 (Duoshuo) as an alternative to Disqus
- Use internal links (i.e. without gohugo.io) where possible
- Use a colon to set off an example
- Change "it's" to "its" where appropriate
- Use typographical (i.e. curly) apostrophe on the front page
  where appropriate
- Capitalize "Github" as "GitHub"
2014-10-15 12:18:20 -04:00
Jorin Vogel
eeaf343a14 Mention .Params and .Page variables in shortcode docs. Also highlight variables. 2014-10-02 13:53:36 -04:00
Kartik Singhal
879e90dca7 Switch to new hompage 2014-10-02 13:39:59 -04:00
Kartik Singhal
3060307085 Make highlight.js example clearer
Provide the missing step to actually use the library. Should be helpful for a newbie.
2014-09-24 14:56:44 -04:00
rybi
1a0dc0b936 Update urls.md
Corrected the --uglyUrls flag, wouldn't work if lowercase.
2014-09-18 13:06:02 -04:00
Anthony Fok
5dd3eaabee More proofreading and minor revisions to Hugo docs
Among the various changes, most instances of

    {{ template "partials/FILE.html" . }}

were changed to

    {{ partial "FILE.html" . }}

Also, in main.go, change "2013" to "2013-14".
2014-09-08 11:41:10 -04:00
Anthony Fok
a6022293af Minor proofreading corrections to Hugo docs 2014-09-01 08:19:40 -04:00
Jakub Turski
7de320920c Shortcodes are content files specific.
This fixes spf13/hugo#440.
2014-08-28 12:59:52 -04:00
spf13
294222ac74 Fixing a broken link in the docs 2014-08-25 14:02:39 -04:00
Rahul Bansal
6e15f652bd Added yaml menu example
Added yaml menu example, matching with existing toml example. Also added link to sitewide config page.
2014-08-18 11:30:00 -04:00
Nate Finch
1778f28c87 remove extraneous "Because" 2014-08-06 05:39:58 -04:00
Nate Finch
f556cb4414 update docs for permalinks with all fields
List all the fields and what they mean, based on hugolib/permalinks.go
2014-08-06 00:05:40 -04:00
Michael Whatcott
406233f052 Included instructions for omitting disqus comments on localhost. 2014-06-30 14:55:42 -04:00
spf13
05875153bc Converting front matter to YAML 2014-05-29 18:45:22 -04:00
spf13
012823a32a Update menu documentation to be accurate 2014-05-29 18:45:21 -04:00
spf13
a87f171bd4 Updating / Rewriting / Adding all of the documentation in preparation for the next release 2014-05-27 18:32:57 -04:00
spf13
b520f8852d Switching docs highlighting to highlight.js .. Docs build super fast again! 2014-05-15 09:58:55 -04:00
LK4D4
2194cc77de Add pygmentsstyle and pygmentsuseclasses options
Fixes #204

Conflicts:
	commands/hugo.go
2014-05-09 23:20:11 -04:00
spf13
ec4b152678 Fixing broken link. Fixed #278. 2014-05-09 11:32:06 -04:00
spf13
9b192e6793 Adding more information about client side highlighting 2014-05-09 00:03:42 -04:00
Dave Cottlehuber
bc9f69e7c5 Add client-side syntax highlighting example 2014-05-08 23:45:33 -04:00
spf13
11fe227b9e Implementing new menu system in the docs site 2014-04-23 03:00:11 -04:00
Michael D. Johas Teener
4161d542ce Misc doc fixes
* Pygments links and requirements for installation.
  * Fix to link to additional template functions in release notes for
v0.10
2014-04-08 11:30:11 -04:00
spf13
64572d2d60 Shortcode cleanup. Added a ton of tests. Much more flexible with input. Doesn't crash with bad input. Fixed #193
Also added the .Get function to short codes and documentation for that function.
2014-02-25 23:57:31 -05:00
spf13
8fe78f6ff5 A bunch of small documentation changes 2014-02-21 09:48:37 -05:00
spf13
de05a0d942 Adding documentation on Pretty Urls 2014-02-20 19:04:29 -05:00
spf13
e74d1b8607 Adding documentation on Table of Contents functionality 2014-02-20 19:04:08 -05:00
spf13
1bead0ed7a Adding Documentation on using Syntax Highlighting 2014-02-18 18:35:45 -05:00
spf13
bf6407759b Minor Docs Tweaks 2014-02-18 18:35:03 -05:00
spf13
18b9948f1e Using table of contents within the documentation. 2014-01-28 23:29:05 -05:00
Phil Pennock
438c219892 Add canonifyurls config option.
Be able to inhibit AbsURL canonicalization of content, on a site
configuration basis. Advantages of being able to inhibit this include
making it easier to rendering on other hostnames, and being able to
include resources on http or https depending on how this page was
retrieved, avoiding mixed-mode client complaints without adding latency
for plain http.
2014-01-13 10:06:12 -05:00
spf13
2ff108fcb7 Add highlighting of code in documentation and clean up a bunch of the docs. 2014-01-10 21:29:58 -05:00
spf13
f09505a657 Adding example short codes to the documentation 2013-12-10 22:34:13 -05:00