Draft/Release Workflow

teachbooks.release.clean_yaml(path_source: str | Path, path_output: str | Path) None

Removes sections marked with # <START|END> REMOVE-FROM-PUBLISH or REMOVE-FROM-RELEASE from a yaml file

Does not require a specific indentation and can be used an unlimited number of times in the *.yml file. Commonly applied to _toc.yml and _config.yml files of a book.

Example: .. code:: python

  • file: subdirectory_1/intro_page

sections: - file: subdirectory_1/sub_page_1 # START REMOVE-FROM-PUBLISH - file: subdirectory_1/sub_page_2 # END REMOVE-FROM-PUBLISH # START REMOVE-FROM-RELEASE - file: subdirectory_1/sub_page_3 # END REMOVE-FROM-RELEASE - file: subdirectory_2/intro_page