https://github.com/deeplearnphysics/blog
https://github.com/deeplearnphysics/blog
css html jupyter-notebooks pelican python
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/deeplearnphysics/blog
- Owner: DeepLearnPhysics
- License: mit
- Created: 2017-12-06T13:31:06.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2025-02-17T01:29:17.000Z (about 1 year ago)
- Last Synced: 2025-07-09T04:41:51.898Z (9 months ago)
- Topics: css, html, jupyter-notebooks, pelican, python
- Language: Jupyter Notebook
- Size: 252 MB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/DeepLearnPhysics/Blog)
[](https://raw.githubusercontent.com/DeepLearnPhysics/Blog/master/LICENSE)
# Blog
A repository for the DeepLearnPhysics group [Blog](https://deeplearnphysics.org/Blog) webpage.
The `master` branch holds static HTML files generated by [Pelican](http://docs.getpelican.com/en/stable/) with the [flex theme](https://github.com/alexandrevicenzi/Flex). We use the [pelican-ipynb](https://github.com/danielfrg/pelican-ipynb) plugin to easily turn a juypyter notebook into a blog.
The `develop` branch holds the source code to generate the website.
## Requirement
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](https://github.com/danielfrg/pelican-ipynb#Requirements) changed, please let us know or update it above!
## How to contribute (develop)
For awesome you to help development, follow the following three steps: **installation**, **compilation**, **development**, and **publish**.
### Installation
1. Join the [web-blog](https://github.com/orgs/DeepLearnPhysics/teams/web-blog) github team
2. Clone the repo: `git clone git@github.com:DeepLearnPhysics/Blog`.
3. Make sure you are on the `develop` branch by `git branch`
### Compilation
By compilation we mean generation of static HTMLs. This is fairly simple:
1. `make html`
### Development
Our development work is a process of modify-compile-check. The **first to-do** is:
1. Open `pelicanconf.py` and **uncomment** the line `#SITEURL = ''`. This generates HTMLs to be viewed locally.
2. `make devserver` then access `localhost: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.
3. Make modifications you wish to make. `contents` directory is where you make a _blog post_.
4. `make html` will update your local static website.
### Publish
After you finish your development work, if you want to publish your change on our website, you have to push your changes.
1. Open `pelicanconf.py` and **comment out** the line `SITEURL = ''`. This generates HTMLs to be viewed on the shared remote server.
2. `make html` and if you are running a local virtual server, `make stopserver`.
3. Commit your changes to the develop branch.
4. `git checkout master` ... the master branch holds static website contents.
5. `cp -r output/* ./`
6. `git add .`
7. `git commit -m "your message"`
8. `git push`
Done!
---
### Jupyter notebook
The following are instructions copied from the [pelican-ipynb](https://github.com/danielfrg/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:
```
---
### Copyright and license
It is under [the MIT license](/LICENSE).