Commit Graph

46 Commits

Author SHA1 Message Date
Tom Shen 5ecf99762b Fix typos in shortcodes documentation 2017-06-22 21:23:19 +02:00
Bryan Klein 066e17464d docs: Fix parameter name in YouTube shortcode section
Since 'autostart' is not the correct name of the parameter, I changed the words to make this section more clear.
2017-05-26 15:05:19 +03:00
Sharon L 972190fc66 docs: Fix minor grammar issue in shortcodes.md 2017-05-18 07:54:10 +02:00
Bjørn Erik Pedersen c4a3e43270 docs: Add docs about output format linking
Fixes #3301
Fixes #3302
2017-04-08 16:33:20 +02:00
Bjørn Erik Pedersen 6538774eb9 docs: Enable ToC for extras/shortcodes 2016-12-26 19:31:34 +01:00
Cameron Moore 49da43bf92 docs: Cleanup Extras menu ordering 2016-12-15 11:15:15 +01:00
Victor Kropp 013ab717ec hugolib: Add shortcode for Instagram 2016-11-23 20:28:42 +01:00
Konstantin Kliakhandler 6a1bd7dc22 Allow picking a specific file out of a gist 2016-03-11 18:29:07 +01:00
Bjørn Erik Pedersen e101a2dc7a Add reference to parent shortcode
Fixes #1936
2016-03-09 11:06:40 +01:00
digitalcraftsman 4b8ccb2ce2 Docs: fix typo in YouTube shortcode description 2016-02-13 16:41:25 +01:00
Rick Cogley 03dbe714e2 Add a benefit and a simple example to return current year
Thanks @bep!
2016-02-07 13:04:35 +08:00
digitalcraftsman 9b5467b466 Add autostart option to YouTube shortcode 2016-01-29 16:23:41 -05:00
Bjørn Erik Pedersen 915fc9468a docs: Add lastmod to content files
Based on last commit in Git.
2016-01-06 23:55:18 +01:00
Anthony Fok f0fb8328ce Copyedit the shortcodes documentation some more 2015-11-29 23:23:25 -07:00
digitalcraftsman e58c32cfcc Docs: improve shortcodes page
See #1613
2015-11-29 22:01:31 -07:00
digitalcraftsman 34214ebb89 Add IsNamedParams property in shortcodes 2015-11-24 08:59:32 +01:00
digitalcraftsman e3a51711bb Add documentation for built-in shortcodes
Fixes #1576
2015-11-24 08:59:32 +01:00
Cameron Moore cf8b0848be Update shortcode docs with .IsNamedParams
There are some minor cleanups included here as well.

Fixes #1607
2015-11-24 08:47:06 +01:00
Tobias 6a60c1b612 Fix some typos in docs 2015-10-17 13:48:10 +02:00
Anthony Fok 8c2d4fca90 doc: Strip trailing whitespace; other revisions
Make some random and non-comprehensive changes to the
template functions documentation to make them more
consistent.
2015-08-04 12:00:08 -06:00
bep f70c67cdf3 docs: Use ToC length to pick the compact version 2015-05-11 22:23:35 +02:00
bep 68dd83a920 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 348ffb04fa Allow the same shortcode to be used with or without inline content
Fixes #934
2015-03-02 21:49:33 +01:00
Joseph Kaptur b102d92c81 Update docs so that figure includes the class parameter. 2015-02-14 18:35:00 -05:00
Anthony Fok 5def25889b [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 8c62041bfe Add documentation for pagination
See #750
2015-01-26 14:56:26 +01:00
Austin Ziegler 764d9fd751 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
bep 461e6d0062 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 146b08c67f Update shortcodes.md
A typo resulting in a broken link.
2014-11-18 10:15:05 -05:00
bep 2ecb85e8b2 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 33bd973c49 Fix for issue 583 2014-11-01 23:10:52 -04:00
Anthony Fok 60092aa377 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 09a4c3282a Mention .Params and .Page variables in shortcode docs. Also highlight variables. 2014-10-02 13:53:36 -04:00
Jakub Turski e1ca9c7649 Shortcodes are content files specific.
This fixes spf13/hugo#440.
2014-08-28 12:59:52 -04:00
Nate Finch 5f4e731a7a remove extraneous "Because" 2014-08-06 05:39:58 -04:00
spf13 e885972a5a Converting front matter to YAML 2014-05-29 18:45:22 -04:00
spf13 acf48b814d Updating / Rewriting / Adding all of the documentation in preparation for the next release 2014-05-27 18:32:57 -04:00
spf13 39b3dc52bc Switching docs highlighting to highlight.js .. Docs build super fast again! 2014-05-15 09:58:55 -04:00
spf13 017eb00cc7 Implementing new menu system in the docs site 2014-04-23 03:00:11 -04:00
spf13 fe2ad5bebc 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 d9363a56b3 Minor Docs Tweaks 2014-02-18 18:35:03 -05:00
spf13 e294d86841 Add highlighting of code in documentation and clean up a bunch of the docs. 2014-01-10 21:29:58 -05:00
spf13 8507d201ac Adding example short codes to the documentation 2013-12-10 22:34:13 -05:00
spf13 70de05211a Big visual overhaul of the docs. Docs now using indexes for all menu generation. 2013-10-26 02:18:14 -04:00
Kyle Mahan e10167c1af minor documentation cleanup.
- changed it's -> its where appropriate.
- added post/ parent directory above happy/ to the organization examples

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-09-29 19:50:25 -07:00
spf13 66c87441bd Complete overhaul of the docs 2013-08-17 21:54:39 -04:00