Skip to content

Commit

Permalink
feature: update version on public page, modify instructions to
Browse files Browse the repository at this point in the history
createElement as the default
  • Loading branch information
cdxker authored and skeptrunedev committed Dec 18, 2024
1 parent 6d1ea18 commit 81a4e7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions server/src/public/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<link rel="stylesheet" href="/static/output.css" />
<link
rel="stylesheet"
href="https://unpkg.com/trieve-search-component@0.2.30/dist/index.css"
href="https://search-component.trieve.ai/dist/index.css"
/>
<link
rel="apple-touch-icon"
Expand Down Expand Up @@ -291,7 +291,7 @@
</style>

<script type="module">
import {renderToDiv} from 'https://unpkg.com/trieve-search-component@0.2.30/dist/vanilla/index.js';
import {renderToDiv} from 'https://search-component.trieve.ai/dist/vanilla/index.js';
const root = document.getElementById('root');
renderToDiv(root, {
... {{params | tojson}}
Expand Down
9 changes: 6 additions & 3 deletions server/src/public/search-component-code.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
<code class="language-javascript">
&lt;link
rel="stylesheet"
href="https://unpkg.com/trieve-search-component@0.2.29/dist/index.css"
href="https://search-component.trieve.ai/dist/index.css"
/&gt;

&lt;script type="module"&gt;
import {renderToDiv} from 'https://unpkg.com/trieve-search-component@0.2.29/dist/vanilla/index.js';
import {renderToDiv} from 'https://search-component.trieve.ai/dist/vanilla/index.js';
window.addEventListener('load', () => {
const root = document.getElementById('root');
const root = document.createElement('div');
root.classList.add('trigger');
document.body.appendChild(root);

renderToDiv(root, {
{% if params.apiKey -%}
apiKey: "{{ params.apiKey }}",
Expand Down

0 comments on commit 81a4e7e

Please sign in to comment.