asciidoctor / docgist

Render AsciiDoc documents from Gists, GitHub, DropBox and other remote sources in the browser.
http://gist.asciidoctor.org
57 stars 79 forks source link

Get interdocument xrefs working #19

Closed mojavelinux closed 8 years ago

mojavelinux commented 9 years ago

Interdocument xrefs are a variation on the xref syntax that provide an easy, output format agnostic way to link to another document converted from AsciiDoc. If a document is rendered on docgist, then the interdocument xref should link to a relative document that is also rendered on docgist.

For more information on interdocument xrefs, see http://asciidoctor.org/docs/user-manual/#inter-document-cross-references.

nawroth commented 8 years ago

@mojavelinux Once I learn how to hook into asciidoctor.js to do this, the same logic can be injected into the document processing instead of being applied afterwards.

The xrefs on the example page are now actual xrefs: http://gist.asciidoctor.org/ Under the hood the source is a github file, which will be obvious when following the interdoc xrefs. Public Dropbox folder: http://gist.asciidoctor.org/?dropbox-10666617%2FAsciiDoc%2Fdocument-a.adoc Riseup pad: http://gist.asciidoctor.org/?riseup-docgist Piratenpad: http://gist.asciidoctor.org/?epsp-piratenpad.de-docgist

mojavelinux commented 8 years ago

Nice work.

Unfortunately, this isn't really an extension point, so the only way I can think of doing it atm is using a postprocessor step, as you have done.