oslc-op / website

Hugo sources for the OSLC website
https://open-services.net
6 stars 9 forks source link

Site Search #133

Closed brianking closed 6 years ago

brianking commented 7 years ago

Implement site wide search.

I'm open to where the search box should be, but the header seems the most logical place.

jailandrade commented 7 years ago

Yep, I can put a search box in the header and create the /search page to render the results.

brianking commented 7 years ago

I tried this on localhost, and so far so good. Some observations:

brianking commented 7 years ago

@jailandrade What's the status here? Do we need to abandon current solution for new one?

jailandrade commented 7 years ago

yep, we could go without results pages and go immediately to the result

brianking commented 7 years ago

@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).

jailandrade commented 6 years ago

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

brianking commented 6 years ago

Who needs to do that? Is it a once-off change, or continuous? If the latter, can it be automated?

jailandrade commented 6 years ago

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

jailandrade commented 6 years ago

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

brianking commented 6 years ago

@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!

jailandrade commented 6 years ago

@hectorsanchezmx can you add the steps to the deployment script?

jailandrade commented 6 years ago

I already added the steps in the documentation