Custom permalinks (anchors) appear on social cards #8465
-
We use custom permalinks to ensure anchors are the same for translations of the same page for all languages:
We just noticed that page previews generated using social cards plugin now display these permalinks: ![]() It seems that this should be handled by plugin automatically. Or, is there an option to configure this? Thanks you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment · 1 reply
-
Thanks for asking! SituationThe main problem this stems from is MkDocs' (our upstream dependency) title handling, which has been broken for a long time. The titles that MkDocs exposes to plugins aren't even consistent across events that are invoked, since it changes after the Markdown has been rendered. A lot of discussion has happened in the upstream repository in the past, but the issues are still unsolved:
As we recently wrote in our update on our foundational work, and with close to 100 open issues, MkDocs is effectively unmaintained. However, with our foundational work circling in on an initial release, we're close to creating a new foundation to finally address the issues that have not been addressed in MkDocs. WorkaroundIn the meantime, as FastAPI is on Insiders, you can work around the issue by setting the cards title explicitly. Just add the following to the metadata of a page (documentation is here): ---
social:
cards_layout_options:
title: First steps
---
# First steps { #first-steps } I understand that this is not ideal, but as said, it will be resolved soon after our foundational work is out the door. |
Beta Was this translation helpful? Give feedback.
Thanks for asking!
Situation
The main problem this stems from is MkDocs' (our upstream dependency) title handling, which has been broken for a long time. The titles that MkDocs exposes to plugins aren't even consistent across events that are invoked, since it changes after the Markdown has been rendered. A lot of discussion has happened in the upstream repository in the past, but the issues are still unsolved:
As we recently wrote in our update on our foundational work, and with close to 100 open issues, MkDocs is effectively unmaintained. However, with our foundational work circling in on an initial release, we're close to …