File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
88 < meta name ="description " content ="{% if page.summary %}{{ page.summary | strip_html | strip_newlines | truncate: 160 }}{% endif %} ">
99 < meta name ="keywords " content ="{{page.tags}}{% if page.tags %}, {% endif %} {{page.keywords}} ">
10+ {% if page.url contains '/lb4/' %}
11+ < meta name ="docsearch:version " content ="lb4 " />
12+ {% elsif page.url contains '/lb3/' %}
13+ < meta name ="docsearch:version " content ="lb3 " />
14+ {% elsif page.url contains '/lb2/' %}
15+ < meta name ="docsearch:version " content ="lb2 " />
16+ {% endif %}
1017 < title > {{ page.title }} | {{ site.site_title }}</ title >
1118 < link rel ="stylesheet " href ="{{base}}/css/syntax.css ">
1219
Original file line number Diff line number Diff line change 2121 } ) ;
2222 </ script >
2323 {% endif %}
24- < link rel ="stylesheet " href ="https://cdn.jsdelivr.net/npm/@docsearch/css@3 "/>
24+ < link rel ="preconnect " href ="https://JHHAZ68MS2.algolia.net " crossorigin />
25+ < link rel ="stylesheet " href ="https://cdn.jsdelivr.net/npm/@docsearch/css@4 "/>
2526
2627
27- < script src ="https://cdn.jsdelivr.net/npm/@docsearch/js@3 "> </ script >
28+ < script src ="https://cdn.jsdelivr.net/npm/@docsearch/js@4 "> </ script >
2829</ head >
2930< body >
3031{% include topnav.html %}
4546<!-- /.container -->
4647 </ div >
4748 < script type ="text/javascript ">
49+ const path = window . location . pathname ;
50+ let currentVersion = 'lb4' ;
51+
52+ if ( path . includes ( '/lb3/' ) ) {
53+ currentVersion = 'lb3' ;
54+ } else if ( path . includes ( '/lb2/' ) ) {
55+ currentVersion = 'lb2' ;
56+ }
4857 docsearch ( {
4958 appId : 'JHHAZ68MS2' ,
5059 apiKey : 'd5ea594dd98a77b9e4b27fb69776fa9f' ,
5160 indexName : 'loopback' ,
5261 container : '#algolia-docsearch' ,
5362 searchParameters : {
54- facetFilters : [ 'lang:en' ]
63+ facetFilters : [ 'language:en' ] ,
64+ optionalFilters : [ `version:${ currentVersion } ` ]
5565 }
5666 } ) ;
5767
You can’t perform that action at this time.
0 commit comments