nbdev/cli.py
def make_sidebar():
    "Making sidebar for the doc website form the content of `doc_folder/sidebar.json`"
    if not (Config().doc_path/'sidebar.json').exists() or Config().custom_sidebar == 'False': create_default_sidebar()
    sidebar_d = json.load(open(Config().doc_path/'sidebar.json', 'r'))
    res = _side_dict('Sidebar', sidebar_d)
    res = {'entries': [res]}
    res_s = yaml.dump(res, default_flow_style=False)
    res_s = res_s.replace('- subfolders:', '  subfolders:').replace(' - - ', '   - ')
    res_s = f"""
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# Instead edit {'../../sidebar.json'}
"""+res_s
    open(Config().doc_path/'_data/sidebars/home_sidebar.yml', 'w').write(res_s)
Making sidebar for the doc website form the content of `doc_folder/sidebar.json`
Making sidebar for the doc website form the content of `doc_folder/sidebar.json`
Making sidebar for the doc website form the content of ` doc_folder / sidebar . json `
def make_sidebar():
    if not (Config().doc_path/'sidebar.json').exists() or Config().custom_sidebar == 'False': create_default_sidebar()
    sidebar_d = json.load(open(Config().doc_path/'sidebar.json', 'r'))
    res = _side_dict('Sidebar', sidebar_d)
    res = {'entries': [res]}
    res_s = yaml.dump(res, default_flow_style=False)
    res_s = res_s.replace('- subfolders:', '  subfolders:').replace(' - - ', '   - ')
    res_s = f"""
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# Instead edit {'../../sidebar.json'}
"""+res_s
    open(Config().doc_path/'_data/sidebars/home_sidebar.yml', 'w').write(res_s)
def make_sidebar ( ) : if not ( Config ( ) . doc_path / 'sidebar.json' ) . exists ( ) or Config ( ) . custom_sidebar == 'False' : create_default_sidebar ( ) sidebar_d = json . load ( open ( Config ( ) . doc_path / 'sidebar.json' , 'r' ) ) res = _side_dict ( 'Sidebar' , sidebar_d ) res = { 'entries' : [ res ] } res_s = yaml . dump ( res , default_flow_style = False ) res_s = res_s . replace ( '- subfolders:' , '  subfolders:' ) . replace ( ' - - ' , '   - ' ) res_s = f"""
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# Instead edit {'../../sidebar.json'}
""" + res_s open ( Config ( ) . doc_path / '_data/sidebars/home_sidebar.yml' , 'w' ) . write ( res_s )
Making sidebar for the doc website form the content of `doc_folder/sidebar.json`
Making sidebar for the doc website form the content of ` doc_folder / sidebar . json `
"Making sidebar for the doc website form the content of `doc_folder/sidebar.json`"