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

Set attributes that provide runtime environment hints #9

Closed mojavelinux closed 9 years ago

mojavelinux commented 10 years ago

We've been using the convention of setting implicit attributes that identify the runtime environment to allow other settings, such as imagesdir, to be setup properly.

I recommend setting the following implicit attributes for gist.asciidoctor.org:

This might be used to setup the imagesdir as follows:

:imagesdir: images
ifdef::env-docgist[]
:imagesdir: https://github.com/asciidoctor/asciidoctor/raw/master/images
endif::[]

In contrast, when the document is converted on the GitHub servers, the attributes env=github and env-github are set.