re: I made DEV.to widget for websites/blogs VIEW POST


This is great. Nit: Promote healthy web practices and add sub-resource integrity (SRI) via the integrity attribute on your example.


You can grab your hash from unpkg via the meta query parameter:


<script src="https://unpkg.com/dev-widget@1.0.1/dist/card.component.mjs" type="module" integrity="sha384-755Jblzb17ugkA3KRCLz4XS8CPb3xEwBdBMk8ZBw51agtKmppILXMJrKvuTRkUhy"></script>

Oh thank you! I've added integity hash to my codepen demo. Not really sure how I can get that hash before publishing so that I can set in readme (Apparently that hash changed from 1.0.1 to 1.0.2)

Yup, the hash will change for each version of the script pushed to the CDN.


Oh I didn't know about this thank you so much! I'll check it out

Code of Conduct Report abuse