Closed besdollma closed 3 years ago
From the top of the head, might be as easy as:
# Fetch CDN resources into the current directory
find html -name '*.html' | xargs grep -oP 'https://cdnjs[^"]*' | wget -i -
# Replace CDN resources with local ones, based in document root (/)
find html -name '*.html' | xargs sed -iE 's,https://cdnjs([^"]*?/)+,/,g'
This is a duplicate of https://github.com/pdoc3/pdoc/issues/136 (please subscribe there). Though, with fairly graceful degradation we do (everything is still readable offline) and with easy workarounds available (as above), unless there are better, simple ideas, I'm leaning to wontfix.
This is not really an issue but more of a consultation (but there are no discussions available for this repo).
I see that syntax nightlight is done using Highlight.js, and it is done using their online hosting. However I am hosting the docs in an offline server (on-prem, no internet). Is there any way to achieve syntax highlight in such conditions? Is there any tutorial? Thanks,