-
Notifications
You must be signed in to change notification settings - Fork 4.1k
social cards plugin crashes when logo defined in theme config #4812
Copy link
Copy link
Closed
Labels
needs reproductionIssue lacks a minimal reproduction .zip fileIssue lacks a minimal reproduction .zip file
Description
Context
No response
Bug description
when a logo is defined in the theme config:
theme:
logo: assets/images/logo.svgand the social plugin is enabled, the logo can not be loaded and the system crashes (locally)
FileNotFoundError: [Errno 2] No such file or directory: '/docs/docs/assets/images/logo.svg'if I change the path of the logo to:
theme:
logo: ../overrides/assets/images/logo.svgthe system runs, the social cards are generated...
BUT the logo is not available on the rendered site
Also note that if custom fonts (non Google) are defined and are located in the overrides directory, one has to define a Google font for the social card plugin to work
Related links
- https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/#image
- https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/
Reproduction
simply define a logo, that is located in the overrides directory, in the theme section of mkdocs.yml
and enable the social plugin
#...
theme:
custom_dir: overrides
logo: assets/images/logo.svg
#...
plugins:
#...
- social:
cards: true
cards_font: Roboto
#...Steps to reproduce
- configure as indicated above
- make sure the dependencies are installed
- start local environment
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues or discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a minimal reproduction.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs reproductionIssue lacks a minimal reproduction .zip fileIssue lacks a minimal reproduction .zip file