Closed brianking closed 6 years ago
Yep, I can put a search box in the header and create the /search page to render the results.
I tried this on localhost, and so far so good. Some observations:
@jailandrade What's the status here? Do we need to abandon current solution for new one?
yep, we could go without results pages and go immediately to the result
@jailandrade Can you post a status here please.
I just deployed to both live sites, and notice it is not working on either. It works on localhost.
Also, I ran 'node site.js' but it does not seem to have picked up changed I made (new partials + strings in content/_index.md).
I made a hack for this, you need to replace the content of static-src/node_modules/lunr-hugo/lib/index.js
with the content of static-src/index.js
and run again node site.js
Who needs to do that? Is it a once-off change, or continuous? If the latter, can it be automated?
It can be automated with each deployment, but now I see the last error you report it.
I think this commit can solve it https://github.com/OSLC/oslc-site-hugo/commit/3498a5778d5bb3ae24ddef80b4f7e213f9ec9542
The search is working now, the step when we replace content of static-src/node_modules/lunr-hugo/lib/index.js
with the content of static-src/index.js
only need to be done once after a clear installation. The run node site.js
step is mean to be done with each change to the content
@jailandrade can you please add that information to the setup and deployment doc:
https://github.com/OSLC/oslc-site-hugo/wiki/Contributing-Setup
Then this can be closed after.
Great work!
@hectorsanchezmx can you add the steps to the deployment script?
I already added the steps in the documentation
Implement site wide search.
I'm open to where the search box should be, but the header seems the most logical place.