Code Monkey home page Code Monkey logo

Comments (1)

jhildenbiddle avatar jhildenbiddle commented on July 28, 2024

Works without issue in this demo:

Note: Due to the way codesandbox.io sandboxes the editor and preview windows, the demo will only work when the preview is launched as a separate window. This is a codesandbox issue and not a docsify, docisfy-themeable, or plugin issue.

The error indicates that the issue is with docsify-pdf-embed.js and its attempt use of a localCompare property that doesn't exist. I'm guessing this is an attempt to use String.prototype.localeCompare() which may be failing due to lack of browser support.

You also have a few issues with your <script> tags:

<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js"></script> 
<script src="ressources/js/docsify-pdf-embed.js"></script>
  1. docisfy is loaded twice (first two <script> tags)
  2. docsify-themeable <script> tag is not included (see docs)
  3. Versions are only specified for some files
  4. Sources (unpkg/cdnjs/local) and formatting (// vs https://) are all over the place.

Here's is what I would suggest instead:

<script src="https://cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-themeable@0"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/plugins/zoom-image.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pdfobject@2"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-pdf-embed-plugin@1"></script>

from docsify-themeable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.