jperasmus / docsify-copy-code

A docsify plugin that copies Markdown code block to your clipboard
MIT License
99 stars 72 forks source link

404 error script with unpkg #11

Closed SidVal closed 5 years ago

SidVal commented 5 years ago

We have a problem here when you said #15: <script src="https://unpkg.com/docsify-copy-code@2"></script>

It should be: <script src="https://unpkg.com/docsify-copy-code@2/"></script>

I found the solution with this great comment: https://github.com/jperasmus/docsify-copy-code/issues/7#issuecomment-382120726

Same mistake here on #26, you put: <script src="https://unpkg.com/docsify-copy-code"></script>

And should be: <script src="https://unpkg.com/docsify-copy-code/"></script>

jhildenbiddle commented 5 years ago

Hi @SidVal,

The 404 error was most likely caused by a temporary unpkg.com outrage, not an issue with the URLs used.

See #7 for details, but the summary is do not add a trailing slash to redirect to the actual script file (what we want), or add a trailing slash to view a directory of all files in a lib (not what we want).

Thanks for posting the issue so quickly though. Much appreciated. All seems to be resolved.

SidVal commented 5 years ago

If you don't put the / at the end, you'll get a 404 error.

Right now it's sending error. 👎

jhildenbiddle commented 5 years ago

See here: https://github.com/jhildenbiddle/docsify-tabs/issues/3#issuecomment-448685420

(Same conversation. Consolidating threads.)