an example of a distill-style blog post and main elements
NOTE: Citations, footnotes, and code blocks do not display correctly in the dark mode since distill does not support the dark mode by default. If you are interested in correctly adding dark mode support for distill, please open a discussion and let us know.
This theme supports rendering beautiful math in inline and display modes using MathJax 3 engine.
You just need to surround your math expression with
If you leave it inside a paragraph, it will produce an inline expression, just like \(E = mc^2\).
$$ E = mc^2 $$
To use display mode, again surround your expression with
and place it as a separate paragraph.
Here is an example:
Citations are then used in the article body with the
The key attribute is a reference to the id provided in the bibliography.
The key attribute can take multiple ids, separated by commas.
The citation is presented inline like this:
Distill chose a numerical inline citation style to improve readability of citation dense articles and because many of the benefits of longer citations are obviated by displaying more information on hover. However, we consider it good style to mention author last names if you discuss something at length and it fits into the flow well — the authors are human and it’s nice for them to have the community associate them with their work.
Just wrap the text you would like to show up in a footnote in a
The number of the footnote will be automatically generated.
Syntax highlighting is provided within
An example of inline code snippets:
For larger blocks of code, add a
<d-code language="html">let x = 10;</d-code>
blocks do not look well in the dark mode.
You can always use the default code-highlight using the
The main text column is referred to as the body.
It is the assumed layout of any direct descendants of the
For images you want to display a little larger, try
All of these have an outset variant if you want to poke out from the body text a little bit. For instance:
Occasionally you’ll want to use the full browser width.
For this, use
You can also inset the element a little from the edge of the browser by using the inset variant.
The final layout is for marginalia, asides, and footnotes.
It does not interrupt the normal flow of
sized text except on mobile screen sizes.
Emphasis, aka italics, with asterisks (
) or underscores (
Strong emphasis, aka bold, with asterisks or underscores.
Combined emphasis with asterisks and underscores.
Strikethrough uses two tildes.
⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we’ll use three here to also align the raw Markdown).
⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅ ⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅ ⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)
Or leave it empty and use the link text itself.
URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com or http://www.example.com and sometimes example.com (but not on Github, for example).
Some text to show that the reference links can follow later.
Here’s our logo (hover to see the title text):
1 2 s = "Python syntax highlighting" print s
1 2 No language indicated, so no syntax highlighting. But let's throw in a <b>tag</b>.
Colons can be used to align columns.
|col 3 is||right-aligneds alignedsalignedsalignedsalignedsalignedsalignedsaligneds||$1600|
|col 2 is||centered||$12|
|zebra stripes||are neat||$1|
There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don’t need to make the raw Markdown line up prettily. You can also use inline Markdown.
Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.
This is a very long line that will still be quoted properly when it wraps. Oh boy let’s keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.
Here’s a line for us to start with.
This line is separated from the one above by two newlines, so it will be a separate paragraph.
This line is also a separate paragraph, but… This line is only separated by a single newline, so it’s a separate line in the same paragraph.