Skip to content

feat: Add anchor tags to ReadMe headings of html fragments. #74

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rahulptl165
Copy link

Resolves #32 .

Checklist

Please ensure the following tasks are completed before submitting this pull request.

  • Read and understand the Code of Conduct.
  • Read and understood the licensing terms.
  • Searched for existing issues and pull requests before submitting this pull request.
  • Filed an issue (or an issue already existed) prior to submitting this pull request.
  • Rebased onto latest master.
  • Submitted against master branch.

Description

  • This pull request introduces enhancements to the html generation process by adding anchor tags with IDs to headings in the readme files.
  • additionally css styles added to display a link icon on hover, similar to how github displayes it.

changes

  • Added the processHeadings function to handle the processing of HTML files in the specified directory.
  • Implemented the processDir function to recursively traverse directories and process HTML files.
  • Modified the HTML content to include anchor tags for headings, allowing for direct linking to specific sections.
  • Introduced new CSS styles for the .heading-wrapper and .heading-link classes to manage the positioning and visibility of the anchor links.
  • The anchor links are now hidden by default and become visible on hover, enhancing the user experience.

Related Issues

This pull request:

Screen recording of new ui behaviour

Screen.Recording.2025-03-10.222436.mp4

@stdlib-js/reviewers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: add link elements to README section headings to allow linking to that section
1 participant