-
Notifications
You must be signed in to change notification settings - Fork 35
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
Feature request: add option to ignore relative links #105
Comments
fricklerhandwerk
added a commit
to fricklerhandwerk/nix
that referenced
this issue
Aug 26, 2022
this simplifies the setup a lot, and avoids weird looking `./file.md` links showing up. it also does not show regular URLs any more. currently the command reference only has few of them, and not showing them in the offline documentation is hopefully not a big deal. instead of building more special-case solutions, clumsily preprocessing the input, or issuing verbal rules on dealing with URLs, should better be solved sustainably by not rendering relative links in `lowdown`: kristapsdz/lowdown#105
fricklerhandwerk
added a commit
to fricklerhandwerk/nix
that referenced
this issue
Aug 26, 2022
this simplifies the setup a lot, and avoids weird looking `./file.md` links showing up. it also does not show regular URLs any more. currently the command reference only has few of them, and not showing them in the offline documentation is hopefully not a big deal. instead of building more special-case solutions, clumsily preprocessing the input, or issuing verbal rules on dealing with URLs, should better be solved sustainably by not rendering relative links in `lowdown`: kristapsdz/lowdown#105
Minion3665
pushed a commit
to Minion3665/nix
that referenced
this issue
Feb 23, 2023
this simplifies the setup a lot, and avoids weird looking `./file.md` links showing up. it also does not show regular URLs any more. currently the command reference only has few of them, and not showing them in the offline documentation is hopefully not a big deal. instead of building more special-case solutions, clumsily preprocessing the input, or issuing verbal rules on dealing with URLs, should better be solved sustainably by not rendering relative links in `lowdown`: kristapsdz/lowdown#105
kristapsdz
added a commit
that referenced
this issue
Dec 22, 2024
This makes sense for -tterm because, while it can display actual links, there's no concept of a current location for relative links. References #105
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem description
Relative links are useless for
man
and terminal representations, rendering them is very distracting.But disabling links also disables web links.
Proposal
Add an option to only render web link URLs while keeping relative links highlighted.
Background
The Nix package manager uses
lowdown
to renderman
and--help
pages.The manual also renders as a web page and uses relative links for navigation (example). It also contains web links (example).
Currently there is no straightforward way to render the manual both for web and terminal without losing information or introducing a lot of noise on the terminal: either turn off links, then weblinks are gone, or turn on links, then the useless relative links to markdown files pollute every page.
Broken example when links enabled:
How it should be:
Broken example when links disabled:
How it should be:
More background
It appears @edolstra decided to use
lowdown
because it has no dependencies and does the job. I think it does a great job, as it allows the project to manage documentation in a uniform, easily accessible format and make it available in different contexts. Thank you for this tool, it's really well documented and easy to use.The Nix ecosystem has a reputation of terrible documentation, and I work on improving it. Since all the different representations go through one build process, I got stuck with this problem while trying to clean it up. The goal of my refactoring attempt was easing maintenance of documentation, making it more accessible even to occasional contributors.
I tried working around the issue within the build setup, but it already is a tangled mess. It appears easier and more sustainable to add a feature to
lowdown
than manually fighting such a recurring pattern, which a markdown processor is much more suitable to deal with.The text was updated successfully, but these errors were encountered: