mirror of
https://github.com/ipfs/ipfs-blog.git
synced 2026-03-28 17:32:37 +01:00
fix: update ascii iframe
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Reference in New Issue
Block a user