-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Missing index.st (search plugin breaks parsing titles with "
or \
)
#20
Comments
After reading #12 I added
now Pelican exits immediately with the error:
The only toml file in the file system for my site is
I could see Lines 285 to 293 are:
|
Ahhh, I realised the Below is the source markdown that's tripping it up. If I remove this post then pelican-search works, generating the
These source lines crash pelican-search:
These source lines are okay:
|
and
\`)
and
\`)"
and \
)
"
and \
)"
or \
)
I’m away from my desk at the moment, but I suspect that error is being returned by Stork itself and not the plugin.
|
Yes it does seem to be stork itself:
|
Refering to search/pelican/plugins/search/search.py Line 76 in 8e0d75d
It seems to work in this standalone snippet anyway:
I got that json idea from https://stackoverflow.com/questions/17941109/escaping-quotes-in-jinja2 which was then then reinforced by chatgpt. |
Can you try your change locally and see whether your fix works? That would entail temporarily uninstalling the current release package, cloning the repo, making your changes to it, and using Pip's "editable install" function to install the plugin: python -m pip uninstall pelican-search
git clone https://github.com/pelican-plugins/search.git ~/pelican-plugins/search
# [Make the code changes]
python -m pip install -e ~/pelican-plugins/search/ |
Fixes pelican-plugins#20, according to local testing.
Yes this does fix the problem on my machine! PR coming |
Issue
When and how does the index get built? On two systems, Windows and Ubuntu, I've followed the instructions and verfied that stork is installed and in PATH.
...then launched pelican with
pelican --autoreload --listen
, and in the resultant preview browser window typed text in the search box.The web page says "Error! Check the browser console.".
Browser console says "Uncaught (in promise) undefined ".
Shell console says:
I've searched the file system for those files and they don't exist, so it looks like the index is not being built. How do I test and/or ensure the index is being built?
The text was updated successfully, but these errors were encountered: