Skip to content

Commit 5dd3244

Browse files
committed
Update publish info
1 parent db6e9e8 commit 5dd3244

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

‎website/Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ CLOUDFILES_CONTAINER=my_cloudfiles_container
2525

2626
DROPBOX_DIR=~/Dropbox/Public/
2727

28-
GITHUB_PAGES_REMOTE[email protected]:jakevdp/jakevdp.github.io.git
29-
GITHUB_PAGES_BRANCH=master
28+
GITHUB_PAGES_REMOTE[email protected]:jakevdp/PythonDataScienceHandbook.git
29+
GITHUB_PAGES_BRANCH=gh-pages
3030

3131
GIT_COMMIT_HASH = $(shell git rev-parse HEAD)
3232

‎website/copy_notebooks.py‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
PAGEFILE="""title:{title}
1010
slug:{slug}
11-
Template: page
11+
Template: {template}
1212
1313
{{% notebook notebooks/{notebook_file} cells[{cells}] %}}
1414
"""
@@ -38,7 +38,7 @@ def copy_notebooks():
3838
shutil.copytree(figsource, figdest)
3939

4040
figurelist=os.listdir(abspath_from_here('content', 'figures'))
41-
figure_map={os.path.join('figures', fig) : os.path.join('/figures', fig)
41+
figure_map={os.path.join('figures', fig) : os.path.join('/PythonDataScienceHandbook/figures', fig)
4242
forfiginfigurelist}
4343

4444
fornbinnblist:
@@ -50,16 +50,20 @@ def copy_notebooks():
5050

5151
ifnb=='Index.ipynb':
5252
cells='1:'
53+
template='page'
5354
title='Python Data Science Handbook'
5455
else:
5556
cells='2:'
56-
# put nav below title
57+
template='booksection'
5758
title=content.cells[2].source
5859
ifnottitle.startswith('#') orlen(title.splitlines()) >1:
5960
raiseValueError('title not found in third cell')
6061
title=title.lstrip('#').strip()
61-
content.cells[1], content.cells[2] =content.cells[2], content.cells[1]
6262

63+
# put nav below title
64+
content.cells[0], content.cells[1], content.cells[2] =content.cells[2], content.cells[0], content.cells[1]
65+
66+
# Replace internal URLs and figure links in notebook
6367
forcellincontent.cells:
6468
ifcell.cell_type=='markdown':
6569
fornbname, htmlnameinname_map.items():
@@ -76,6 +80,7 @@ def copy_notebooks():
7680
f.write(PAGEFILE.format(title=title,
7781
slug=base.lower(),
7882
notebook_file=nb,
83+
template=template,
7984
cells=cells))
8085

8186
if__name__=='__main__':

‎website/pelicanconf.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
GITHUB_USERNAME='jakevdp'
5555
STACKOVERFLOW_ADDRESS='http://stackoverflow.com/users/2937831/jakevdp'
5656
AUTHOR_WEBSITE='http://vanderplas.com'
57+
AUTHOR_BLOG='http://jakevdp.github.io'
5758
AUTHOR_CV="http://staff.washington.edu/jakevdp/media/pdfs/CV.pdf"
5859
SHOW_ARCHIVES=True
5960
SHOW_FEED=False# Need to address large feeds

‎website/publishconf.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
sys.path.append(os.curdir)
1111
frompelicanconfimport*
1212

13-
SITEURL='http://jakevdp.github.io'
13+
SITEURL='http://jakevdp.github.io/PythonDataScienceHandbook'
1414
RELATIVE_URLS=False
1515

16-
SHOW_FEED=True
16+
SHOW_FEED=False
1717
FEED_ALL_ATOM='feeds/all.atom.xml'
1818
CATEGORY_FEED_ATOM='feeds/%s.atom.xml'
1919
FEED_USE_SUMMARY=True# from the feed_summary plugin

‎website/theme/templates/about.html‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ <h1>{{page.title }}</h1>
1616
{% if AUTHOR_WEBSITE %}
1717
<li><ahref="{{AUTHOR_WEBSITE }}" rel="me">website</a></li>
1818
{% endif %}
19+
{% if AUTHOR_BLOG %}
20+
<li><ahref="{{AUTHOR_BLOG }}" rel="me">blog</a></li>
21+
{% endif %}
1922
{% if AUTHOR_CV %}
2023
<li><ahref="{{AUTHOR_CV }}" rel="me">CV</a></li>
2124
{% endif %}

0 commit comments

Comments
(0)