Note: different diagram-generation packages require external dependencies to be installed on your machine. Also, be mindful of that because of diagram generation the fist time you build your Jekyll website after adding new diagrams will be SLOW. For any other details, please refer to jekyll-diagrams README.
Install mermaid using
package manager 1
node.js
by running the following command:1
npm
1
npm install -g mermaid.cli
The diagram below was generated by the following code:
1
2
3
4
5
6
7
{% mermaid %}
sequenceDiagram
participant John
participant Alice
Alice->>John: Hello John, how are you?
John-->>Alice: Great!
{% endmermaid %}
This theme supports rendering beautiful math in inline and display modes using MathJax 3 engine.
You just need to surround your math expression with
, like 1
$$
.
If you leave it inside a paragraph, it will produce an inline expression, just like \(E = mc^2\).1
$$ E = mc^2 $$
To use display mode, again surround your expression with
and place it as a separate paragraph.
Here is an example:1
$$
Note that MathJax 3 is a major re-write of MathJax that brought a significant improvement to the loading and rendering speed, which is now on par with KaTeX.
Citations are then used in the article body with the
tag.
The key attribute is a reference to the id provided in the bibliography.
The key attribute can take multiple ids, separated by commas.1
<d-cite>
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
tag.
The number of the footnote will be automatically generated.1
<d-footnote>
Syntax highlighting is provided within
tags.
An example of inline code snippets: 1
<d-code>
.
For larger blocks of code, add a 1
<d-code language="html">let x = 10;</d-code>
attribute:1
block
Note:
blocks do not look well in the dark mode.
You can always use the default code-highlight using the 1
<d-code>
liquid tag:1
highlight
The main text column is referred to as the body.
It is the assumed layout of any direct descendants of the
element.1
d-article
.l-body
For images you want to display a little larger, try
:1
.l-page
.l-page
All of these have an outset variant if you want to poke out from the body text a little bit. For instance:
.l-body-outset
.l-page-outset
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.1
.l-screen
.l-screen
.l-screen-inset
The final layout is for marginalia, asides, and footnotes.
It does not interrupt the normal flow of
sized text except on mobile screen sizes.1
.l-body
.l-gutter
Emphasis, aka italics, with asterisks (
) or underscores (1
*asterisks*
).1
_underscores_
Strong emphasis, aka bold, with asterisks or underscores.
Combined emphasis with asterisks and underscores.
Strikethrough uses two tildes. Scratch this.
⋅⋅⋅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.)
I’m an inline-style link with title
I’m a relative reference to a repository file
You can use numbers for reference-style link definitions
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):
Inline-style:
Reference-style:
Inline
has 1
code
it.1
back-ticks around
1
2
var s = "JavaScript syntax highlighting";
alert(s);
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.
Tables | Are | Cool |
---|---|---|
col 3 is | right-aligned | $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.
Markdown | Less | Pretty | ||
---|---|---|---|---|
Still |
|
nicely | ||
1 | 2 | 3 |
Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.
Quote break.
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.
]]>An example of displaying a tweet:
jekyll-twitter-plugin (1.0.0): A Liquid tag plugin for Jekyll that renders Tweets from Twitter API http://t.co/m4EIQPM9h4
— RubyGems (@rubygems) October 5, 2014
An example of pulling from a timeline:
For more details on using the plugin visit: jekyll-twitter-plugin
]]>1
$$
, like 1
$$ E = mc^2 $$
. If you leave it inside a paragraph, it will produce an inline expression, just like \(E = mc^2\).
To use display mode, again surround your expression with
and place it as a separate paragraph. Here is an example:1
$$
You can also use
instead of 1
\begin{equation}...\end{equation}
for display mode math.
MathJax will automatically number equations:1
$$
\begin{equation} \label{eq:cauchy-schwarz} \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \end{equation}
and by adding
inside the equation environment, we can now refer to the equation using 1
\label{...}
.1
\eqref
Note that MathJax 3 is a major re-write of MathJax that brought a significant improvement to the loading and rendering speed, which is now on par with KaTeX.
]]>{% highlight c++ linenos %}
code code code
{% endhighlight %}
The keyword
triggers display of line numbers.
Produces something like this:1
linenos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
int main(int argc, char const \*argv[])
{
string myString;
cout << "input a string: ";
getline(cin, myString);
int length = myString.length();
char charArray = new char * [length];
charArray = myString;
for(int i = 0; i < length; ++i){
cout << charArray[i] << " ";
}
return 0;
}
Images can be made zoomable.
Simply add
to 1
data-zoomable
tags that you want to make zoomable.1
<img>
The rest of the images in this post are all zoomable, arranged into different mini-galleries.
Hoodie Thundercats retro, tote bag 8-bit Godard craft beer gastropub. Truffaut Tumblr taxidermy, raw denim Kickstarter sartorial dreamcatcher. Quinoa chambray slow-carb salvia readymade, bicycle rights 90’s yr typewriter selfies letterpress cardigan vegan.
Pug heirloom High Life vinyl swag, single-origin coffee four dollar toast taxidermy reprehenderit fap distillery master cleanse locavore. Est anim sapiente leggings Brooklyn ea. Thundercats locavore excepteur veniam eiusmod. Raw denim Truffaut Schlitz, migas sapiente Portland VHS twee Bushwick Marfa typewriter retro id keytar.
We do not grow absolutely, chronologically. We grow sometimes in one dimension, and not in another, unevenly. We grow partially. We are relative. We are mature in one realm, childish in another. —Anais Nin
Fap aliqua qui, scenester pug Echo Park polaroid irony shabby chic ex cardigan church-key Odd Future accusamus. Blog stumptown sartorial squid, gastropub duis aesthetic Truffaut vero. Pinterest tilde twee, odio mumblecore jean shorts lumbersexual.
]]>