You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/02/26 18:35:22 UTC

[GitHub] [camel-website] Nayananga opened a new pull request #163: Pr/algolia search

Nayananga opened a new pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163
 
 
   I think we haven't fully indexed the website so antora search indexes are missing from the search results
   this work is related to #81

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] zregvart commented on issue #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
zregvart commented on issue #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#issuecomment-592104628
 
 
   > I’m just learning about search in Antora…. is the camel site too big for lunr search?
   
   @djencks we render to 4075 HTML documents. I saw a comment on Antora issue tracker that lunr is not a good choice for larger sites, not sure if 4075 is too large or not but Algolia seems to be used widely.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] djencks commented on issue #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
djencks commented on issue #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#issuecomment-591666740
 
 
   I’m just learning about search in Antora…. is the camel site too big for lunr search?
   
   thanks
   David Jencks
   
   > On Feb 26, 2020, at 1:39 PM, Zoran Regvart <no...@github.com> wrote:
   > 
   > Preview is here <https://builds.apache.org/job/Camel.website/job/PR-163/Preview/>. I think we could do with a bit of styling on the search results, currently it looks like this:
   > 
   >  <https://user-images.githubusercontent.com/1306050/75389975-c68c6200-58e7-11ea-85f3-4820c948e76e.png>
   > There's also an error that gets logged in the browser console:
   > 
   > TypeError: n._snippetResult is undefined
   > It's good to see that the V4 of the Algolia search JavaScript is only 4.8KB (previous was 100+KB). I don't think it would load on the website due to content security policy:
   > 
   > https://github.com/apache/camel-website/blob/d35d9e3be385a7a4bdf958a7b28d8a2bfaa15999/static/.htaccess#L1326 <https://github.com/apache/camel-website/blob/d35d9e3be385a7a4bdf958a7b28d8a2bfaa15999/static/.htaccess#L1326>
   > We need to serve the resources from the same server, that would mean that we need to build/bundle with the theme (IIRC).
   > 
   > I wonder why we don't get the component reference indexed, I think in the end the best outcome for us would be to generate the index ourselves, but this is a good start.
   > 
   > —
   > You are receiving this because you are subscribed to this thread.
   > Reply to this email directly, view it on GitHub <https://github.com/apache/camel-website/pull/163?email_source=notifications&email_token=AAELDXSTGVOKO7AXWRESSSDRE3ORTA5CNFSM4K4LPXCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENB7XIA#issuecomment-591657888>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAELDXWEGORDSPLDSJU5DHTRE3ORTANCNFSM4K4LPXCA>.
   > 
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] djencks commented on a change in pull request #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
djencks commented on a change in pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#discussion_r387152601
 
 

 ##########
 File path: antora-ui-camel/src/partials/footer-scripts.hbs
 ##########
 @@ -1,5 +1,6 @@
 <script src="{{uiRootPath}}{{asset 'js/site.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/highlight.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/svg4everybody.js'}}"></script>
+<script async src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
 
 Review comment:
   It's much simpler to use the ui builder to pull in and browserify the sources. You do this with code like Nayananga suggested:
   ```
   ;(function () {
   var algoliasearch = require('algoliasearch')
   return algoliasearch()
   })()
   ````
   listing the `algoliasearch` in your package.json for the ui project, but naming the file `algoliasearch.bundle.js`.  The 'bundle' in the filename tells the builder to convert the require into a sort of 'include'.  

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] Nayananga commented on a change in pull request #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
Nayananga commented on a change in pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#discussion_r386769281
 
 

 ##########
 File path: antora-ui-camel/src/partials/footer-scripts.hbs
 ##########
 @@ -1,5 +1,6 @@
 <script src="{{uiRootPath}}{{asset 'js/site.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/highlight.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/svg4everybody.js'}}"></script>
+<script async src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
 
 Review comment:
   @zregvart I tried to solve this by 
   first
   >yarn add algoliasearch in antora-ui-camel 
   
   then
   >added a new algolia_search.js file into vendor folder which has
   ;(function () {
     var algoliasearch = require('algoliasearch')
     algoliassearch()
   })()
   
   finally
   >add that script into to footer scrips as you mentioned
   
   then I`m having these errors, any thoughts? 
   
   ![Screenshot from 2020-03-03 08-06-46](https://user-images.githubusercontent.com/25351304/75737567-14f59280-5d26-11ea-993e-2601c50495a6.png)
   ![Screenshot from 2020-03-03 08-05-37](https://user-images.githubusercontent.com/25351304/75737584-1de66400-5d26-11ea-9920-bb20ecc093b3.png)
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] zregvart commented on issue #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
zregvart commented on issue #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#issuecomment-594507579
 
 
   I think we should merge this, it's not perfect but it works. The two outstanding issues are the design polish and having our own data built for the index. The current Algolia index is based on Algolia crawling the website and it doesn't seem to include some pages and it is not 100% accurate.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] zregvart merged pull request #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
zregvart merged pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] zregvart commented on a change in pull request #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
zregvart commented on a change in pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#discussion_r386903298
 
 

 ##########
 File path: antora-ui-camel/src/partials/footer-scripts.hbs
 ##########
 @@ -1,5 +1,6 @@
 <script src="{{uiRootPath}}{{asset 'js/site.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/highlight.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/svg4everybody.js'}}"></script>
+<script async src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
 
 Review comment:
   You need to copy the file to the vendor directory, the Antora UI build is not using the dependencies declared in package.json. The idea of vendoring dependencies is that we copy the dependency that we use into our own source tree and not pull it in through any dependency management (such as npm or yarn).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] zregvart commented on a change in pull request #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
zregvart commented on a change in pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#discussion_r386272335
 
 

 ##########
 File path: antora-ui-camel/src/partials/footer-scripts.hbs
 ##########
 @@ -1,5 +1,6 @@
 <script src="{{uiRootPath}}{{asset 'js/site.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/highlight.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/svg4everybody.js'}}"></script>
+<script async src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
 
 Review comment:
   The content security policy won't load this on the production site. We need to put this script in the [`vendor`](https://github.com/apache/camel-website/tree/master/antora-ui-camel/src/js/vendor) directory and load it from there. Just like the two other scripts we have here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] zregvart commented on a change in pull request #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
zregvart commented on a change in pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#discussion_r386272534
 
 

 ##########
 File path: layouts/partials/footer.html
 ##########
 @@ -41,6 +41,7 @@
     <script src="{{ path.Join "_" (index .Site.Data "rev-manifest" "js/site.js") | relURL }}"></script>
     <script src="{{ path.Join "_" (index .Site.Data "rev-manifest" "js/vendor/highlight.js") | relURL }}"></script>
     <script src="{{ path.Join "_" (index .Site.Data "rev-manifest" "js/vendor/svg4everybody.js") | relURL }}"></script>
+    <script async src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
 
 Review comment:
   We also need to load from the `vendor` directory here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] zregvart commented on issue #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
zregvart commented on issue #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#issuecomment-591657888
 
 
   Preview is [here](https://builds.apache.org/job/Camel.website/job/PR-163/Preview/). I think we could do with a bit of styling on the search results, currently it looks like this:
   
   ![Screenshot_2020-02-26 https builds apache org](https://user-images.githubusercontent.com/1306050/75389975-c68c6200-58e7-11ea-85f3-4820c948e76e.png)
   
   There's also an error that gets logged in the browser console:
   
   ```
   TypeError: n._snippetResult is undefined
   ```
   
   It's good to see that the V4 of the Algolia search JavaScript is only 4.8KB (previous was 100+KB). I don't think it would load on the website due to content security policy:
   
   https://github.com/apache/camel-website/blob/d35d9e3be385a7a4bdf958a7b28d8a2bfaa15999/static/.htaccess#L1326
   
   We need to serve the resources from the same server, that would mean that we need to build/bundle with the theme (IIRC).
   
   I wonder why we don't get the component reference indexed, I think in the end the best outcome for us would be to generate the index ourselves, but this is a good start.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] Nayananga commented on issue #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
Nayananga commented on issue #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#issuecomment-593144318
 
 
   @zregvart Hello Mr Zoran, I made a few changes I would like to have more suggestions.Thanks

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] Nayananga commented on issue #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
Nayananga commented on issue #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#issuecomment-591757721
 
 
   @zregvart I`ll work on the styling and the console error.
   >I wonder why we don't get the component reference indexed
   
   If I remember correctly I showed you an algolia search demo with full site indexing. Perhaps this may be because of a configuration issue in that algolia crawler?  
   
   
   >I think in the end the best outcome for us would be to generate the index ourselves,
   
   +1

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] Nayananga commented on a change in pull request #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
Nayananga commented on a change in pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#discussion_r386769281
 
 

 ##########
 File path: antora-ui-camel/src/partials/footer-scripts.hbs
 ##########
 @@ -1,5 +1,6 @@
 <script src="{{uiRootPath}}{{asset 'js/site.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/highlight.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/svg4everybody.js'}}"></script>
+<script async src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
 
 Review comment:
   @zregvart I tried to solve this by 
   first
   >yarn add algoliasearch in antora-ui-camel 
   
   then
   >added a new algolia_search.js file into vendor folder which has
   ;(function () {
     var algoliasearch = require('algoliasearch')
     return algoliasearch()
   })()
   
   finally
   >add that script into to footer scrips as you mentioned
   
   then I`m having these errors, any thoughts? 
   
   ![Screenshot from 2020-03-03 08-06-46](https://user-images.githubusercontent.com/25351304/75737567-14f59280-5d26-11ea-993e-2601c50495a6.png)
   ![Screenshot from 2020-03-03 08-05-37](https://user-images.githubusercontent.com/25351304/75737584-1de66400-5d26-11ea-9920-bb20ecc093b3.png)
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] djencks commented on issue #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
djencks commented on issue #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#issuecomment-592149153
 
 
   Naively generating a lunr index on the antora site using antor-lunr, the search-index.js is about 75 mb, so the site is probably too large for lunr.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] djencks commented on issue #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
djencks commented on issue #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#issuecomment-593744904
 
 
   You need to have the file name be aloglia_search.bundle.js so that the UI builder will run browserify on the contents and convert the require into an “include”
   
   Hope this helps :-)
   
   David Jencks
   
   > On Mar 2, 2020, at 6:39 PM, Nayananga Anuradha Muhandiram <no...@github.com> wrote:
   > 
   > @Nayananga commented on this pull request.
   > 
   > In antora-ui-camel/src/partials/footer-scripts.hbs <https://github.com/apache/camel-website/pull/163#discussion_r386769281>:
   > 
   > > @@ -1,5 +1,6 @@
   >  <script src="{{uiRootPath}}{{asset 'js/site.js'}}"></script>
   >  <script async src="{{uiRootPath}}{{asset 'js/vendor/highlight.js'}}"></script>
   >  <script async src="{{uiRootPath}}{{asset 'js/vendor/svg4everybody.js'}}"></script>
   > +<script async src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
   > @zregvart <https://github.com/zregvart> I tried to solve this by
   > first
   > 
   > yarn add algoliasearch in antora-ui-camel
   > 
   > then
   > 
   > added a new algolia_search.js file into vendor folder which has
   > ;(function () {
   > var algoliasearch = require('algoliasearch')
   > algoliassearch()
   > })()
   > 
   > finally
   > 
   > add that script into to footer scrips as you mentioned
   > 
   > then I`m having these errors, any thoughts?
   > 
   >  <https://user-images.githubusercontent.com/25351304/75737567-14f59280-5d26-11ea-993e-2601c50495a6.png>
   >  <https://user-images.githubusercontent.com/25351304/75737584-1de66400-5d26-11ea-9920-bb20ecc093b3.png>
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub <https://github.com/apache/camel-website/pull/163?email_source=notifications&email_token=AAELDXXRGHKJ25A45RKECNTRFRUUVA5CNFSM4K4LPXCKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCXVCYYI#discussion_r386769281>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAELDXWPFMDQQIMJE3MY5ODRFRUUVANCNFSM4K4LPXCA>.
   > 
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] zregvart commented on issue #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
zregvart commented on issue #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#issuecomment-593301688
 
 
   I think we just need to vendor the algolia JavaScript file to have it load in production. We can further refine the design upon the feedback we get for the search functionality.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] Nayananga commented on a change in pull request #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
Nayananga commented on a change in pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#discussion_r387161255
 
 

 ##########
 File path: antora-ui-camel/src/partials/footer-scripts.hbs
 ##########
 @@ -1,5 +1,6 @@
 <script src="{{uiRootPath}}{{asset 'js/site.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/highlight.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/svg4everybody.js'}}"></script>
+<script async src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
 
 Review comment:
   @djencks Thanks for the suggestion, I was able to go half way through in that way by renaming the script, but then it gave me an error
   > window.algoliasearch is not a function.
   
   So I had to copy 06-search.js into the algoliasearch.bundle.js (which I`ve commited just now) now its work fine :)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] Nayananga commented on a change in pull request #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
Nayananga commented on a change in pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#discussion_r387161255
 
 

 ##########
 File path: antora-ui-camel/src/partials/footer-scripts.hbs
 ##########
 @@ -1,5 +1,6 @@
 <script src="{{uiRootPath}}{{asset 'js/site.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/highlight.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/svg4everybody.js'}}"></script>
+<script async src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
 
 Review comment:
   @djencks Thanks for the suggestion, I was able to go half way through in that way by renaming the script, but then it gave me an error
   > window.algoliasearch is not a function.
   
   So I had to copy 06-search.js into the algoliasearch.bundle.js (which I`ve commited just now) now it works fine :)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] djencks commented on a change in pull request #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
djencks commented on a change in pull request #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#discussion_r387152601
 
 

 ##########
 File path: antora-ui-camel/src/partials/footer-scripts.hbs
 ##########
 @@ -1,5 +1,6 @@
 <script src="{{uiRootPath}}{{asset 'js/site.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/highlight.js'}}"></script>
 <script async src="{{uiRootPath}}{{asset 'js/vendor/svg4everybody.js'}}"></script>
+<script async src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
 
 Review comment:
   It's much simpler to use the ui builder to pull in and browserify the sources. You do this with code like Nayananga suggested:
   ```
   ;(function () {
   var algoliasearch = require('algoliasearch')
   return algoliasearch()
   })()
   ````
   listing the `algoliasearch` in your package.json for the ui project, but naming the file `algoliasearch.bundle.js`.  The 'bundle' in the filename tells the builder to convert the require into a sort of 'include'.  
   In addition, copying the actual algoliasearch.js into the vendor directory will subject it to linting which will likely fail and involve you in hours of attempting to correct it or disabling the linting step on vendor.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-website] zregvart commented on issue #163: Pr/algolia search

Posted by GitBox <gi...@apache.org>.
zregvart commented on issue #163: Pr/algolia search
URL: https://github.com/apache/camel-website/pull/163#issuecomment-594097289
 
 
   The preview is [here](https://builds.apache.org/job/Camel.website/view/change-requests/job/PR-163/Preview/index.html).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services