Skip to content
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

Disabling card generation in social plugin does not work #7774

Closed
4 tasks done
boamaod opened this issue Dec 6, 2024 · 6 comments
Closed
4 tasks done

Disabling card generation in social plugin does not work #7774

boamaod opened this issue Dec 6, 2024 · 6 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@boamaod
Copy link

boamaod commented Dec 6, 2024

Context

As described in documentation specifying cards: false in mkdocs.yml should "enable or disable social card generation".

Bug description

Specifying cards: false in mkdocs.yml the cards are still generated. Specifying enabled: false disables the whole social plugin, but this is a different option and doesn't satisfy the same needs as only disabling card generation.

Related links

Reproduction

9.5.47-disabling-card-generation-in-social-plugin-does-not-work.zip

Steps to reproduce

  1. Run mkdocs serve
  2. Install required dependencies with pip install "mkdocs-material[imaging] as instructed in terminal
  3. Run mkdocs serve again
  4. See actual card generated at http://127.0.0.1:8000/assets/images/social/index.png
  5. Also see the PNG file in .cache/plugin/social

Browser

No response

Before submitting

@squidfunk
Copy link
Owner

Thanks for reporting! Fixed in a7dc57c.

@squidfunk squidfunk added bug Issue reports a bug resolved Issue is resolved, yet unreleased if open labels Dec 6, 2024
@kamilkrzyskow
Copy link
Collaborator

Does the Social plugin do anything else apart of creating the cards? I think this option is also not used in the Insiders version at all.
Perhaps it should be soft-deprecated? 🤔

@squidfunk
Copy link
Owner

Not yet, but there are some things that might matter, e.g., allowing to set a custom image for all pages or specific pages only, not creating cards at all, but still adding the respective meta tags, etc. Currently both settings have the same functionality, but keeping a dedicated setting keeps it future-proof.

@squidfunk
Copy link
Owner

Released as part of 9.5.48.

@boamaod
Copy link
Author

boamaod commented Dec 8, 2024

Thank you for the quick release, @squidfunk!

However, I'm not sure I understand this option, because I indeed expected it to be something like "not creating cards at all, but still adding the respective meta tags", but it appears that specifying cards: false by default also disables the meta tag generation for title, description etc. I expected "card generation" which you can disable/enable just to mean generating the images at cards_dir, but it seems I was mistaken.

@squidfunk
Copy link
Owner

Yes, that's correct. As said, currently, the social plugin only focuses on generating cards, so if no cards are generated, there are no meta tags to add. We might add an option in the future to add custom images, but that's currently not a priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

3 participants