Version bump

This commit is contained in:
Shan Carter
2017-01-09 14:49:11 -08:00
parent e774e23832
commit 11026d1c2e
11 changed files with 66 additions and 49 deletions
+26 -29
View File
@@ -24,18 +24,12 @@
<p>Distill ships with a CSS framework and a collection of custom web components that make building interactive academic articles easier than with raw HTML, CSS and JavaScript. This reference article details several examples and best practices for how to use both frameworks.</p>
<hr>
<h2>Getting Started</h2>
<p>If youre using Chrome as your development browser, here is the smallest distill post.</p>
<dt-code block language="html">
&lt;script src="../dist/template.min.js"&gt;&lt;/script&gt;
&lt;dt-article&gt;
&lt;h1&gt;Hello World&lt;/h1&gt;
&lt;/dt-article&gt;
</dt-code>
<p>However, this omits some required html tags that might cause rendering problems during development if youre using a browser other than Chrome. These missing tags will be added during publishing, so if the above works for you, feel free to use it. If you are having issues, try adding <dt-code>doctype</dt-code> and <dt-code>meta</dt-code> tags explicitly.</p>
<p>Here is the smallest distill post.</p>
<dt-code block language="html">
&lt;!doctype html&gt;
&lt;meta charset="utf-8"&gt;
&lt;script src="../dist/template.min.js"&gt;&lt;/script&gt;
&lt;dt-article&gt;
&lt;h1&gt;Hello World&lt;/h1&gt;
&lt;/dt-article&gt;
@@ -45,7 +39,8 @@
&lt;!doctype html&gt;
&lt;meta charset="utf-8"&gt;
&lt;script src="../dist/template.min.js"&gt;&lt;/script&gt;
&lt;dt-front-matter&gt;
&lt;script type="text/front-matter"&gt;
title: Article Title
description: Description of the post
published: Jan 10, 2017
@@ -55,7 +50,8 @@
affiliations:
- Google Brain: http://g.co/brain
- Google Brain: http://g.co/brain
&lt;/dt-front-matter&gt;
&lt;/script&gt;
&lt;dt-article&gt;
&lt;h1&gt;Hello World&lt;/h1&gt;
&lt;h2&gt;A description of the article&lt;/h2&gt;
@@ -63,14 +59,15 @@
&lt;p&gt;This is the first paragraph of the article.&lt;/p&gt;
&lt;p&gt;We can also cite &lt;dt-cite key="gregor2015draw"&gt;&lt;/dt-cite&gt; external publications.&lt;/p&gt;
&lt;/dt-article&gt;
&lt;dt-bibliography&gt;
&lt;script type="text/bibliography"&gt;
@article{gregor2015draw,
title={DRAW: A recurrent neural network for image generation},
author={Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan},
journal={arXivreprint arXiv:1502.04623},
year={2015}
}
&lt;/dt-bibliography&gt;
&lt;/script&gt;
</dt-code>
<hr>
<h2>Markdown</h2>
@@ -86,14 +83,14 @@
First paragraph of the article.
&lt;/dt-article&gt;
&lt;dt-bibliography&gt;&lt;/dt-bibliography&gt;
&lt;script type="text/bibliography"&gt;&lt;/script&gt;
</dt-code>
<p>We use <a href="https://github.com/chjj/marked">marked</a> as the rendering engine, with <a href="https://help.github.com/articles/basic-writing-and-formatting-syntax/">github flavored markdown</a> and <a href="https://daringfireball.net/projects/smartypants/">smartypants</a> enabled. In development mode the markdown is translated in the client after the dom content has loaded, but when published, the translation is precompiled.</p>
<hr>
<h2>Front Matter</h2>
<p>Youll need to describe some data about you post — title, description, authors, etc. For this use the <dt-code language="html">&lt;dt-front-matter&gt;</dt-code> tag.</p>
<p>Youll need to describe some data about you post — title, description, authors, etc. For this use the <dt-code language="html">&lt;script type="text/front-matter"&gt;</dt-code> tag.</p>
<dt-code block language="html">
&lt;dt-front-matter&gt;
&lt;script type="text/front-matter"&gt;
title: Article Title
description: Description of the post
authors:
@@ -102,17 +99,17 @@
affiliations:
- Google Brain: http://g.co/brain
- Google Brain: http://g.co/brain
&lt;/dt-front-matter&gt;
&lt;/script&gt;
</dt-code>
<p>You can also use an external JSON file if you like. We will automatically make a request for a <dt-code>distill.json</dt-code> file if there is no <dt-code language="html">&lt;dt-front-matter&gt;</dt-code> element on the page, or you can point to another file with the <dt-code>src</dt-code> attribute. In production, these files will be inlined into the document.</p>
<!-- <p>You can also use an external JSON file if you like. We will automatically make a request for a <dt-code>distill.json</dt-code> file if there is no <dt-code language="html">&lt;script type="text/front-matter"&gt;</dt-code> element on the page, or you can point to another file with the <dt-code>src</dt-code> attribute. In production, these files will be inlined into the document.</p>
<dt-code block language="html">
&lt;dt-front-matter src="./distill.json"&gt;&lt;/dt-front-matter&gt;
</dt-code>
&lt;script type="text/front-matter" src="./distill.json"&gt;&lt;/script&gt;
</dt-code> -->
<hr>
<h2>Citations</h2>
<p>Bibtex is the supported way of making academic citations. You first need have a global definition of all your possible citations. For this well use the <dt-code language="html">&lt;dt-bibliography&gt;</dt-code> element.</p>
<p>Bibtex is the supported way of making academic citations. You first need have a global definition of all your possible citations. For this well use the <dt-code language="html">&lt;script type="text/bibliography"&gt;</dt-code> element.</p>
<dt-code block language="html">
&lt;dt-bibliography&gt;
&lt;script type="text/bibliography""&gt;
@article{gregor2015draw,
title={DRAW: A recurrent neural network for image generation},
author={Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan},
@@ -129,12 +126,12 @@
year={2011},
publisher={Cambridge Univ Press}
}
&lt;/dt-bibliography&gt;
&lt;/script&gt;
</dt-code>
<p>Like with the <dt-code language="html">&lt;dt-front-matter&gt;</dt-code> element, you can alternatively reference an external file with the <dt-code>src</dt-code> attribute. If no <dt-code language="html">&lt;dt-bibliography&gt;</dt-code> element is found on the page, a request will automatically be made for <dt-code>bibliography.bib</dt-code>. In production, these files will be inlined into the document.</p>
<!-- <p>Like with the <dt-code language="html">&lt;script type="text/front-matter"&gt;</dt-code> element, you can alternatively reference an external file with the <dt-code>src</dt-code> attribute. If no <dt-code language="html">&lt;script type="text/bibliography"&gt;</dt-code> element is found on the page, a request will automatically be made for <dt-code>bibliography.bib</dt-code>. In production, these files will be inlined into the document.</p>
<dt-code block language="html">
&lt;dt-bibliography src="bibliography.bib"&gt;&lt;/dt-bibliography&gt;
</dt-code>
&lt;script type="text/bibliography" src="bibliography.bib"&gt;&lt;/script&gt;
</dt-code> -->
<p>Citations are then used in the article body with the <dt-code language="html">&lt;dt-cite&gt;</dt-code> tag. The <dt-code>article</dt-code> attribute is a reference to the id provided in the bibiography.</p>
<dt-code block language="html">
&lt;dt-cite ket="gregor2015draw"&gt;&lt;/dt-cite&gt;
@@ -152,12 +149,12 @@
&lt;/dt-code&gt;
</dt-code>
<hr>
<!-- <hr>
<h2>Footnotes</h2>
<p>This is a <dt-footnote ref="blah" /></p>
<dt-footnote-body ref="blah"></dt-footnote-body>
<hr>
<h2>Math</h2>
<h2>Math</h2> -->
<hr>
<h2>Layouts</h2>
<p>The main text column is referred to as the body. It is the assumed layout of any direct descendents of the <code>dt-article</code> element.</p>
@@ -173,9 +170,9 @@
<p>They are all floated to the right and anchored to the right-hand edge of the position you specify. By default, each will take up approximately half of the width of the standard layout position, but you can override the width with a more specific selector. </p>
<div class="fake-img l-gutter"><p>.l-gutter</p></div>
<p>The final layout is for marginalia, asides, and footnotes. It does not interrupt the normal flow of <code>.l-body</code> sized text except on mobile screen sizes.</p>
<!--
<hr>
<h2>Including External Files</h2>
<h2>Including External Files</h2> -->
</dt-article>
<dt-footer></dt-footer>