Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-Generate Table of Contents Based on Input Directory #937

Open
martyanovandrey opened this issue Dec 11, 2024 · 0 comments
Open

Auto-Generate Table of Contents Based on Input Directory #937

martyanovandrey opened this issue Dec 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@martyanovandrey
Copy link
Contributor

Enhance the Diplodoc CLI by introducing a feature that automatically generates a toc.yaml if it does not already exist. The feature should create a structured Table of Contents reflecting the files in a directory. It is essential that:

  • Each file should have properly formatted titles for clarity.
  • The ToC generation process should ignore folder names starting with an underscore _.

Proposed Solution:
Implement a feature with the following capabilities:

  • Check if a toc.yaml file already exists in the directory.
  • If no toc.yaml is present, try to auto-generate one by scanning the directory's files.
  • Extract and format titles for each file.
  • Exclude any directories that start with an underscore _.

Use Cases:

  • Automatically maintaining a ToC for projects without manual input.
  • Ensuring that documentation hierarchies reflect actual file structures, excluding non-essential folders.

Benefits:

  • Eases the process of setting up new documentation directories by automatically generating a toc.yaml.
  • Maintains clarity by organizing content without displaying non-user-facing directories.
@martyanovandrey martyanovandrey changed the title Feature Request: Auto-Generate Table of Contents Based on Input Directory Auto-Generate Table of Contents Based on Input Directory Dec 11, 2024
@martyanovandrey martyanovandrey moved this to Todo in Help wanted Dec 11, 2024
@martyanovandrey martyanovandrey added the enhancement New feature or request label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant