Skip to content

Commit

Permalink
add page-chatbot attribute to enable chatbot
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-cowley committed Aug 8, 2024
1 parent 321d1be commit fe13b92
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions preview-src/driver.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
= Neo4j & Python
:page-theme: docs
:page-role: code-walkthrough
:page-chatbot: http://localhost:3000/
:!toc:


Expand Down
9 changes: 7 additions & 2 deletions src/partials/footer-scripts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{/if}}
{{#if (and (eq @root.page.attributes.theme "cheat-sheet") (not (eq @root.site.url "http://localhost:5252")))}}
<script src="{{{@root.site.path}}}{{{@root.site.ui.url}}}/js/vendor/auth0.js"></script>

<script src="{{{@root.site.path}}}{{{@root.site.ui.url}}}/js/site.js"></script>
{{!-- <script async src="{{{@root.site.path}}}{{{@root.site.ui.url}}}/js/vendor/gram.js"></script> --}}
<script async src="{{{@root.site.path}}}{{{@root.site.ui.url}}}/js/vendor/highlight.js"></script>
Expand All @@ -28,7 +28,12 @@
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/browser/neo4j-web.min.js"></script>
{{/if}}

{{#if page.attributes.chatbot}}
<div id="docs_chatbot"></div>
<script type="module" crossorigin src="{{{ page.attributes.chatbot }}}index.js"></script>
{{/if}}

<div id="neo4j-algolia-search-v2"></div>
<script src="https://neo4j.com/wp-content/themes/neo4jweb/assets/neo4j-react-modules-assets/search-preact/chunkless/bundle.js"></script>
<script src="https://neo4j.com/wp-content/themes/neo4jweb/assets/neo4j-react-modules-assets/search-preact/chunkless/polyfill.js"></script>
<script>window.algoliaSearchOptions = {indexName: "docs",placeholder: "Search Documentation",template: "docs"}</script>
<script>window.algoliaSearchOptions = {indexName: "docs",placeholder: "Search Documentation",template: "docs"}</script>
4 changes: 4 additions & 0 deletions src/partials/head-styles.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@

<link rel="shortcut icon" href="https://neo4j.com/wp-content/themes/neo4jweb/favicon.ico" />


{{#if page.attributes.chatbot}}
<link rel="stylesheet" crossorigin href="{{{ page.attributes.chatbot }}}index.css">
{{/if}}

0 comments on commit fe13b92

Please sign in to comment.