Skip to content

Tags: setting tags_extra_files not working as expected #5914

@hellt

Description

@hellt

Context

No response

Bug description

When upgraded to 9.2.5-insiders-4.40.1 I started getting the Plugin 'material/tags' option 'tags_extra_files': Expected type: <class 'str'> but received: <class 'list'> error, where it was working fine for insiders 4.36.0.

Judging by the documentation, the tag_extra_files struct hasn't changed, so I presume there might be an issue.

Here is my tags section:

  - tags:
      tags_file: blog/tags.md
      # media.md is a file that only shows posts with `media` tag
      tags_extra_files:
        blog/media.md:
          - media

Changing the type to string for tag slugs like this:

  - tags:
      tags_file: blog/tags.md
      # media.md is a file that only shows posts with `media` tag
      tags_extra_files:
        blog/media.md: media

Gets me past the type check, but, as expected, fails when the tag mapping function kicks in:

ERROR   -  Page 'blog/media.md' in 'tags_extra_files' must list tag identifiers as a list.

Related links

Reproduction

To be provided if required

Steps to reproduce

  1. have a repo with tags_extra_files

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions