FHIR Chat · Adding Search to IGs · IG creation

Stream: IG creation

Topic: Adding Search to IGs


view this post on Zulip Grahame Grieve (Aug 31 2020 at 19:33):

@Lloyd McKenzie please add this to the navbar in some appropriate place for HL7 IGs:

<a id="project-logo" href="searchform.html"><img src="./assets/images/search.png" alt="Search this IG"></a>

view this post on Zulip Lloyd McKenzie (Aug 31 2020 at 20:05):

This is for HL7 IGs only, not for the generic base template, correct? @Grahame Grieve
@Jose Costa Teixeira

view this post on Zulip Jose Costa Teixeira (Aug 31 2020 at 20:09):

I was experimenting with search. What is this searchform.html?

view this post on Zulip Grahame Grieve (Aug 31 2020 at 20:10):

new file that's automatically going to appear everywhere

view this post on Zulip Grahame Grieve (Aug 31 2020 at 20:11):

at least on the HL7 website. Other websites can decide whether they want it or not

view this post on Zulip Jose Costa Teixeira (Aug 31 2020 at 20:23):

can other templates override the searchform.html (if they want to use another search engine)?

view this post on Zulip Jose Costa Teixeira (Aug 31 2020 at 20:24):

If so, we can add this in the base template - everyone gets a search form. If they want to override, they can.

view this post on Zulip Jose Costa Teixeira (Aug 31 2020 at 20:24):

So I think this could go into the base template

view this post on Zulip Grahame Grieve (Aug 31 2020 at 20:26):

I'm not sure. The website specifies the search infrastructure, and I generate searchform.html in the web site maintenance process. So I don't want to dictate that all guides have this.

view this post on Zulip Jose Costa Teixeira (Aug 31 2020 at 20:44):

So, HL7 guides have search built in, others have to add this?

view this post on Zulip Grahame Grieve (Aug 31 2020 at 20:57):

yes. I've made it as easy as I can. You put a searchform.template in the root directory, and refer to it in your publish.ini. If you do this, it will automatically be populated into all IGs that are published on the website, but I have no way to automatically inject references to the searchform in already published content - the website has to do that manually

view this post on Zulip Grahame Grieve (Sep 01 2020 at 04:19):

ok, I've added search to all the IGs on the web site. The UV ones are still uploading, but the US ones are all up. Every version of every IG has a search now. the search works using DuckDuckGo - google both is really manual to set up and also insists on advertising (in theory we can ask them not to but in practice it's not reliable that they'll agree. But DuckDuckGo is just simple and direct. (And it works in all countries)

The challenge for that for me is that I wanted to retrospectively add a search link to every page in the IGs. That's ~150k html files, so it clearly wasn't something I'd do be hand. But all the guides have slightly different HTML structures... so it wasn't a case of simple search and replace. I did what I could and checked quite a lot of pages, and it all looks good to me.

What I'm asking for is for you to check your IGs, particularly the milestone publications, that there is a search link on the page, either top (using the search icon) or bottom (just the word 'search'). Let me know if you find pages with no search link.

Thanks

view this post on Zulip Keith Boone (Sep 29 2020 at 23:25):

I'm getting like 3000 each of these:
The link 'searchform.html' for "null" cannot be resolved
The link 'searchform.html' for "Search | null | Propose a change anchors.options.visible = 'hover' anchors.add()" cannot be resolved

Clearly this is a template problem. I'm not sure how to fix it. I downloaded latest publisher. That didn't resolve it. I looked for searchform.html in all templates, it's simply not there.

view this post on Zulip Grahame Grieve (Sep 29 2020 at 23:26):

fixed next release. it's a special case

view this post on Zulip Keith Boone (Sep 30 2020 at 14:08):

My issues seems to have been resolved with latest checkin to https://github.com/HL7/ig-template-base/tree/master
But now I see:

 Internal error in location for message: 'Error in ?? at 1, 1: Premature ExpressionNode termination at unexpected token ":"', loc = 'C:\Users\kboone\git\fhir-saner\output\searchform.html', err = 'The html source does not contain the publish box <!--ReleaseHeader--><p id="publish-box">Publish Box'

view this post on Zulip Grahame Grieve (Sep 30 2020 at 19:58):

yes this will be fixed next release


Last updated: Apr 12 2022 at 19:14 UTC