mirror of
https://github.com/alvierahman90/gronk.git
synced 2024-11-28 18:09:53 +00:00
set default toc-depth to 6; add cli option to set it
This commit is contained in:
parent
15411335e9
commit
04609095d8
@ -117,6 +117,7 @@ def get_args():
|
||||
parser.add_argument('--fuse', type=pathlib.Path, default=pathlib.Path('/opt/notes2web/fuse.js'))
|
||||
parser.add_argument('--searchjs', type=pathlib.Path, default=pathlib.Path('/opt/notes2web/search.js'))
|
||||
parser.add_argument('--tocsearchjs', type=pathlib.Path, default=pathlib.Path('/opt/notes2web/toc_search.js'))
|
||||
parser.add_argument('--toc-depth', type=int, default=6, dest='toc_depth')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
@ -205,7 +206,7 @@ def main(args):
|
||||
'-V', f'filehistory={filehistory}',
|
||||
'-V', f'licenseFull={notes_license}',
|
||||
'--mathjax',
|
||||
'--toc'
|
||||
'--toc', f'--toc-depth={args.toc_depth}'
|
||||
])
|
||||
pathlib.Path(output_filename).parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user