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

Add cross-file tag linking #13

Open
tekknolagi opened this issue Mar 20, 2024 · 3 comments
Open

Add cross-file tag linking #13

tekknolagi opened this issue Mar 20, 2024 · 3 comments

Comments

@tekknolagi
Copy link

Nice tool! I am writing this because it would help me use this in the future but it is not by any means something I absolutely need. Just a nice-to-have/idea.

Say I have two files, a.txt and b.txt:

*a.txt*

							*{myAlink}*
blah blah blah how to use tool A. kind of like tool {myBlink}

 vim:tw=78:ts=8:noet:ft=help:norl:
*b.txt*

							*{myBlink}*
blah blah blah how to use tool B. kind of like tool {myAlink}

 vim:tw=78:ts=8:noet:ft=help:norl:

If I generate HTML from a.txt and b.txt, unfortunately the link to a.txt's {myAlink} from b.txt links to the file it's in (b.txt) and vice-versa.

It would be nice if this tool supported inter-file linking.

@xaizek
Copy link
Owner

xaizek commented Mar 20, 2024

I wanted to add some way to handle unresolved references so plugin's documentation could link to Vim's documentation at https://vimhelp.org/. This seems related to inter-file linking in that the tool needs to know which URL to use for which tag.

If all files are in the same directory, then the tags file generated in the process has some mapping, but input file names might not match output file names and you still need to derive URL somehow. This also forces copying files to one location. So maybe could specify unresolved-tag-regexp -> URL pairs in parameters for maximally flexible configuration.

@tekknolagi
Copy link
Author

I mean if we're going for a.txt to a.txt.html (which seems to be the default), that's not terribly tricky to match input->output. Or am I missing something else?

@xaizek
Copy link
Owner

xaizek commented Mar 20, 2024

That's the default, but you can always rename the file afterward or pass -o,--output option (new, not yet mentioned in the README). And there is no guarantee that's how files are named when accessed on the server. So this needs to be more flexible than just appending .html to be generally useful.

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

No branches or pull requests

2 participants