Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mkdocs_rss_plugin/integrations/theme_material_blog_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ def is_page_a_blog_post(self, mkdocs_page: Post | MkdocsPageSubset) -> bool:
bool: True if the given page is a Material Blog post.
"""
if self.IS_ENABLED and isinstance(mkdocs_page, Post):
logger.info(
logger.debug(
f"page '{mkdocs_page.file.src_uri}' identified as Material Blog post."
)
return True
elif isinstance(mkdocs_page, MkdocsPageSubset) and Path(
mkdocs_page.src_uri
).is_relative_to(self.blog_plugin_cfg.config.blog_dir):
logger.info(
logger.debug(
f"page '{mkdocs_page.src_uri}' identified as Material Blog post "
f"by src_uri matching."
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,16 @@ def get_social_card_cache_path_for_page(
self.integration_material_blog.IS_BLOG_PLUGIN_ENABLED
and self.integration_material_blog.is_page_a_blog_post(mkdocs_page)
):
logger.debug(
f"Looking for social card in cache for blog post: {mkdocs_page.src_uri}"
)
expected_cached_card_path = self.social_cards_cache_dir.joinpath(
f"assets/images/social/{Path(mkdocs_page.dest_uri).parent}.png"
)
else:
logger.debug(
f"Looking for social card in cache for page: {mkdocs_page.src_uri}"
)
expected_cached_card_path = self.social_cards_cache_dir.joinpath(
f"assets/images/social/{Path(mkdocs_page.src_uri).with_suffix('.png')}"
)
Expand Down
4 changes: 3 additions & 1 deletion mkdocs_rss_plugin/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,9 @@ def load_images_for_pages(
page_info._mkdocs_page_ref
and id(page_info._mkdocs_page_ref) not in processed_refs
):
logger.debug(f"Get image for '{page_info.title}'")
logger.debug(
f"Get image for '{page_info.title}' ({page_info.abs_path})"
)
page_info.image = self.get_image(
in_page=page_info._mkdocs_page_ref, base_url=base_url
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ site_url: https://guts.github.io/mkdocs-rss-plugin
use_directory_urls: false

plugins:
- blog:
blog_dir: blog
authors_profiles: true
- rss:
match_path: blog/posts/.*
- social:
enabled: true
cards: true
- blog:
blog_dir: blog
authors_profiles: true
- rss:
match_path: blog/posts/.*
pretty_print: true
- social:
enabled: true
cards: true

theme:
name: material
name: material