dawncomer / open-sdg-site-starter

A starting point for the site repository of an Open SDG platform implementation.
MIT License
3 stars 1 forks source link

Search functionality on site #38

Open dawncomer opened 5 years ago

dawncomer commented 5 years ago

Hi @brockfanning, I did a search on 'economic' and found it odd that none of the SDG 8 targets were search results https://dawncomer.github.io/open-sdg-site-starter/search/?q=economic.

Out of curiosity, I tried the same searches on the US and UK sites, and the results were also limited, however I noted that these pages only search 'indicator' noted on the page. As you recall, one of our updates for the LA site was to list the targets, which are not listed on US or UK. Is it possible that the search function is only looking at the indicators and not including the targets? Can you try on your end and let me know what you think.

Thanks!

brockfanning commented 5 years ago

@dawncomer It's true that the target text is not "consulted" when searching for indicators. That could be done, though, and seems like a nice feature request for Open SDG. If this were done, then searching for "economic" would find all of the indicators in 8.1, 8.2, and 8.4.

Note that you're right that the search results only list indicators, and not targets. At this point, targets in Open SDG don't receive their own pages, whereas indicators do. So it wouldn't make sense yet to show targets in the search results. Creating dedicated pages for targets also seems like a nice feature request for Open SDG.

dawncomer commented 5 years ago

ok, thanks for confirming what's happening @brockfanning Let me know next steps to incorporate this update and if it can be set up for our July 7 launch

Thanks!

brockfanning commented 5 years ago

Hi @dawncomer, the next steps would be to do one or both of these:

  1. Make features requests in the Open SDG issue queue for these one or both of these items
  2. Implement the change directly on your site by overriding files as necessary

The second approach is obviously faster, but also requires technical knowledge of javascript, Jekyll, and the platform in general.

dawncomer commented 5 years ago

thanks @brockfanning! i like how this is working. one question, not sure if this is possible, is there a way to either bold the indicator text, or bold the word 'target' in the search results?

image

dawncomer commented 5 years ago

this count of the search results is really great @brockfanning image

brockfanning commented 5 years ago

@dawncomer Both of these suggestions (bolding the indicator name, and bolding the word "target") seem reasonable to me. I can open an issue about it here, but you are also welcome to if you would like.

dawncomer commented 5 years ago

ok, thanks @brockfanning I will do so.

dawncomer commented 5 years ago

Hi @brockfanning, I just noticed that in the search results, the 'target' content that is displayed is pulling from the original UN SDG language and not our localized language. See this example on 9.c

Screen Shot 2019-09-18 at 10 25 30 PM

The above target language reads "...strive to provide universal and affordable access to the internet in least developed countries by 2020"

If you click on the link to 9.c, you'll actually see our localized language which reads "... strive to provide universal and affordable access to the Internet by 2020"

It seems as if the search function may not be pointing to the file with the localized language? Please advise

@angelamhkim fyi