Skip to content

Empty or non-defined extra_css generates warning #1335

@kcgthb

Description

@kcgthb

I have a bit of css files in my project that I don't want to include in extra_css.

With 0.17, even if I define empty lists in mkdocs.yml, I get a warning that makes --strict building fail.

For instance, with this in mkdocs.yml

extra_css:
  - ' '

I get:

$ mkdocs build --strict
WARNING -  Config value: 'extra_css'. Warning: Some files in your 'docs_dir' are not listed in the 'extra_css' config setting and will be ignored by the theme. Add the following files to the 'extra_css' config setting if you want them to have an effect on the theme: ['file.css']

Aborted with 1 Configuration Warning in 'strict' mode!

The exact same thing happens if I remove the extra_css part from mkdocs.yml.

Is there a way to build in strict mode while making sure that extra CSS files are not added to the project?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions