mkdocs-rss-plugin icon indicating copy to clipboard operation
mkdocs-rss-plugin copied to clipboard

match_path issues

Open carried-away opened this issue 1 year ago • 2 comments

Hello,

My blog doesn't use the default 'blog' value. I have the folder named 'my-news'

docs/
   my-news/
      posts/

in my mkdocs.yml

 - blog:
      blog_dir: my-news
  - rss:
      abstract_chars_count: 150
      match_path: my-news/posts/.*
      date_from_meta:
        as_creation: date
      categories:
        - categories
        - tags

I only get matches if i do match_path: my-news

But that matches the Archive and Category folders and I get double posts.

I'm not exactly sure where I'm going wrong here

carried-away avatar Apr 03 '24 20:04 carried-away

Do we need to add a post_dir setting in the blog configuration, like the example below?

- blog:
    blog_dir: my-news
    post_dir: "{blog}/posts"
- rss:
    abstract_chars_count: 150
    match_path: my-news/posts/.*

shenweiyan avatar Apr 11 '24 02:04 shenweiyan

So I figured out the issue, kind of. At first, I was manually running mkdocs build in my normal windows environment, the match_path: my-news/posts/.* did not match anything. However, running the mkdocs-material docker image, the paths aligned and I was able to generate a RSS feed. Not sure if a bug. But I got it working.

carried-away avatar May 09 '24 16:05 carried-away

Great if it works now! I close here. Don't hesitate to reopen if you face something similar with a full reproducible example.

Guts avatar Jun 10 '24 17:06 Guts