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

Support Backlinks from definition to usage #3

Closed
about-code opened this issue Aug 24, 2019 · 1 comment · Fixed by #46
Closed

Support Backlinks from definition to usage #3

about-code opened this issue Aug 24, 2019 · 1 comment · Fixed by #46
Labels
enhancement New feature or request
Milestone

Comments

@about-code
Copy link
Owner

about-code commented Aug 24, 2019

User Story

As a user I want to have a link from the definition of a term to its occurrences in text.

Alternatively the software may offer an option to generate an index document which lists all glossary terms (without their detailed definition). Every term links to the term's glossary definition as well as to the parent section of the paragraph where it was found in text. The link to its definition may always be the first one. Multiple occurrences in the same section of a document only generate one section link in the index.

For example an index could look like

Index

@about-code about-code added the enhancement New feature or request label Aug 24, 2019
@about-code about-code modified the milestone: v1.0.0 Sep 1, 2019
@about-code about-code added this to the v3.0.0 milestone Dec 7, 2019
@about-code
Copy link
Owner Author

about-code commented Dec 7, 2019

This could require a breaking change since the section headings of non-glossary documents must be made navigable. To be navigable they must be wrapped into links as we do for glossary headings already, e.g. with remark-autolink-headings. However, this could potentially alter manually created, navigable headings and their URL fragments. Changing the fragment could result in broken cross-links or bookmarks (they'll still find the page but make the HTML viewer no longer scroll to the correct position).

about-code added a commit that referenced this issue Dec 13, 2019
…ere they are being mentioned. (#3)

Adds a new config option 'indexFile'. Details see README.md
about-code added a commit that referenced this issue Dec 14, 2019
feat: Generate an index from glossary terms and links to sections where they are being mentioned. Enable with new config option 'generateFiles.indexFile'. Details see README.md (#3)

BREAKING CHANGE:
With this change section headings will be automatically linkified. URL fragments of section headings may change thus affecting inter-document cross-links or bookmarks of already published documentation. Note: links and bookmarks will continue to point the same *page* yet not the correct section on that page. Prior section headings which have manually been wrapped into markdown link brackets may get wrapped twice. Review any output prior to publishing it.
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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant