colinwilson / lotusdocs

📖 A free, lightweight, modern documentation theme for Hugo [WIP]

Home Page:https://lotusdocs.dev/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hardcoded language grammar path in PrismJS autoloader config results in 404s

colinwilson opened this issue · comments

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for support

Describe the bug

See discussion #77 (comment)

The hardcoded PrismJS autoloader plugin language path causes 404 errors if a Hugo project is deployed in a path other than root.

Expected behavior

The PrismJS autoloader should find language grammars regardless of the site's baseURL

Screenshots

No response

Environment

- OS: Windows 11
- Browser: FireFox / Chrome
- Browser Version: 116

Fixed by a6d0d9b

Edit: Does not work! PrismJS looks for the language grammar files relative to the current path instead of the actual path.

Fixed by bc1752e