Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

match_path issues #264

Closed
carried-away opened this issue Apr 3, 2024 · 3 comments
Closed

match_path issues #264

carried-away opened this issue Apr 3, 2024 · 3 comments
Labels
question Further information is requested

Comments

@carried-away
Copy link

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

@shenweiyan
Copy link

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/.*

@carried-away
Copy link
Author

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.

@Guts
Copy link
Owner

Guts commented Jun 10, 2024

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

@Guts Guts closed this as completed Jun 10, 2024
@Guts Guts added the question Further information is requested label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants