File tree Expand file tree Collapse file tree 3 files changed +5
-37
lines changed Expand file tree Collapse file tree 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 77import shutil
88
99PAGEFILE = """title: {title}
10- slug: {slug}
10+ url:
11+ save_as: {htmlfile}
1112Template: {template}
1213
1314{{% notebook notebooks/{notebook_file} cells[{cells}] %}}
@@ -27,8 +28,7 @@ def abspath_from_here(*args):
2728def copy_notebooks ():
2829 nblist = sorted (nb for nb in os .listdir (NB_SOURCE_DIR )
2930 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'
3232 for nb in nblist }
3333
3434 figsource = abspath_from_here ('..' , 'notebooks' , 'figures' )
@@ -77,9 +77,10 @@ def copy_notebooks():
7777 nbformat .write (content , os .path .join (NB_DEST_DIR , nb ))
7878
7979 pagefile = os .path .join (PAGE_DEST_DIR , base + '.md' )
80+ htmlfile = base .lower () + '.html'
8081 with open (pagefile , 'w' ) as f :
8182 f .write (PAGEFILE .format (title = title ,
82- slug = base . lower () ,
83+ htmlfile = htmlfile ,
8384 notebook_file = nb ,
8485 template = template ,
8586 cells = cells ))
You can’t perform that action at this time.
0 commit comments