Demo
This build with pelican. Pelican is a static page generator written in python. You can write your post with reST, markdown or AsciiDoc, or other formats with custom readers. This site is using a custom theme maupassant that originally developed by cho and kindly ported to pelican by Rongqing Ye, with some minor tweaks.
Writing Post
To write a new post, just save it in the content/
folder with
a known extension, pelican will find and translate it.
Frontmatter
The frontmatte should at least contains Title, Date specification. Others supported include:
category
tags
: seperate tags with ','summary
: if you want to specify summarytoc
: iftrue
add a table of contentstopic
: used to filter in sub-blogsconfidential
: 1: mark link and hide summary; 2: like draft; 3: skip
Math Support
Math supported is enabled, you can add an inline math like:
$a^2 + b^2 = c^2$
, which renders to \(a^2 + b^2 = c^2\).
Or you can write display math used double $$
, which renders
like:
To add equation numbers, use an AMS environment like
$$
\begin{equation}
E = mc^2
\end{equation}
$$
which renders to:
Only latex style is supported, you can find a good reference on the wikibooks of latex.
Note that for a AMS environment with equatio numbers, e.g. equation
,
zoom in does not work well: it shows the zoomed in version left-aligned
instead of center-aligned. Equations without formula numbers works just fine.
Slides
A special reader has been added for two extensions .mds
and .htmls
,
to help you write slides post.
- .mds: keep raw markdown untransformed, use reveal.js
markdown support. As usual markdown, frontmatter is
support to provide metadata useful to pelican.
A template file named
slidemd
is assumed if not given. - .htmls: html files with markdown style frontmatter.
If you need very precise control over your slides
content, this is the choice, content after frontmatter
is untouched(except the special mark replace described
later) to reveal.js template.
A template file named
slide
is assumed if not given.
Additionally, several specially marks are defined
below and can be used to add a setting slide to change
the style by clicking links. Both .mds
and .htmls
are supported.
<reveal-settings-theme/>
: add a slide to control reveal theme<reveal-settings-highlight/>
: add a slide to change highlight.js styles<reveal-settings-trans/>
: add a slide to change transition styles<reveal-settings/>
: add all three settings slides
mds
example
A demo.mds
file with content below defines a
simple mds example, you can see the
result
Title: Slide Demo Using mds Format
Date: 2018-12-1 19:00
Category: howto
summary: Demo showing how to write slides with markdown
topic: work
---
# mds Demo
You can now write slides with markdown!
You can add setting slides with special marks!
--
<reveal-settings/>
---
# Back Again
Not that $\mathrm{math}$ is also supported!
$$ a^2 + b^2 = c^2 $$
--
* Use `---` to seperate horizontal slides
* use `---` to seperate vertial slides
---
# Code Block
```python
def hello():
print('Hi pal!')
```
---
# Bye
Hope you enjoy!
htmls
example
To precisely control your slides elements cand content,
you can write htmls directly and save it with htmls
ext.
Below is a simple demo
Title: Slide Demo Using htmls Format
Date: 2018-12-07 20:00
Category: howto
summary: Demo showing how to write slides with markdown
topic: work
---
<section>
<section>
<h1> Hi Reveal.js </h1>
With htmls you need to write html tags by yourself!
</section>
<reveal-settings/>
</section>
<section>
<h1>Back Again</h1>
</section>