Skip to content

Commit

Permalink
fix path to local client JS
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Feb 14, 2024
1 parent 24ef6f1 commit 2eb86bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion docs/src/components/Bookmark/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import Heading from '@theme/Heading';
import Head from '@docusaurus/Head';
import styles from './styles.module.css';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';

const BookmarkSVG = require('@site/static/img/bookmarklet.svg').default;

export default function Bookmark(): JSX.Element {
const { siteConfig } = useDocusaurusContext();

return (
<section id="bookmarklet">
<div className="container">
<BookmarkSVG className={styles.bookmarkSVG} role="img" />
<Heading as="h3">Bookmarklet</Heading>
<Head>
<script src="/js/bookmark.js"/>
<script src={`${siteConfig.baseUrl}/js/bookmark.js`}/>
</Head>
<p>....</p>
<p>
Expand Down
7 changes: 5 additions & 2 deletions docs/src/components/Interpreter/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Head from '@docusaurus/Head';
import { useEffect } from 'react';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';

import './styles.css';

const examples = [
Expand Down Expand Up @@ -30,7 +32,7 @@ const examples = [
;; &() is object literal used with quasiquote
(define (make-person first last)
\`&(:fist ,first :last ,last))
\`&(:fist ,first :last ,last))
(define beatles (map make-person
'("John" "Paul" "Ringo" "George")
Expand Down Expand Up @@ -261,12 +263,13 @@ function useScripts(scripts: string[]) {


export default function Interpreter(): JSX.Element {
const { siteConfig } = useDocusaurusContext();
useScripts([
'https://code.jquery.com/jquery-3.4.1.min.js',
'https://cdn.jsdelivr.net/combine/npm/jquery.terminal/js/jquery.terminal.min.js,npm/js-polyfills/keyboard.js,npm/prismjs/prism.js,npm/jquery.terminal/js/prism.js,npm/prismjs/components/prism-scheme.min.js',
'https://cdn.jsdelivr.net/npm/@jcubic/lips@beta/lib/js/terminal.js',
'https://cdn.jsdelivr.net/npm/@jcubic/lips@beta/lib/js/prism.js',
'/js/interpreter.js'
`${siteConfig.baseUrl}/js/interpreter.js`
]);
return (
<>
Expand Down

0 comments on commit 2eb86bc

Please sign in to comment.