Skip to content

Commit

Permalink
feature: Add commandline option for publish to exclude the TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
robtaylor committed Oct 16, 2024
1 parent 79c37b8 commit 415c83c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doorstop/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@ def run_publish(args, cwd, error, catch=True):
kwargs = {}
if args.width:
kwargs["width"] = args.width
if args.no_toc:
kwargs["toc"] = False

if args.index:
kwargs["index"] = True
Expand Down
5 changes: 5 additions & 0 deletions doorstop/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@ def _publish(subs, shared):
help="Generate top level index (when producing markdown).",
action="store_true",
)
sub.add_argument(
"--no-toc",
action="store_true",
help="do not include a table-of-contents in the output",
)


if __name__ == "__main__":
Expand Down

0 comments on commit 415c83c

Please sign in to comment.