title: How can I separate variables into an external asciidoc document?
body: <p>I'm writing a book using asciidoctor. Documents look like this.</p>
  
  <h2>book.asciidoc</h2>
  
  <pre><code>:doctype: book
  :icons: font
  :source-highlighter: coderay
  
  :apidocs-javase: http://docs.oracle.com/javase/8/docs/api
  :apidocs-javaee: http://docs.oracle.com/javaee/7/api
  
  include::chapter01.asciidoc[]
  </code></pre>
  
  <h2>chapter01.asciidoc</h2>
  
  <pre><code>== Chapter 01 TITLE
  ....
  {apidocs-javase}/java/io/InputStream.html#...
  ...
  </code></pre>
  
  <p>It renders fine and the result looks good.</p>
  
  <p>Now I'm trying to use <a href="https://atom.io/" rel="nofollow">Atom</a> along with <a href="https://github.com/asciidoctor/atom-asciidoc-preview" rel="nofollow">atom-asciidoc-preview</a>. The problem is that <a href="https://github.com/asciidoctor/atom-asciidoc-preview" rel="nofollow">atom-asciidoc-preview</a> seems not capable to substitute variables properly.</p>
  
  <p>I tries this.</p>
  
  <h2>variables.asciidoc</h2>
  
  <pre><code>:apidocs-javase: http://docs.oracle.com/javase/8/docs/api
  :apidocs-javaee: http://docs.oracle.com/javaee/7/api
  </code></pre>
  
  <h2>chapter01.asciidoc</h2>
  
  <pre><code>include::variables.asciidoc[]
  == Chapter 01 TTILE
  ....
  {apidocs-javase}/java/io/InputStream.html#...
  ...
  </code></pre>
  
  <p>I have no luck. How can I solve this problem?</p>