diff --git a/markata/cli/didyoumean.py b/markata/cli/didyoumean.py index 382e7fd7c..25892c748 100644 --- a/markata/cli/didyoumean.py +++ b/markata/cli/didyoumean.py @@ -1,3 +1,3 @@ -''' +""" dummy didyoumean page for testing didyoumean suggestions -''' \ No newline at end of file +""" diff --git a/markata/plugins/copy_assets.py b/markata/plugins/copy_assets.py index 92e015bf5..336a5b7df 100644 --- a/markata/plugins/copy_assets.py +++ b/markata/plugins/copy_assets.py @@ -31,7 +31,7 @@ ```toml [markata] # Directory containing your static assets -assets_dir = "assets" +assets_dir = "assets" # Directory where assets will be copied output_dir = "markout" diff --git a/markata/plugins/flat_slug.py b/markata/plugins/flat_slug.py index 827904ad7..15ebf3ee8 100644 --- a/markata/plugins/flat_slug.py +++ b/markata/plugins/flat_slug.py @@ -5,7 +5,7 @@ # Installation -This plugin is built-in and enabled by default through the 'default' plugin. +This plugin is built-in and enabled by default through the 'default' plugin. If you want to be explicit, you can add it to your list of plugins: ```toml @@ -55,7 +55,7 @@ ## Automatic Slug Based on Filename -By default the flat_slug plugin will use the `stem` of your filename (filename without +By default the flat_slug plugin will use the `stem` of your filename (filename without extension) unless you explicitly set your slug in frontmatter. Examples: diff --git a/markata/plugins/generator.py b/markata/plugins/generator.py index 4afbd9e27..0b1535885 100644 --- a/markata/plugins/generator.py +++ b/markata/plugins/generator.py @@ -59,6 +59,7 @@ def render(markata: Markata) -> None: should_prettify = markata.config.prettify_html for article in markata.iter_articles("add ssg tag"): + def process_html(html_content): soup = BeautifulSoup(html_content, features="lxml") tag = soup.new_tag("meta") @@ -74,6 +75,5 @@ def process_html(html_content): article.html = process_html(article.html) elif isinstance(article.html, dict): article.html = { - slug: process_html(html) - for slug, html in article.html.items() + slug: process_html(html) for slug, html in article.html.items() } diff --git a/markata/plugins/heading_link.py b/markata/plugins/heading_link.py index 98e3f8f49..c48eb9274 100644 --- a/markata/plugins/heading_link.py +++ b/markata/plugins/heading_link.py @@ -108,7 +108,7 @@ def post_render(markata: Markata) -> None: article.html = link_headings(article) elif isinstance(article.html, dict): article.html = { - slug: link_headings(type('Post', (), {'html': html})) + slug: link_headings(type("Post", (), {"html": html})) for slug, html in article.html.items() } diff --git a/markata/plugins/load.py b/markata/plugins/load.py index 3f411f993..d213e9f07 100644 --- a/markata/plugins/load.py +++ b/markata/plugins/load.py @@ -1,11 +1,11 @@ """ The `markata.plugins.load` plugin is responsible for loading and parsing markdown files -with frontmatter into Post objects. It provides parallel loading capabilities and +with frontmatter into Post objects. It provides parallel loading capabilities and handles both modern Pydantic-based and legacy frontmatter validation. # Installation -This plugin is built-in and enabled by default through the 'default' plugin. +This plugin is built-in and enabled by default through the 'default' plugin. If you want to be explicit, you can add it to your list of plugins: ```toml diff --git a/markata/plugins/publish_html.py b/markata/plugins/publish_html.py index 87184c7ac..51461982b 100644 --- a/markata/plugins/publish_html.py +++ b/markata/plugins/publish_html.py @@ -96,7 +96,7 @@ """ from pathlib import Path -from typing import Any, Dict, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union import pydantic from pydantic import ConfigDict, Field, field_validator diff --git a/markata/plugins/rss.py b/markata/plugins/rss.py index 70c67cd10..46942c9bc 100644 --- a/markata/plugins/rss.py +++ b/markata/plugins/rss.py @@ -150,7 +150,7 @@ def render(markata: "MarkataRss") -> None: article_html = article.article_html if isinstance(article_html, dict): # Try to get the 'index' HTML content first - article_html = article_html.get('index') + article_html = article_html.get("index") if article_html is None: # Fall back to the first available HTML content article_html = next(iter(article_html.values()))