beeminder / blog

3 stars 2 forks source link

Markdown problem with glossary post #457

Open dreeves opened 5 months ago

dreeves commented 5 months ago
### Desiderata
- [ ] Recap previous problems
- [x] Fix anchor links

doc.bmndr.co/jargon blog.beeminder.com/glossary

Cognata

Verbata: anchor links, css definitions for definitions like glossary entries,

narthur commented 2 months ago

@dreeves I think we fixed the issue here (#450 and a missing O heading). Anything else we missed?

bsoule commented 1 month ago

all of the anchor ids for the glossary entries are messed up now, meaning all instances of us linking to glossary entries are broken. Instead of the assigned id, they all have id="#foo .def"

e.g.

https://blog.beeminder.com/glossary/#urg => will just take you to the top of the glossary page, instead of the entry on "urgency load".

If you look at the markup for the definiton: <h4 id="urg .def">Urgency load</h4>

It seems like it could possibly be a bug in the markdown or in the compiling of the markdown? Like probably .def was meant to be a class, not part of the id...

dreeves commented 1 month ago

Maybe never mind, I've just manually removed all the .defs from the markdown source, which either works around the problem or solves it, if we're never going to include css classes along with anchor links anyway. Not sure how fragile it is to leave things this way.

narthur commented 1 month ago

@dreeves Copy that. If I recall correctly this feature isn't a part of the markdown flavor that our parsing library supports, which is why we had to add custom support, and looks like we messed it up at some point. Let us know if and when you want us to try to fix this for you.