Add option to prefix links with filename before anchor tag#2
Add option to prefix links with filename before anchor tag#2alphapapa merged 1 commit intoalphapapa:masterfrom
Conversation
|
Hi Daniel, Thanks, that is a very simple solution. However, I think it wouldn't take much to add support for ToCs of contents in other files. Would you prefer that? I think I could add it without much trouble. |
|
@alphapapa I even thought (briefly) about adding another But long story short, yes, I would like very much Thanks! |
|
I think you were right in the first place. I started to work on the idea and now I realize that it's not as simple as it seemed. This is mainly because we support multiple ToC's in a single file, so there isn't exactly a "ToC for a file" (although the To fix that we'd have to not only specify a file but a heading from which to act in the file. We could certainly do that, by specifying an Org outline path, but I'm not sure if that complexity is worth it. I saved my WIP in a feature branch, but for now I think I will just merge your PR. |
Closes alphapapa#2. Thanks to Daniel Kraus (@dakra).
fbbac97 to
710dcf9
Compare
|
Thanks. I don't think this is a feature that many people need, |
I use
org-make-tocfor my Emacs config which is pretty bigand having
init.orgalways display everything on the main github page wouldbe too heavy. Therefore I just render a
README.orgwith a table of contents that pointsto the
init.orgfile.This PR adds option to prefix the links with the filename so I can
copy&paste it from my init.org to the readme.
I first thought about making it in a way that doesn't involve me
copy and pasting but then figured I don't update the sections that
often and it's a very simple solution.