diplodoc-platform / diplodoc-platform/cli
Enable Automatic Section Name Retrieval in toc.yaml
- Dominant language
- TypeScript
- Stars
- 123
- Forks
- 51
- Avg merge
- 10h 50m
- Merged PRs (30d)
- 38
Description
**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
Contributor guide
Assessment
This issue has not been assessed yet.