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

Enable Automatic Section Name Retrieval in toc.yaml #903

Open
martyanovandrey opened this issue Nov 19, 2024 · 0 comments
Open

Enable Automatic Section Name Retrieval in toc.yaml #903

martyanovandrey opened this issue Nov 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@martyanovandrey
Copy link
Contributor

Description
Enhance the toc.yaml functionality by enabling automatic retrieval of section names from the first-level heading (# Heading in Markdown) of the file specified in the href, if the name is not provided.

Proposed Enhancement

  • Modify the logic to fetch the section name directly from the file when name is absent.

Benefits

  • Reduces redundancy and streamlines the documentation process.
  • Ensures consistency by automatically reflecting titles from the files.

Acceptance Criteria

  • Sections in toc.yaml without a name use the first-level heading from the href file.
  • Update documentation and examples to demonstrate this feature.
  • Add tests to verify the feature works correctly and does not impact existing functionality.

Additional Notes

  • Define fallback behavior if the file lacks a first-level heading.
  • Consider performance impacts in large projects.

Entry point for development
https://github.com/diplodoc-platform/cli/blob/master/src/services/tocs.ts

@martyanovandrey martyanovandrey moved this to Todo in Help wanted Nov 19, 2024
@martyanovandrey martyanovandrey added the enhancement New feature or request label Nov 19, 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