Skip to content

Commit

Permalink
Merge pull request #7 from mkdocs-material/features
Browse files Browse the repository at this point in the history
added sanity check in case theme.features is not defined
  • Loading branch information
squidfunk authored Oct 11, 2023
2 parents 613e76b + 2b89455 commit 9a08f56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def transform(project: MkDocsConfig, config: MkDocsConfig):
project.copyright = config.copyright

# Inherit settings for theme
project.theme["features"].extend(config.theme["features"])
if "features" in project.theme:
project.theme["features"].extend(config.theme["features"])
else:
project.theme["features"] = config.theme["features"]

if "icon" in project.theme:
merge(project.theme["icon"], config.theme["icon"])
else:
Expand Down

0 comments on commit 9a08f56

Please sign in to comment.