get rid of 'pages' in urls

website
Jake VanderPlas 2017-08-14 19:22:01 -07:00
parent be2c01346b
commit 0bbb0e66ee
3 changed files with 5 additions and 37 deletions

View File

@ -1,27 +0,0 @@
title: About
slug: about
Template: about
<img src="/images/jake.jpg" align="left" width="150" style="padding-right:20px;"/>
My name is Jake VanderPlas.
I am an astronomer by training, and currently am the director open software
at the University of Washington's
[eScience Institute](http://escience.washington.edu/), where I spend time on
research, teaching, and developing software tools for science.
<br clear="left"/>
If you like my blog, you might also like my books:
<a href="http://shop.oreilly.com/product/0636920034919.do"><img src="/images/PythonDataScience.jpg" align="left" width="100" style="padding-right:20px;"/></a>
The *Python Data Science Handbook* by Jake VanderPlas (O'Reilly Media, 2016). This is a comprehensive introduction to the most important data science tools in the Python world. Several examples used in the book are drawn from posts on this blog.
The content is also available as Jupyter notebooks [on GitHub](http://github.com/jakevdp/PythonDataScienceHandbook).<br clear="left"/>
<a href="http://www.oreilly.com/programming/free/a-whirlwind-tour-of-python.csp"><img src="/images/WhirlwindTour.jpg" align="left" width="100" style="padding-right:20px;"/></a>
*A Whirlwind Tour of Python* by Jake VanderPlas (O'Reilly Media, 2016). This free e-book is a fast-paced intro to Python aimed at researchers and engineers. It's content is drawn from Python intro courses and tutorials that I have taught over the years.
The content is also available as Jupyter notebooks [on GitHub](http://github.com/jakevdp/WhirlwindTourOfPython).<br clear="left"/>
<a href="http://press.princeton.edu/titles/10159.html"><img src="/images/StatisticsDataMining.jpg" align="left" width="100" style="padding-right:20px;"/></a>
*Statistics, Machine Learning, and Data Mining in Astronomy* by Zeljko Ivezic, Andy Connolly, Jake VanderPlas, and Alex Gray (Princeton Press, 2014). This is a graduate-level text on statistical methods in astronomy, with emphasis on Python code.
Code from the book is available at [http://astroML.org/](http://astroML.org).<br clear="left"/>
Thanks for visiting!

View File

@ -1,6 +0,0 @@
Title: Python Data Science Handbook
URL:
save_as: index.html
Template: page
{% notebook notebooks/Index.ipynb cells[1:] %}

View File

@ -7,7 +7,8 @@ import nbformat
import shutil
PAGEFILE = """title: {title}
slug: {slug}
url:
save_as: {htmlfile}
Template: {template}
{{% notebook notebooks/{notebook_file} cells[{cells}] %}}
@ -27,8 +28,7 @@ PAGE_DEST_DIR = abspath_from_here('content', 'pages')
def copy_notebooks():
nblist = sorted(nb for nb in os.listdir(NB_SOURCE_DIR)
if nb.endswith('.ipynb'))
name_map = {nb: os.path.join('/PythonDataScienceHandbook', 'pages',
nb.rsplit('.', 1)[0].lower() + '.html')
name_map = {nb: nb.rsplit('.', 1)[0].lower() + '.html'
for nb in nblist}
figsource = abspath_from_here('..', 'notebooks', 'figures')
@ -77,9 +77,10 @@ def copy_notebooks():
nbformat.write(content, os.path.join(NB_DEST_DIR, nb))
pagefile = os.path.join(PAGE_DEST_DIR, base + '.md')
htmlfile = base.lower() + '.html'
with open(pagefile, 'w') as f:
f.write(PAGEFILE.format(title=title,
slug=base.lower(),
htmlfile=htmlfile,
notebook_file=nb,
template=template,
cells=cells))