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

Fix Lunr Search Resource Paths #1000

Merged
merged 3 commits into from
Oct 28, 2022
Merged

Conversation

girlpunk
Copy link
Contributor

@girlpunk girlpunk commented Oct 6, 2022

At present, setting the SearchScriptPath key does not change the script path as expected, but changes the index path. This patch fixes the SearchScriptPath to work as expected, as well as adding keys to set the path for the index and results file.

Note that as this changes the behaviour of the existing SearchScriptPath key, this should be considered a breaking change. However, dealing with this is simply a matter of changing SearchScriptPath to SearchIndexPath in any configuration.

This also addresses a "feature" in Azure Static Apps, where files ending in .gz are served with compression headers, causing browsers to automatically decompress the file before passing the result to javascript. This causes the search script to fail, as it is expecting compressed data.

@girlpunk
Copy link
Contributor Author

girlpunk commented Oct 6, 2022

(Would it be possible to have the Hacktober tags added to this and my other PR statiqdev/Docable#17? https://hacktoberfest.com/participation/#maintainers Thanks!)

@daveaglick
Copy link
Member

Would it be possible to have the Hacktober tags added to this and my other PR

Yeah - sure thing, and thanks! I've been swamped with personal stuff lately (which seems to be the norm these days), but hopefully I'll be able to circle back here in a day or two. Just wanted to let you know I haven't forgotten or disappeared.

@CLAassistant
Copy link

CLAassistant commented Oct 26, 2022

CLA assistant check
All committers have signed the CLA.

@daveaglick
Copy link
Member

daveaglick commented Oct 26, 2022

I'll be able to circle back here in a day or two

Best laid plans, am I right?

Taking a look at this today though. The repo does have the hacktoberfest topic, so you should be good to go there (assuming you haven't already met the requirements through other PRs).

Great catch on the use of search in Statiq Web too - thanks! I spent a lot of time on the underlying module, but apparently not so much integrating it here 😬.

If you don't mind signing the CLA (there was a bug in the CLA process, which is why it didn't show up right away), I'll get this merged.

@girlpunk
Copy link
Contributor Author

Best laid plans, am I right?

For an open source project, you're doing better than most

assuming you haven't already met the requirements through other PRs

Best laid plans strikes again

If you don't mind signing the CLA

I think that should be done now

@daveaglick daveaglick merged commit 4d4e851 into statiqdev:main Oct 28, 2022
@daveaglick
Copy link
Member

Thanks again!

@girlpunk girlpunk deleted the fix-search-paths branch November 1, 2022 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants