Skip to content

Commit 75d4a72

Browse files
committed
Add commandline option for publish to exclude the TOC
1 parent 73032f7 commit 75d4a72

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

doorstop/cli/commands.py

+2
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,8 @@ def run_publish(args, cwd, error, catch=True):
563563
kwargs = {}
564564
if args.width:
565565
kwargs["width"] = args.width
566+
if args.no_toc:
567+
kwargs["toc"] = False
566568

567569
# Write to output file(s)
568570
if args.path:

doorstop/cli/main.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,12 @@ def _publish(subs, shared):
536536
help="do not include levels on heading and non-heading or non-heading items",
537537
)
538538
sub.add_argument("--template", help="template file", default=None)
539-
539+
sub.add_argument(
540+
"--no-toc",
541+
action="store_true",
542+
help="do not include a table-of-contents in the output",
543+
)
544+
540545

541546
if __name__ == "__main__":
542547
main()

0 commit comments

Comments
 (0)