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 permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00
handler_base.go hugolib: apply some Hugolint rules 2015-03-07 00:13:06 +01:00
handler_file.go refactor handlers to use types instead of structs. 2014-11-20 12:43:34 -05:00
handler_meta.go Avoid panic on unknown markup 2015-02-01 22:30:57 +01:00
handler_page.go Experimental AsciiDoc support with external helpers 2015-03-12 22:01:49 -04:00
hugo.go Bumping to version "v0.14-DEV" 2015-02-21 23:11:36 -05:00
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 fix tags not being in lowercase, #491 2014-09-11 17:03:31 -04:00
page_test.go Add site-wide/per-page [blackfriday] extensions option 2015-01-26 09:55:37 +01:00
page_time_integration_test.go permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00
pageGroup.go Fix GroupBy function issues 2014-11-13 22:48:58 -05:00
pageGroup_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
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 Adding Prev/Next functionality to all lists of pages (sections, taxonomies, etc) 2014-11-27 23:15:25 -05:00
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 Correct spelling of two test files: seperators → separators 2015-01-11 02:21:51 -07:00
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 Change permalink validation and substitution. 2014-11-02 00:43:01 -04:00
planner.go New targets & new renderers and write methods [WIP] 2014-11-04 00:39:37 -05:00
redis.cn.md [Docs] Copyediting 2015-01-28 18:02:40 -07:00
rss_test.go Various fixes in RSS feed generation 2014-11-17 18:55:40 -05:00
scratch.go Add writable context to Node 2015-01-31 22:01:30 +01:00
scratch_test.go Add writable context to Node 2015-01-31 22:01:30 +01:00
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 Allow hyphens in shortcode name 2015-02-27 11:57:23 +01:00
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 Add pagination support for home page, sections and taxonomies 2015-01-26 12:59:37 +01:00
siteinfo_test.go Apply gofmt -s 2015-03-05 23:57:38 +01:00
sitemap.go Add Sitemaps config values handling 2014-05-09 23:11:33 -04:00
sitemap_test.go Updating tests to use new Targets & Writers and switch to using Afero.MemMapFs for more accurate tests. 2014-11-04 00:41:47 -05:00
summary.go Big refactor of how source files are used. Also added default destination extension option. 2014-10-16 20:20:09 -04:00
taxonomy.go Correct initialisms as suggested by golint 2015-03-11 21:55:00 +01:00
taxonomy_test.go permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00