Skip to content

Commit 06acf6a

Browse files
committed
Update
1 parent a6b3ba9 commit 06acf6a

File tree

252 files changed

+5286
-651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+5286
-651
lines changed

.doit.db

108 KB
Binary file not shown.

.ipynb_checkpoints/48-themes-for-your-ipython-notebook-checkpoint.ipynb

Lines changed: 1055 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"metadata": {
3+
"name": "",
4+
"signature": "sha256:5614b85028faa5e18a162dc611910999f7a87c1d59b1fc6859e10bbb87bb7c04"
5+
},
6+
"nbformat": 3,
7+
"nbformat_minor": 0,
8+
"worksheets": [
9+
{
10+
"cells": [
11+
{
12+
"cell_type": "heading",
13+
"level": 1,
14+
"metadata": {},
15+
"source": [
16+
"Adding a new post"
17+
]
18+
},
19+
{
20+
"cell_type": "code",
21+
"collapsed": false,
22+
"input": [
23+
"title = \"Bidirectional IPython-Nikola workflow to write your blog post\""
24+
],
25+
"language": "python",
26+
"metadata": {},
27+
"outputs": [],
28+
"prompt_number": 1
29+
},
30+
{
31+
"cell_type": "code",
32+
"collapsed": false,
33+
"input": [
34+
"tags_list = ['python', 'IPython', 'nikola', 'blog', 'extension', 'gh-pages', 'git', 'workflow']"
35+
],
36+
"language": "python",
37+
"metadata": {},
38+
"outputs": []
39+
},
40+
{
41+
"cell_type": "code",
42+
"collapsed": false,
43+
"input": [
44+
"tags = ', '.join(tags_list)\n",
45+
"\n",
46+
"!nikola new_post -f ipynb -t \"{title}\" --tags=\"{tags}\""
47+
],
48+
"language": "python",
49+
"metadata": {},
50+
"outputs": []
51+
},
52+
{
53+
"cell_type": "code",
54+
"collapsed": false,
55+
"input": [
56+
"base_url = \"http://127.0.0.1:\"\n",
57+
"port = 8888\n",
58+
"\n",
59+
"from nikola import utils\n",
60+
"notebook = \"/notebooks/posts/\" + utils.slugify(unicode(title)) + \".ipynb\" \n",
61+
"\n",
62+
"url = base_url + str(port) + notebook\n",
63+
"print url"
64+
],
65+
"language": "python",
66+
"metadata": {},
67+
"outputs": [
68+
{
69+
"output_type": "stream",
70+
"stream": "stdout",
71+
"text": [
72+
"http://127.0.0.1:8888/notebooks/posts/bidirectional-ipython-nikola-workflow-to-write-your-blog-post.ipynb\n"
73+
]
74+
}
75+
],
76+
"prompt_number": 8
77+
},
78+
{
79+
"cell_type": "code",
80+
"collapsed": false,
81+
"input": [],
82+
"language": "python",
83+
"metadata": {},
84+
"outputs": []
85+
}
86+
],
87+
"metadata": {}
88+
}
89+
]
90+
}
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
{
2+
"metadata": {
3+
"name": "",
4+
"signature": "sha256:b953effc014b5da357eaabb604a9f5a20eeb99f0b74fb48f4521e24421e91606"
5+
},
6+
"nbformat": 3,
7+
"nbformat_minor": 0,
8+
"worksheets": [
9+
{
10+
"cells": [
11+
{
12+
"cell_type": "markdown",
13+
"metadata": {},
14+
"source": [
15+
"OK, time to recap some things... As you know, [**Nikola**](http://getnikola.com/) 7.0.0 was released some weeks ago. It has a lot of improvements, bug fixes and new features. I recommend you to download and try it!\n",
16+
"As part of the release, we paid attention to update all the plugins and themes inside the **Nikola Github organization** (don't forget you can contribute with your own [plugins](https://github.com/getnikola/plugins) and [themes](https://github.com/getnikola/nikola-themes)!). So, I updated my own themes, in particular, the **Zen** ones.\n",
17+
"<!-- TEASER_END -->\n",
18+
"\n",
19+
"As you also now, **IPython 2.x** was released just some weeks ago too. So, I took into account this two releases and updated the **Zen** themes to be compatible with both of them.\n",
20+
"As a consequence of the update, the `zen-ipython` theme has change a little bit, some bugs were fixed and some features enabled. You can probably has noticed that if you visit my blog in the last two weeks. If you did not notice, first, buy some glasses ;-), and then, take a tour, visit some of my old posts (there are interesting new comments every week) and enjoy the new theme.\n",
21+
"\n",
22+
"And... don't forget! You can get the **Zen** themes very easily. First, to list all the available themes at the **Nikola** themes repo:"
23+
]
24+
},
25+
{
26+
"cell_type": "code",
27+
"collapsed": false,
28+
"input": [
29+
"!nikola install_theme -l"
30+
],
31+
"language": "python",
32+
"metadata": {},
33+
"outputs": [
34+
{
35+
"output_type": "stream",
36+
"stream": "stdout",
37+
"text": [
38+
"Themes:\r\n",
39+
"-------\r\n",
40+
"blogtxt\r\n",
41+
"bootstrap3-gradients\r\n",
42+
"bootstrap3-gradients-jinja\r\n",
43+
"ipython\r\n",
44+
"ipython-xkcd\r\n",
45+
"monospace\r\n",
46+
"oldfashioned\r\n",
47+
"planetoid\r\n",
48+
"readable\r\n",
49+
"reveal\r\n",
50+
"reveal-jinja\r\n",
51+
"zen\r\n",
52+
"zen-ipython\r\n",
53+
"zen-jinja\r\n"
54+
]
55+
},
56+
{
57+
"output_type": "stream",
58+
"stream": "stdout",
59+
"text": [
60+
"\u001b[0m"
61+
]
62+
}
63+
],
64+
"prompt_number": 1
65+
},
66+
{
67+
"cell_type": "markdown",
68+
"metadata": {},
69+
"source": [
70+
"Of course, don't use the `!` at the beginning of the line if you are outside **IPython**. \n",
71+
"\n",
72+
"To install one of them, just write:"
73+
]
74+
},
75+
{
76+
"cell_type": "code",
77+
"collapsed": false,
78+
"input": [
79+
"!nikola install_theme zen-ipython"
80+
],
81+
"language": "python",
82+
"metadata": {},
83+
"outputs": [
84+
{
85+
"output_type": "stream",
86+
"stream": "stdout",
87+
"text": [
88+
"\u001b[33;01m[2014-05-30T18:28:23Z] WARNING: Nikola: Cannot load theme \"zen-ipython\", using 'bootstrap' instead.\r\n",
89+
"\u001b[39;49;00m"
90+
]
91+
},
92+
{
93+
"output_type": "stream",
94+
"stream": "stdout",
95+
"text": [
96+
"\u001b[37m[2014-05-30T18:28:24Z] INFO: install_theme: Downloading: http://themes.getnikola.com/v7/zen-ipython.zip\r\n",
97+
"\u001b[39;49;00m"
98+
]
99+
},
100+
{
101+
"output_type": "stream",
102+
"stream": "stdout",
103+
"text": [
104+
"\u001b[37m[2014-05-30T18:28:24Z] INFO: install_theme: Extracting: zen-ipython into themes\r\n",
105+
"\u001b[39;49;00m\u001b[33;01m[2014-05-30T18:28:24Z] NOTICE: install_theme: This theme has a sample config file. Integrate it with yours in order to make this theme work!\r\n",
106+
"\u001b[39;49;00mContents of the conf.py.sample file:\r\n",
107+
"\r\n"
108+
]
109+
},
110+
{
111+
"output_type": "stream",
112+
"stream": "stdout",
113+
"text": [
114+
" NAVIGATION_LINKS\u001b[39;49;00m \u001b[39;49;00m=\u001b[39;49;00m \u001b[39;49;00m{\u001b[39;49;00m\r\n",
115+
" \u001b[39;49;00mDEFAULT_LANG\u001b[39;49;00m:\u001b[39;49;00m \u001b[39;49;00m(\u001b[39;49;00m\r\n",
116+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33m/index.html\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mHome\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-home\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
117+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33m/archive.html\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mArchives\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-folder-open-alt\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
118+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33m/categories/index.html\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mTags\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-tags\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
119+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33m/rss.xml\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mRSS\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-rss\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
120+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mhttp://getnikola.com\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mAbout me\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-user\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
121+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mhttps://twitter.com/getnikola\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mMy Twitter\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-twitter\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
122+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mhttps://github.com/getnikola\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mMy Github\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-github\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
123+
" \u001b[39;49;00m)\u001b[39;49;00m\r\n",
124+
" }\u001b[39;49;00m\r\n",
125+
"\r\n",
126+
"\u001b[37m[2014-05-30T18:28:24Z] INFO: install_theme: Downloading: http://themes.getnikola.com/v7/zen-jinja.zip\r\n",
127+
"\u001b[39;49;00m"
128+
]
129+
},
130+
{
131+
"output_type": "stream",
132+
"stream": "stdout",
133+
"text": [
134+
"\u001b[37m[2014-05-30T18:28:26Z] INFO: install_theme: Extracting: zen-jinja into themes\r\n",
135+
"\u001b[39;49;00m\u001b[33;01m[2014-05-30T18:28:26Z] NOTICE: install_theme: This theme has a sample config file. Integrate it with yours in order to make this theme work!\r\n",
136+
"\u001b[39;49;00mContents of the conf.py.sample file:\r\n",
137+
"\r\n"
138+
]
139+
},
140+
{
141+
"output_type": "stream",
142+
"stream": "stdout",
143+
"text": [
144+
" NAVIGATION_LINKS\u001b[39;49;00m \u001b[39;49;00m=\u001b[39;49;00m \u001b[39;49;00m{\u001b[39;49;00m\r\n",
145+
" \u001b[39;49;00mDEFAULT_LANG\u001b[39;49;00m:\u001b[39;49;00m \u001b[39;49;00m(\u001b[39;49;00m\r\n",
146+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33m/index.html\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mHome\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-home\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
147+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33m/archive.html\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mArchives\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-folder-open-alt\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
148+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33m/categories/index.html\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mTags\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-tags\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
149+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33m/rss.xml\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mRSS\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-rss\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
150+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mhttp://getnikola.com\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mAbout me\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-user\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
151+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mhttps://twitter.com/getnikola\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mMy Twitter\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-twitter\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
152+
" \u001b[39;49;00m(\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mhttps://github.com/getnikola\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33mMy Github\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m,\u001b[39;49;00m \u001b[39;49;00m\u001b[33m'\u001b[39;49;00m\u001b[33micon-github\u001b[39;49;00m\u001b[33m'\u001b[39;49;00m)\u001b[39;49;00m,\u001b[39;49;00m\r\n",
153+
" \u001b[39;49;00m)\u001b[39;49;00m\r\n",
154+
" }\u001b[39;49;00m\r\n",
155+
"\r\n",
156+
"\u001b[33;01m[2014-05-30T18:28:26Z] NOTICE: install_theme: Remember to set THEME=\"zen-ipython\" in conf.py to use this theme.\r\n",
157+
"\u001b[39;49;00m"
158+
]
159+
},
160+
{
161+
"output_type": "stream",
162+
"stream": "stdout",
163+
"text": [
164+
"\u001b[0m"
165+
]
166+
}
167+
],
168+
"prompt_number": 2
169+
},
170+
{
171+
"cell_type": "markdown",
172+
"metadata": {},
173+
"source": [
174+
"and your theme will be available at the themes folder in your site.\n",
175+
"\n",
176+
"OK, short post for today, more coming soon.\n",
177+
"\n",
178+
"Dami\u00e1n."
179+
]
180+
}
181+
],
182+
"metadata": {}
183+
}
184+
]
185+
}

0 commit comments

Comments
 (0)