reference links, the alternate link format
Apparently you can create a link using a footnote-like format. I found this out while reading the documentation for 7off. Well, there are sort of two link formats like this.
The first looks like this:
T282828
Te6edf3Lorem Tff7b72[Te6edf3ipsumTff7b72] Te6edf3dolor Tff7b72setTb4b4b4.
Tff7b72[Te6edf3ipsumTff7b72]: Te6edf3url Ta5d6ff"Title string"
Which can be represented in a more familiar (to me) Markdown format:
T282828
Te6edf3Lorem Tff7b72[Te6edf3ipsumTff7b72]Tb4b4b4(Te6edf3url Ta5d6ff"Title string"Tb4b4b4) Te6edf3dolor Tff7b72setTb4b4b4.
These are called reference links.
You can control where they land in a document with the T383838--referece-location option to T383838pandoc. Valid values are T383838block|section|document.
To use them, pass the T383838--reference-links option to T383838pandoc.
I think I can use this to convert my notes en masses to reference links so they're more easily converted to Gemini's format.
This doesn't work very well for my index page, as those should not be reference links, rather inline. And there will likely be other cases where I want to control the format, so I will only do a one-shot conversion on notes as I encounter them and need to convert them. I'm not sure how to preserve the YAML headers when I do this. Maybe I should use a tag in the header to indicate when links should be preserved or converted to reference links.
I've started to use this one at a time on notes as I encounter them when it looks like they need fixing. Inside Vim I shift+v, highlight the article text (skipping over the YAML header) and then invoke T383838pandoc -i markdown -t markdown --reference-links --reference-location=section and it does a nice and typo-free conversion for me.
Tags: pandoc
Tags
Navigation