Fix crash in social plugin and add support for logo in custom_dir #5447
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi 👋,
I've been working on adding social cards to our documentation, and I've encountered a few minor bugs, while doing so.
The crash was related to a valid, but partially incomplete
mkdocs.yml
configuration:I've fixed it in a way to handle both
font: false
andfont: {...}
inputs, and it allows for the thetext
key to be missing.Fixes #4920
Fixes #5128
I've read both of those issues and I kind of disagree that the issue is unfixable with the current architecture or that fixing it would require adding flags, which could lead to code debt in the future. IMHO the behaviour of override asset paths taking priority over docs assets is expected and fully correct, therefore it's natural for the user to use this directory to store "shared" / "static" assets. This approach is frequently used with multilingual documentations, even the currently most popular guide uses this approach. Therefore I ask you to reconsider 🙏
I've added a custom_dir path lookup. If a given path exists in the overrides directory, then it's used to generate the logo.