fix: update ascii iframe

This commit is contained in:
João Peixoto committed 2021-04-07 17:55:45 +01:00
1 parent 9974b03764
commit cc4e8aca1e
3 files changed
+18 -3

No files matched your search

+17 -2
View File
@@ -47,14 +47,29 @@ export default {
showComments: null,
}),
mounted() {
const ipfsPathRegExp = /^(\/(?:ipfs|ipns)\/[^/]+)/
const ipfsPathPrefix =
(window.location.pathname.match(ipfsPathRegExp) || [])[1] || ''
if (ipfsPathPrefix) {
Array.from(document.querySelectorAll('iframe')).forEach((iframe) => {
const src = iframe.getAttribute('src')
if (src.startsWith('/')) {
iframe.setAttribute('src', ipfsPathPrefix + src)
}
})
}
this.showComments =
window.location.hostname === 'blog.ipfs.io' ||
window.location.hostname === 'blog.ipfs.io.ipns.localhost:8080' ||
window.location.hostname === '127.0.0.1:8080/ipns/blog.ipfs.io/' ||
window.location.hostname === 'ipfs-blog.on.fleek.co' ||
window.location.hostname === 'ipfs-blog.on.fleek.co.ipns.localhost:8080' ||
window.location.hostname ===
'ipfs-blog.on.fleek.co.ipns.localhost:8080' ||
window.location.hostname === 'ipfs-blog-staging.on.fleek.co' ||
window.location.hostname === 'ipfs-blog-staging.on.fleek.co.ipns.localhost:8080'
window.location.hostname ===
'ipfs-blog-staging.on.fleek.co.ipns.localhost:8080'
},
}
</script>
+1 -1
View File
@@ -61,5 +61,5 @@ hello from dockerized ipfs
[Kubernetes 1.0](http://kuberneteslaunch.com) comes out next week, so after that, we'll try using it to build a cluster of IPFS nodes that can store any kind of data and be able to retreive it from any other IPFS node. Not just with IPFS nodes in your cluster, but with everyone!
<iframe src="/blog/001-run-ipfs-on-docker/ascii" style="width: 737px; height: 509px; overflow: hidden;" scrolling="no"></iframe>
<iframe src="/blog/001-run-ipfs-on-docker/ascii/" style="width: 737px; height: 509px; overflow: hidden;" scrolling="no"></iframe>
<p class="powered">asciicast powered by <a href="https://asciinema.org/" target="_top">asciinema</a></p>
File renamed without changes.