lsms-worldbank / adodownr

⏬ Create Quarto package documentation website for Stata packages
Other
6 stars 1 forks source link

Use command name rather than file name as title of reference docs #4

Closed arthur-shaw closed 9 months ago

arthur-shaw commented 1 year ago

Currently, when md files are transformed into qmd files, the file name is taken as the title if no title is provided in the md file's YAML (or if no YAML exists). This results in awkward titles (e.g., mycommand.md)

Instead, compose the title from the file name minus the extension (e.g., mycommand.md -> title: mycommand). This is a reasonable choice since files typically bear the name of the command they contain.

arthur-shaw commented 9 months ago

Consider also finding the title in a few places.

Prime candidate is on a line between # Title and # Syntax in adodown-generated md files.

For example:

# Title

__lbl_assert_var_have_lbl__ - List variables without a variable label.

# Syntax

Consider--perhaps in the futre--looking for other title locations in the file: