colinwilson / lotusdocs

📖 A free, lightweight, modern documentation theme for Hugo [WIP]
https://lotusdocs.dev/docs/
MIT License
339 stars 76 forks source link

PrismJS highlight color no applied with shell #115

Closed Synomega closed 9 months ago

Synomega commented 10 months ago

Past Issues Searched

Issue is a Bug Report

Describe the bug

When I use Markdown shell syntax, the highlight color doesn't apply, but when I apply HTML, it seems to work.

image

sudo apt update
sudo apt install python3-pip -y
pip3 install --upgrade pip
pip3 install python-openstackclient python-novaclient python-swiftclient
openstack --help
nova help

image

<html>
  <head>
    <title>Buy cool new product</title>
  </head>
  <body>
    <!-- Use action="/create-checkout-session.php" if your server is PHP based. -->
    <form action="/create-checkout-session" method="POST">
      <button type="submit">Checkout</button>
    </form>
  </body>
</html>

Expected behavior

I expected highlight color applied like here : https://lotusdocs.dev/docs/quickstart/

Screenshots

image

Environment

- OS: Windows
- Browser: EDGE
- Browser Version:118.0.2088.46
Synomega commented 10 months ago

I found this in web developper tools when I load the page, It could help in debugging :

GET https://domain.fr/docs/procedure-technique/cloud-computing/openstack/preparer-un-environement-openstack-api/docs/js/components/prism-bash.min.js net::ERR_ABORTED 404 (Not Found) f @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:5 r @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:5 b @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:5 (anonymous) @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:5 l @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:5 (anonymous) @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:5 run @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:1 c @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:1 highlightElement @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:1 highlightAllUnder @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:1 highlightAll @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:1 r @ bundle.min.a885402b68b5f0349917e0d8145fb8cacd916b4a50c1f43dbfe7bf9e0c12bab975ecd33dfb2fe118b24ed11bb7912e20.js:1 preparer-un-environement-openstack-api/:1 Refused to execute script from 'https://domain.fr/docs/procedure-technique/cloud-computing/openstack/preparer-un-environement-openstack-api/docs/js/components/prism-bash.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

I don't know why it's trying to load the script in the wrong path, the scrpt is present here :

https://domain.fr/docs/js/components/prism-bash.min.js

Synomega commented 10 months ago

For information, the trouble appears on Vercel but not on Cloudflare Page