Guts / mkdocs-rss-plugin

MkDocs plugin to generate a RSS feeds for created and updated pages, using git log and YAML frontmatter (page.meta).
https://guts.github.io/mkdocs-rss-plugin/
MIT License
81 stars 27 forks source link

v1.13.1 breaks mkdocs serve (v1.12.2 works) #299

Closed niccokunzmann closed 2 months ago

niccokunzmann commented 2 months ago

When I run serve the build, I see this error:

mkdocs serve
...
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from front matter: host/self.md
DEBUG   -  Reading: news/2024-04-10-website.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/en/news/2024-04-10-website/index.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/de/news/2024-04-10-website/index.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/es/news/2024-04-10-website/index.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/nb_NO/news/2024-04-10-website/index.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/it/news/2024-04-10-website/index.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/th/news/2024-04-10-website/index.md
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph: news/2024-04-10-website.md
DEBUG   -  [RSS-plugin]: Extracting dates for news/2024-04-10-website.md
DEBUG   -  [RSS-plugin]: Not found: /home/nicco/open-web-calendar/.cache/plugin/social/5cf12f946dfbb3df6df3c1a5d9bfc9d8.png
DEBUG   -  [RSS-plugin]: Not found:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_gjiuwg1m/home/nicco/open-web-calendar/assets/images/social/news/2024-04-10-website.png
DEBUG   -  [RSS-plugin]: Social card still not exists locally. Trying to retrieve length from remote image:
           http://127.0.0.1:8000/assets/images/social/news/2024-04-10-website.png. Note that would work only if the social card image has been
           already published before the build.
ERROR   -  Error reading page 'news/2024-04-10-website.md': HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url:
           /assets/images/social/news/2024-04-10-website.png (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at
           0x7a57c360bed0>: Failed to establish a new connection: [Errno 111] Connection refused'))
DEBUG   -  Running 1 `build_error` events

ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url: /assets/images/social/news/2024-04-10-website.png (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7a57c360bed0>: Failed to establish a new connection: [Errno 111] Connection refused'))
docs: exit 1 (3.74 seconds) /home/nicco/open-web-calendar> mkdocs -v serve pid=1274320
  docs: FAIL code 1 (43.62=setup[39.88]+cmd[3.74] seconds)
  evaluation failed :( (43.69 seconds)

The build with version 1.12.2 works fine.

Repo: https://github.com/niccokunzmann/open-web-calendar/

mkdocs build works.

See also:

Guts commented 2 months ago

Hello @niccokunzmann

Thanks for your interest and taking time to report. Indeed, fetching remote images length was quite "fragile". I've made some improvements:

The 2 latest points are directly related to your issue. I hope it does the job :)!

Everything is released in https://github.com/Guts/mkdocs-rss-plugin/releases/tag/1.14.0. Please try again and give me feedback here.

niccokunzmann commented 2 months ago

Thanks for the fast response! Yes, indeed it works!