2018-08-28 14:11:16 -07:00
|
|
|
2# Tools for creating http://jakevdp.github.io/PythonDataScienceHandbook/
|
2017-08-15 07:53:23 -07:00
|
|
|
|
2017-08-16 11:07:22 -07:00
|
|
|
The website is generated using the [Pelican](http://docs.getpelican.com/) static site generator.
|
|
|
|
|
The themes here are adapted from those used for my blog: https://github.com/jakevdp/jakevdp.github.io-source
|
|
|
|
|
|
|
|
|
|
## Building the Website
|
2017-08-15 07:53:23 -07:00
|
|
|
|
|
|
|
|
Clone the repository & make sure submodules are included
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ git clone https://github.com/jakevdp/PythonDataScienceHandbook.git
|
|
|
|
|
$ git checkout origin/website
|
|
|
|
|
$ git submodule update --init --recursive
|
|
|
|
|
$ cd website
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Install the required packages:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ conda create -n pelican-blog python=3.5 jupyter notebook
|
|
|
|
|
$ source activate pelican-blog
|
|
|
|
|
$ pip install pelican Markdown ghp-import
|
2018-08-28 14:11:16 -07:00
|
|
|
$ mkdir plugins
|
|
|
|
|
$ git submodule add git://github.com/danielfrg/pelican-ipynb.git plugins/ipynb
|
|
|
|
|
$ git submodule add https://github.com/getpelican/pelican-plugins.git plugins/pelican-plugins
|
2017-08-15 07:53:23 -07:00
|
|
|
```
|
|
|
|
|
|
2017-08-16 10:39:07 -07:00
|
|
|
Copy the notebook content to the right location (this script also modifies some links for the HTML):
|
|
|
|
|
```
|
|
|
|
|
$ python copy_notebooks.py
|
|
|
|
|
```
|
|
|
|
|
|
2017-08-15 07:53:23 -07:00
|
|
|
Build the html and serve locally:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ make html
|
|
|
|
|
$ make serve
|
|
|
|
|
$ open http://localhost:8000
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Deploy to github pages
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ make publish-to-github
|
2017-08-16 10:39:07 -07:00
|
|
|
```
|