Closed HeyITGuyFixIt closed 3 months ago
This line:
could be changed to
var contents = '---\nlayout: plugin\npermalink: plugins/' + encodeURIComponent(pluginJson.name) + '/\npluginName: ' + encodeURIComponent(pluginJson.name) + '\n---\n\n' + pluginJson.readme;
if you want to use encodeURIComponent
.
PRs welcome!
I get a 404 when opening a plugin link that contains a scope, such as
@faltest/chai
which links tohttps://www.chaijs.com/plugins/@faltest/chai/
. The permalink is supposed to beplugins/@faltest/chai/
.When looking at the generated md file, GitHub shows this error:
I am guessing it doesn't like the @. It needs to be escaped.
encodeURI
won't encode the @, andencodeURIComponent
turns@faltest/chai
into%40faltest%2Fchai
.