def iter_navbars(): for prev_nb, nb, next_nb in prev_this_next(iter_notebooks()): navbar = NAV_COMMENT if prev_nb: navbar += PREV_TEMPLATE.format(title=get_notebook_title(prev_nb), url=prev_nb) navbar += CONTENTS if next_nb: navbar += NEXT_TEMPLATE.format(title=get_notebook_title(next_nb), url=next_nb) yield os.path.join(NOTEBOOK_DIR, nb), navbar
def iter_navbars(): for prev_nb, nb, next_nb in prev_this_next(iter_notebooks()): navbar = NAV_COMMENT if prev_nb: navbar += PREV_TEMPLATE.format(title=get_notebook_title(prev_nb), url=prev_nb) navbar += CONTENTS if next_nb: navbar += NEXT_TEMPLATE.format(title=get_notebook_title(next_nb), url=next_nb) yield os.path.join(NOTEBOOK_DIR, nb), navbar