An example project using Webpack, Babel, and Svelte.
Welcome to a Distill example article: meant to get you writing up your research quickly. Let's demo some features:
Your browser can automatically refresh when your editor saves. This should work by default, and you can disable
it in index.js
. Sometimes hot reloading isn't fully compatible with all types of code, so you may
need to try manually reloading if you're seeing inconsistent behavior.
SVGs are so small that it can be nice to save an extra request and simply inline them intop your HTML:
Let's use some CSS to style an inlined SVG. Here's an arrow
that we
can make
inline. If you'd like to change the color in CSS, we can do so. Let's put the second arrow () in a tag with an ID, so we can
target it in CSS.
Here's a test of an inline equation $
signs:
Math can also be quite involved:
We've also been experimenting with annotated formulas:
We can
Some inline javascript:
We also support some highlighting.
We have simple tables that try to stay readable at most screen sizes:
Parallel | Efficient | Reversible | |
---|---|---|---|
GANs | Yes | Yes | No |
Flow Models | Yes | No | Yes |
Autoregressive Models | No | Yes | Yes |
Here's a dynamically instantiated "figure". We use Intersection Observers to allow loading resource-heavy
figures only when readers scroll close to them. The code for this is in src/index.js
.
You can't use citation tags (d-cite
) in figures that are dynamically loaded using Javascript.
Distill statically
analyzes your submission for its citations, because they need to be uploaded to indexers and organizations like CrossRef and Google Scholar.
That's it for the example article! Feel free to look at implementations of existing Distill articles, or ask for help in the Distill Slack Community.
We are deeply grateful to...
Many of our diagrams are based on...
Research: Alex developed ...
Writing & Diagrams: The text was initially drafted by...