File tree 3 files changed +5
-37
lines changed
3 files changed +5
-37
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 7
7
import shutil
8
8
9
9
PAGEFILE = """title: {title}
10
- slug: {slug}
10
+ url:
11
+ save_as: {htmlfile}
11
12
Template: {template}
12
13
13
14
{{% notebook notebooks/{notebook_file} cells[{cells}] %}}
@@ -27,8 +28,7 @@ def abspath_from_here(*args):
27
28
def copy_notebooks ():
28
29
nblist = sorted (nb for nb in os .listdir (NB_SOURCE_DIR )
29
30
if nb .endswith ('.ipynb' ))
30
- name_map = {nb : os .path .join ('/PythonDataScienceHandbook' , 'pages' ,
31
- nb .rsplit ('.' , 1 )[0 ].lower () + '.html' )
31
+ name_map = {nb : nb .rsplit ('.' , 1 )[0 ].lower () + '.html'
32
32
for nb in nblist }
33
33
34
34
figsource = abspath_from_here ('..' , 'notebooks' , 'figures' )
@@ -77,9 +77,10 @@ def copy_notebooks():
77
77
nbformat .write (content , os .path .join (NB_DEST_DIR , nb ))
78
78
79
79
pagefile = os .path .join (PAGE_DEST_DIR , base + '.md' )
80
+ htmlfile = base .lower () + '.html'
80
81
with open (pagefile , 'w' ) as f :
81
82
f .write (PAGEFILE .format (title = title ,
82
- slug = base . lower () ,
83
+ htmlfile = htmlfile ,
83
84
notebook_file = nb ,
84
85
template = template ,
85
86
cells = cells ))
You can’t perform that action at this time.
0 commit comments