Open HarshadRanganathan opened 5 years ago
I found out that when you use the URL generated from the demo it works.
URL from demo:
<div class="github-card" data-github="lepture/github-cards" data-width="400" data-height="" data-theme="default"></div>
<script src="//cdn.jsdelivr.net/github-cards/latest/widget.js"></script>
URL from readme:
<div class="github-card" data-user="lepture" data-repo="github-cards"></div>
<script src="https://cdn.jsdelivr.net/gh/lepture/github-cards@latest/jsdelivr/widget.js"></script>
jsdelivr/cards/default.html
. However, it's trying to access them via https://cdn.jsdelivr.net/gh/lepture/github-cards@1.0.5/cards/default.html resulting in below error.This can be fixed by using below meta tag
Alternatively, proper fix would be via
generate.py
script to replace below code when generating jsdelivr scripts to have the card path asjsdelivr/cards/
text/plain
for security reasons. So, the iframe is loaded with html content instead of the card.