hugo/hugolib
Anthony Fok 358dcce7a6 Experimental AsciiDoc support with external helpers
See #470

 * Based on existing support for reStructuredText files

 * Handles content files with extensions `.asciidoc` and `.ad`

 * Pipes content through `asciidoctor --safe -`.
   If `asciidoctor` is not installed, then `asciidoc --safe -`.

 * To make sure `asciidoctor` or `asciidoc` is found, after adding
   a piece of AsciiDoc content, run `hugo` with the `-v` flag
   and look for this message:

        INFO: 2015/01/23 Rendering with /usr/bin/asciidoctor ...

Caveats:

 * The final "Last updated" timestamp is currently not stripped.

 * When `hugo` is run with `-v`, you may see a lot of these messages

        INFO: 2015/01/23 Rendering with /usr/bin/asciidoctor ...

   if you have lots of `*.ad`, `*.adoc` or `*.asciidoc` files.

 * Some versions of `asciidoc` may have trouble with its safe mode.
   To test if you are affected, try this:

        $ echo "Hello" | asciidoc --safe -
        asciidoc: ERROR: unsafe: ifeval invalid
        asciidoc: FAILED: ifeval invalid safe document

   If so, I recommend that you install `asciidoctor` instead.

Feedback and patches welcome!

Ideally, we should be using https://github.com/VonC/asciidocgo,
@VonC's wonderful Go implementation of Asciidoctor.  However,
there is still a bit of work needed for asciidocgo to expose
its API so that Hugo can actually use it.

Until then, hope this "experimental AsciiDoc support through external
helpers" can serve as a stopgap solution for our community. :-)

2015-01-30: Updated for the replaceShortcodeTokens() syntax change
2015-02-21: Add `.adoc` extension as suggested by @Fale

Conflicts:
	helpers/content.go
2015-03-12 22:01:49 -04:00
..
author.go author: fix doc 2015-03-07 00:10:00 +01:00
benchmark_test.go
handler_base.go hugolib: apply some Hugolint rules 2015-03-07 00:13:06 +01:00
handler_file.go
handler_meta.go
handler_page.go Experimental AsciiDoc support with external helpers 2015-03-12 22:01:49 -04:00
hugo.go
media.go hugolib: apply some more Golint rules 2015-03-07 12:53:20 +01:00
menu.go menu: make receiver name on Page methods consistent 2015-03-07 12:52:29 +01:00
menu_test.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
node.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
page.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
page_permalink_test.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
page_taxonomy_test.go
page_test.go
page_time_integration_test.go
pageGroup.go
pageGroup_test.go
pageSort.go hugolib: apply some more Golint rules 2015-03-07 12:53:20 +01:00
pagesPrevNext.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
pagesPrevNext_test.go
pagination.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
pagination_test.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
path_separators_test.go
path_separators_windows_test.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
permalinks.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
permalinks_test.go
planner.go
redis.cn.md
rss_test.go
scratch.go
scratch_test.go
shortcode.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
shortcode_test.go Allow the same shortcode to be used with or without inline content 2015-03-02 21:49:33 +01:00
shortcodeparser.go
shortcodeparser_test.go Apply gofmt -s 2015-03-05 23:57:38 +01:00
site.go Remove trailing space from site build statistics 2015-03-12 08:46:42 -06:00
site_show_plan_test.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
site_test.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
site_url_test.go
siteinfo_test.go Apply gofmt -s 2015-03-05 23:57:38 +01:00
sitemap.go
sitemap_test.go
summary.go
taxonomy.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
taxonomy_test.go