Skip to content

Add social cards and a favicon #135

Open

Description

@chiruu12

Sharing a docs link anywhere (Slack, a tweet, a PR comment) produces a bare URL with no preview. mkdocs-material can generate an Open Graph card per page from the page title and description.

What to do:

  1. Add the social plugin to mkdocs.yml.
  2. Switch docs-requirements.txt to mkdocs-material[imaging].
  3. Install the system dependencies in .github/workflows/docs.yml. This is the part that will bite you: the imaging extra needs cairo and pango, so the workflow needs an apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev step before pip install. Without it the build fails with a cairo import error.
  4. Add a favicon while you are in there.

Acceptance:

  • mkdocs build --strict produces site/assets/images/social/ with one image per page.
  • The docs workflow passes on a PR, which is where the system-dependency step gets proven.
  • Pasting a docs URL into a preview renderer shows a title card.

Comment here to claim it and a maintainer will assign it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions