Some notes for me on how to use pelican
Basic workflow
- Pages are for "static" stuff.
- Articles are for "blog" posts.
- Edit / add one of these and use command "fab build; fab publish". This builds the site in the output/ directory, and then rsync's with the server.
Thumbnails
How to make thumbnails for my posters.
Make a directory to put the thumbnails in mkdir thumb Convert all pdfs (my posters are always pdf) into gif. mogrify -format gif -path thumbs -thumbnail 1600x1600 *.pdf
Hidden stuff
To hide a page, use "status:hidden". To hide an article (blog), use "status:draft"
Code
Here is some code "inline"
a = [1,2,3]
x = np.array([3,4,5])
Here is another way to include code where it is downloadable - better for longer files.
# This demonstrates how to plot some lines in matplotlib
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 10, 100)
y = np.sin(x) * np.cos(2.3*x)
fig = plt.figure(figsize=(12,4))
ax = fig.gca()
ax.plot(x, y, '.r-')
plt.show()
Links
Note: no space between some text
Images
Images go in the images/ directory. surprise. For new content directories, make sure it is included in 'STATIC_PATHS'.
Here is a link to an image. a qubit
This is an inline image with !-mark
This is the image sized with liquid-tags. (can't do this straightforwardly otherwise)
This is an inline image that is a link to something else.
Math / LaTeX
Here is some math within a sentence: \(x = \lambda^3 - \frac{1}{2}\) rendered with latex using the render_math plugin.
Here is an align environment.
iPython Notebook
Here is an ipython notebook.
Here are just two cells from that ipython notebook. Note that the cells are chosen with slice notation. The indexing does not appear to reflect the order in which the cells were executed (good). Each cell - whether code or markdown - gets a number.
Video
Here is a vimeo. Note that resizing does not appear to work..