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

re: You can make it work in framework that way by putting that script file before end of body tag in your index.html. These frameworks follow a parti...

That makes total sense @saurabhdaware . Thanks for the explanation! 🌻

I'll do some more research to see if I can get this working in vue / nuxt component pages!

Here's how to use your widget in Nuxt, for future reference:

@kiyuku1 's answer would work, but here's the complete solution that would work if we want to include a js (or mjs) file in ONE nuxt.js page only, instead of globally:

  <div class="container">

        <dev-widget data-username="saurabhdaware"></dev-widget>



export default {
  layout: "default",

  head: {
    script: [

Oh I did not know Nuxt required separate handling. Thank you so much 🌻

Code of Conduct Report abuse