Pelican can integrate jupyter notebook, so it is very good for teaching.
A New Way to Write Post
To work it out, it is better to learn virtualenv. https://www.youtube.com/watch?v=YJC6ldI3hWk https://www.youtube.com/watch?v=N5vscPTWKOk&feature=iv&src_vid=YJC6ldI3hWk&annotation_id=video%3A3a29d8ac-a514-4a7e-92f5-ddcdea72a222
now some pelican themes can support ipython plug in.
- ipynb plug in https://github.com/danielfrg/pelican-ipynb
The author of this plugin has his own theme. Pretty good. https://github.com/danielfrg/danielfrg.github.io-source
-
I use elegant theme, but it only works in python 2.7 for some packages dependency reason.
- octpress such as jack http://jakevdp.github.io/blog/2013/05/07/migrating-from-octopress-to-pelican/
-
bootstrap 3 such as standage.github.io-pelican
- Flex
the code highlighting is now working very well.
pip install typogrify
Visitor’s browser will make separate HTTP requests to fetch elegent.css
,
custom.css
, pygments.css
and tipuesearch.css
. These four separate
requests can be avoided using Pelican plugin
assets
.
Install the required packages
:::bash
pip install webassets cssmin
Then enable assets
plugin in your configuration.
:::python
PLUGINS = ['assets']
This minor fix will improve the load speed of your website. All four style
sheets will be merged and minified into one style sheet, style.min.css
.
Compact CSS will save many bytes of data which in turn will improve page speed and parse time.
Nikola
might be a alternative for pelican. http://www.damian.oquanta.info/posts/deploy-your-nikola-powered-blog-content-from-the-ipython-notebook.html
It suppport ipython notebook well and speed faster.
http://www.damian.oquanta.info/index.html
is a very good blog about using ipython notebook.
Very good information of programming as well.
DEPLOY_COMMANDS = [“git add .”, “git commit -am ‘Update’”, “git push origin master”, “git subtree split –prefix output -b gh-pages”, “git push -f origin gh-pages:gh-pages”, “git branch -D gh-pages”]
Do you want to easily deploy your site to Github pages?
OK, here we go…
You have to upload your complete blog/site to a new Github repository (you know how to do it... if not, probably you need to learn some things before try this one, hehe). As a plus, now your blog/site is version-controlled!
Almost for sure, your site/blog lives in the master branch of the new repository, but you need to generated a gh-pages branch to push your build or output folder, I mean your site/blog content to deploy... not all the machinery of your site/blog platform (Nikola in my case):
git checkout -b gh-pages
git rm -rf .
git commit -am "First commit to gh-pages branch"
git push origin gh-pages
Now, we will use a git-subtree technique to push the build or output content to the gh-pages branch:
git checkout master
git push origin `git subtree split --prefix output gh-pages`:gh-pages --force
Sweet line... uhh ;-)
Finally, you will need to run the following line every time you want to update your site/blog!
git subtree push --prefix output origin gh-pages
Note: Are you getting git errors? Just use the sweet line again and force the update…
If you are using Nikola, you can add some of this lines to the DEPLOY_COMMANDS in your conf.py file and just run nikola deploy after building your site/blog.
More easier… impossible… ;-)
Damián.
UPDATE: Not enough happy with step 3 and 4 (essentially because of some git errors), I figured out a cleaner solution:
New 3. Now, we will use a git-subtree technique to push the build or output content to the gh-pages branch. You will need to run the following lines every time you want to update your site/blog!
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix output -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
jekyll with ipython notebook
http://christop.club/2014/02/21/blogging-with-ipython-and-jekyll/