A repository for the DeepLearnPhysics group Blog webpage.
The master
branch holds static HTML files generated by Pelican with the flex theme. We use the pelican-ipynb plugin to easily turn a juypyter notebook into a blog.
The develop
branch holds the source code to generate the website.
You need the python packages:
pelican >= 3.5.0
markdown >= 2.6.9
Also for pelican-ipynb
plug-ins you need:
jupyter >= 1.0
ipython >= 4.0
nbconvert >= 4.0
If you find that the above requirement for pelican-ipynb changed, please let us know or update it above!
For awesome you to help development, follow the following three steps: installation, compilation, development, and publish.
- Join the web-blog github team
- Clone the repo:
git clone git@github.com:DeepLearnPhysics/Blog
. - Make sure you are on the
develop
branch bygit branch
By compilation we mean generation of static HTMLs. This is fairly simple:
make html
Our development work is a process of modify-compile-check. The first to-do is:
- Open
pelicanconf.py
and uncomment the line#SITEURL = ''
. This generates HTMLs to be viewed locally. make devserver
then accesslocalhost:8000
on your browser. This runs a virtual pelican web server on your machine and allows you to browse the updated website contents all on your laptop.- Make modifications you wish to make.
contents
directory is where you make a blog post. make html
will update your local static website.
After you finish your development work, if you want to publish your change on our website, you have to push your changes.
- Open
pelicanconf.py
and comment out the lineSITEURL = ''
. This generates HTMLs to be viewed on the shared remote server. make html
and if you are running a local virtual server,make stopserver
.- Commit your changes to the develop branch.
git checkout master
... the master branch holds static website contents.cp -r output/* ./
git add .
git commit -m "your message"
git push
Done!
The following are instructions copied from the pelican-ipynb plugin repository.
Write the post using the Jupyter Notebook interface, using markdown, equations, etc.
Place the .ipynb
file in the content folder and create a new file with the
same name as the ipython notebook with the extension .ipynb-meta
.
For example, if you have my_post.ipynb
create a my_post.ipynb-meta
.
The .ipynb-meta
should have the markdown metadata (note the empty line at the end, you need that)
of a regular pelican article:
Title:
Slug:
Date:
Category:
Tags:
Author:
Summary:
It is under the MIT license.