mirror of
https://github.com/ipfs/ipfs-blog.git
synced 2026-08-07 17:32:55 +02:00
fix: show comments on netlify domain
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2 class="type-h2">Comments</h2>
|
||||
<iframe
|
||||
<div id="discourse-comments" class="mt-4 mb-24"></div>
|
||||
<!-- <iframe
|
||||
id="discourse-embed-frame"
|
||||
ref="frame"
|
||||
class="mt-4 mb-24"
|
||||
:src="embedSrc"
|
||||
width="100%"
|
||||
scrolling="no"
|
||||
:height="frameHeight"
|
||||
referrerpolicy="no-referrer-when-downgrade"
|
||||
/>
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -16,11 +19,21 @@
|
||||
export default {
|
||||
name: 'Comments',
|
||||
components: {},
|
||||
data: () => ({}),
|
||||
computed: {
|
||||
embedSrc() {
|
||||
return `https://discuss.ipfs.io/embed/comments?embed_url=https://blog.ipfs.io${this.$frontmatter.url}`
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
window.DiscourseEmbed = {
|
||||
discourseUrl: 'https://discuss.ipfs.io/',
|
||||
discourseEmbedUrl: `https://blog.ipfs.io${this.$frontmatter.url}`,
|
||||
}
|
||||
const d = document.createElement('script')
|
||||
d.type = 'text/javascript'
|
||||
d.async = true
|
||||
d.src = 'https://discuss.ipfs.io/javascripts/embed.js'
|
||||
document.getElementsByTagName('body')[0].appendChild(d)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user