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

Changes to my content files do not reflect on the rendered website #244

Closed
jegrami opened this issue May 8, 2024 · 3 comments
Closed

Changes to my content files do not reflect on the rendered website #244

jegrami opened this issue May 8, 2024 · 3 comments
Labels
no action needed No project changes were needed to resolve this.

Comments

@jegrami
Copy link

jegrami commented May 8, 2024

I'm experiencing two issues I suspect are related to the m.css plugins. This is similar to the closed issue #181

  1. When I make changes to the content of my articles, they don't reflect on the served website.
  2. When I use the special directives provided by the m.css reST plugins (note-dim::, note-info::, note-primary::, gh, etc) in my articles, they also don't reflect on the website.

In my settings file, CACHE_CONTENT and LOAD_CONTENT_CACHE are both set to False. And the m.css plugins folder is correctly referenced there too:

PLUGIN_PATHS = ['m.css/plugins']

PLUGINS = ['m.abbr',
           'm.alias',
           'm.code',
           'm.components',
           'm.dox',
           'm.dot',
           'm.filesize',
           'm.gl',
           'm.gh',
           'm.htmlsanity',
           'm.images',
           'm.link',
           'm.math',
           'm.metadata',
           'm.plots',
           'm.sphinx',
           'm.qr',
           'm.vk']

The following is the Terminal output when I run pelican -Dlr:

[13:21:53] DEBUG    Pelican version: 4.9.1                                                              __init__.py:627
           DEBUG    Python version: 3.12.1                                                              __init__.py:628
           DEBUG    Adding current directory to system path                                              __init__.py:71
           DEBUG    Finding namespace plugins                                                              _utils.py:97
           DEBUG    Loading plugin `m.abbr`                                                               _utils.py:105
           DEBUG    Loading plugin `m.alias`                                                              _utils.py:105
           DEBUG    Loading plugin `m.code`                                                               _utils.py:105
           DEBUG    Loading plugin `m.components`                                                         _utils.py:105
           DEBUG    Loading plugin `m.dox`                                                                _utils.py:105
           DEBUG    Loading plugin `m.dot`                                                                _utils.py:105
           DEBUG    Loading plugin `m.filesize`                                                           _utils.py:105
           DEBUG    Loading plugin `m.gl`                                                                 _utils.py:105
           DEBUG    Loading plugin `m.gh`                                                                 _utils.py:105
           DEBUG    Loading plugin `m.htmlsanity`                                                         _utils.py:105
           DEBUG    Loading plugin `m.images`                                                             _utils.py:105
           DEBUG    Loading plugin `m.link`                                                               _utils.py:105
           DEBUG    Loading plugin `m.math`                                                               _utils.py:105
Warning: libgs not found
           DEBUG    Loading plugin `m.metadata`                                                           _utils.py:105
           DEBUG    Loading plugin `m.plots`                                                              _utils.py:105
           ERROR    Cannot load plugin `m.plots`                                                              log.py:94
                    No module named 'matplotlib'
           DEBUG    Loading plugin `m.sphinx`                                                             _utils.py:105
           DEBUG    Loading plugin `m.qr`                                                                 _utils.py:105
           ERROR    Cannot load plugin `m.qr`                                                                 log.py:94
                    No module named 'qrcode'
           DEBUG    Loading plugin `m.vk`                                                                 _utils.py:105
           DEBUG    Registering plugin `m.abbr`                                                          __init__.py:78
           DEBUG    Registering plugin `m.alias`                                                         __init__.py:78
           DEBUG    Registering plugin `m.code`                                                          __init__.py:78
           DEBUG    Registering plugin `m.components`                                                    __init__.py:78
           DEBUG    Registering plugin `m.dox`                                                           __init__.py:78
           DEBUG    Registering plugin `m.dot`                                                           __init__.py:78
           DEBUG    Registering plugin `m.filesize`                                                      __init__.py:78
           DEBUG    Registering plugin `m.gl`                                                            __init__.py:78
           DEBUG    Registering plugin `m.gh`                                                            __init__.py:78
           DEBUG    Registering plugin `m.htmlsanity`                                                    __init__.py:78
           DEBUG    Registering plugin `m.images`                                                        __init__.py:78
           DEBUG    Registering plugin `m.link`                                                          __init__.py:78
           DEBUG    Registering plugin `m.math`                                                          __init__.py:78
           DEBUG    Registering plugin `m.metadata`                                                      __init__.py:78
           DEBUG    Registering plugin `m.sphinx`                                                        __init__.py:78
           DEBUG    Registering plugin `m.vk`                                                            __init__.py:78
  --- AutoReload Mode: Monitoring `content`, `theme` and `settings` for changes. ---
Serving site at: http://127.0.0.1:8000 - Tap CTRL-C to stop
Warning: libgs not found
Cannot load plugin `m.plots`
No module named 'matplotlib'
Cannot load plugin `m.qr`
No module named 'qrcode'
Unable to find '/posts/why-study-dsa.rst', skipping url replacement.

Notice the line last line there that says 'Unable to find /posts/why-study-dsa.rst, skipping url replacement.' Pelican is referencing an old folder name posts/, which I changed to articles/ like four days ago. I've made several significant changes to the content of the articles, but it doesn't reflect on the website.
I believe all these issues are related.

Deleting the output folder and regenerating the content doesn't fix it. The fix suggested by @lpirl on issue #181 also didn't work for me. Please help!

@jegrami jegrami changed the title Changes to my content files do not reflect on the rendered web pages Changes to my content files do not reflect on the rendered website May 8, 2024
@mosra
Copy link
Owner

mosra commented May 17, 2024

You're using the m.plots and m.qr plugins which depend on the matplotlib and qrcode Python packages. Assuming you don't use those plugins, remove them from the list (you really only need to list ones that you actually use, not everything from m.css). If you do use them, install the packages via pip or any other means that's best suited for your dev environment.

Judging from the output however, it seems that it just skips those plugins if they fail to load, so it should still generate something from the input .rst files. Is it not shown at http://127.0.0.1:8000? Are you sure it actually takes the .rst files you're editing and not some other stale copy?

Generally, there's no hidden magic done by m.css anywhere, it's all just plain Pelican with some theming on top. So if there's something strange going on, it's likely Pelican being misconfigured.

@jegrami
Copy link
Author

jegrami commented May 17, 2024

It's working fine now. Thanks, @mosra!

I think it was wrong indentation in some of the reST files that was causing the problem (beginner's error. lol). Because of those errors, Pelican wasn't parsing the files, so the changes I was making wasn't being updated. I added a new article file with fresh content, formatted with some m.css special directives. It rendered fine. So I deleted the content of the old articles and carefully added them back. They rendered perfectly, too. Everything is fine now. Thank you so much.

@jegrami jegrami closed this as completed May 17, 2024
@mosra
Copy link
Owner

mosra commented May 19, 2024

Ah, yes, the error handling / reporting is a bit strange in Pelican, a single error causing everything to stop. Gotta get used to it, I guess :)

@mosra mosra added the no action needed No project changes were needed to resolve this. label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no action needed No project changes were needed to resolve this.
Projects
None yet
Development

No branches or pull requests

2 participants