Static GitHub Issues

[2544] Generating full absolute url for social icons

prev: nuxt npm run dev error, promisify not a function
next: Underscores are not considered when building URLs

Little help here, couldn't figure out how to generate the full url (http://url.com/blog/this-is-a-blog-post) to be exported into facebook's sharing link https://www.facebook.com/sharer/sharer.php?u=${url}

Each of the blog post is retrieved via asyncData from a headless CMS. So I only have a slug this-is-a-blog-post to work with.

Ideally I'd like to use this.$route to generate the full url but none of the methods show how. Also taking into consideration I am using SSR, so the url is generated serverside, hence I cannot use window.location that is clientside.

Help appreciated :)

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2211">#c2211</a>)</em></sub></div>