Skip to content

Social card plugin can't use logo from theme custom_dir #5128

@jonaharagon

Description

@jonaharagon

Context

We share assets between our (multilingual) sites by storing them in our theme override directory, as discussed in #2346.

Bug description

When theme.logo is set to a logo in theme.custom_dir instead of docs_dir, social cards fail to generate with the error:

FileNotFoundError: [Errno 2] No such file or directory: '/[...]/docs/assets/img/logo.svg'

The plugin should ideally be looking in the merged assets directory rather than the directory in docs_dir specifically.

Related links

Reproduction

Archive.zip

Steps to reproduce

  1. Store logo SVG in [custom_dir]/assets instead of docs/assets
  2. Set theme.logo to assets/img/logo.svg
  3. Enable social card plugin

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIssue is a duplicate of another issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions