diff --git a/src/.vuepress/theme/layouts/BlogPost.vue b/src/.vuepress/theme/layouts/BlogPost.vue index a3e3c4fb..552787f0 100644 --- a/src/.vuepress/theme/layouts/BlogPost.vue +++ b/src/.vuepress/theme/layouts/BlogPost.vue @@ -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' }, } diff --git a/src/_blog/001-run-ipfs-on-docker.md b/src/_blog/001-run-ipfs-on-docker.md index bfdc069f..59f6bbe7 100644 --- a/src/_blog/001-run-ipfs-on-docker.md +++ b/src/_blog/001-run-ipfs-on-docker.md @@ -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! - +

asciicast powered by asciinema

diff --git a/src/.vuepress/public/128-nft-header.png b/src/assets/128-nft-header.png similarity index 100% rename from src/.vuepress/public/128-nft-header.png rename to src/assets/128-nft-header.png