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
Footnote support? #70
Comments
Hey @matildepark, check out this thread on why we aren't support footnotes, for now: #40 |
While I see the desire to avoid additional dependencies, the |
Aside: I don't think this should be marked as |
Just going to add that I am mostly interested in MarkDoc as a way to write books. Footnotes are essential for that some way or another. |
I think footnotes is a pretty regular thing for writers, specially those writing books. I can see most of us (i already have it in a todo list) implementing our own version of this. It's true that it can also be implemented with a regular link, but I believe the regular [^1] usage is widely spread |
So with my
@mfix-stripe @rpaul-stripe So I could create another tag that would enforce styling consistency across the footnote but I wonder, is there any better/more framework-native approach on how I could create footnotes? The trouble I am facing with this solution is that I manually need to count up the references in the text. For the actual footnotes I could create a special tag that selects the references by a specific ID and then display those references. But all that does not feel very elegant. I'd be happy if you can point me in a better direction here. @matildepark Here's your workaround :) |
Yes youre absolutely right. For me this is just a simple workaround to get it done. Thanks for the link to the urbit repo, I see there's a custom fork of markdoc. I'll have a look into that, thank you! I am using markdoc with nextjs integration so I am not quite sure if there's a way to hook into the AST parsing for customizing. |
All that's in the fork is merging the |
IMO, this is something best left to users to customize. There are lots of different ways a note can be displayed (section footnote, endnote, asides, etc.) so I think it'd be challenging to provide a one-size-fits-all solution. I've solved this problem using a pretty simple implementation of a
Personally, I think this is easier to understand than a custom syntax, and much more versatile! If you're interested, you can see the implementation here:
Another approach would be to write the |
For the time being, we are encouraging folks to follow the pattern @nkohari-stripe described above (#70 (comment)), so I am going to close this issue. We can revisit this further down the road if we see other needs. |
Do you have any idea where I would drop those files in an Astro project to get them to be picked up? |
@nkohari-stripe - Thanks for the example! How are you getting the tag to recognize Also curious why did you put this block in here? If the footnote was a link, it would just render as plain text. https://github.com/nkohari/nate.io/blob/6b0044f08237449c302bfbc2d7036c67ffa81aac/src/tags/note.ts#L14-L16 edit: Is it to prevent rendering a |
Currently there's no way to inject
markdown-it
plugins down to the tokenizer, so we can't just passmarkdown-it-footnotes
here, but I can't see any facility for supporting Footnote syntax (which are common in GFM). Any current workarounds?The text was updated successfully, but these errors were encountered: