This issue is for the need for an overall code audit, focusing in particular on:
Modules etc that could be removed as a result of being ported over from PL blog but not needed here
Potential barriers to deployment over IPFS
Please separate the results out into their own issues so they're easier to work - thanks!
This issue is for the need for an overall code audit, focusing in particular on:
- Modules etc that could be removed as a result of being ported over from PL blog but not needed here
- Potential barriers to deployment over IPFS
Please separate the results out into their own issues so they're easier to work - thanks!
<!-- github-sync-id:791330782 -->
@cwaring -- thank you for identifying any problems here as you find them! 🙏 I can separate into checklists or individual issues as need be.
@cwaring -- thank you for identifying any problems here as you find them! 🙏 I can separate into checklists or individual issues as need be.
<!-- github-comment-id:788314005 -->
@zebateira - per our conversation, are you able to work with @cwaring and @jdiogopeixoto to get this and #41 resolved? As we discussed, we might also want to look into establishing some sort of ongoing instrumentation for the blog to keep an eye on performance as the blog continues to expand over time. Thank you!
@zebateira - per our conversation, are you able to work with @cwaring and @jdiogopeixoto to get this and #41 resolved? As we discussed, we might also want to look into establishing some sort of ongoing instrumentation for the blog to keep an eye on performance as the blog continues to expand over time. Thank you!
<!-- github-comment-id:794202168 -->
@jessicaschilling I would prefer to go forward with a separate code audit from the payload issue. Will leave an update here soon about this.
@jessicaschilling I would prefer to go forward with a separate code audit from the payload issue. Will leave an update here soon about this.
<!-- github-comment-id:805777718 -->
Agree with @zebateira here. There is a lot more to be covered than captured in that issue, best keep this on the radar.
Agree with @zebateira here. There is a lot more to be covered than captured in that issue, best keep this on the radar.
<!-- github-comment-id:805794620 -->
Remove unused code and packages (addressed by #100)
Initial list:
- [x] Blog post images need to be out of the public folder and required by webpack (follow up from discussion in #91, WIP in https://github.com/ipfs/ipfs-blog/pull/99)
- [x] Remove unused code and packages (addressed by #100)
<!-- github-comment-id:809533826 -->
Countly should not load in dev mode, as not to pollute analytics
bonus: card zoom hover is disorienting, try a subtle zoom on the image instead (eg https://protocol.ai/blog/)
I'll maintain a list of items here as I notice them:
- [x] Remove image crop route from blog config
- [x] Correctly exclude sitemap and feed items
- [x] Ensure generated page metadata is correct
- [x] Tailwind should be upgraded to 2.x (we can now use JIT mode to save build time)
- [x] 404 should use a layout file (example: [config](https://github.com/ipfs/ipfs-docs/blob/main/docs/.vuepress/config.js#L326) [404.vue](https://github.com/ipfs/ipfs-docs/blob/main/docs/.vuepress/theme/layouts/404.vue))
- [x] Tags and authors should have `rel="nofollow"` to stop url indexing
- [x] App metadata should be changed from ["Protocol Labs"](https://github.com/ipfs/ipfs-blog/blob/main/src/.vuepress/config/head.js#L27-L29)
- [x] Countly should not load in dev mode, as not to pollute analytics
- [x] bonus: card zoom hover is disorienting, try a subtle zoom on the image instead (eg https://protocol.ai/blog/)
<!-- github-comment-id:810225254 -->
Currently the script redirect to /404.html is not working, but we can tweak it to make it work quickly.
@cwaring regarding the 404, is it possible to make it work on a subpath? It doesn't seem to be working: https://ipfs.fleek.co/ipfs/Qmb4soPiemEeQoYWciwsZXaCBP3AYeojjrCFdCGHjsSgwe/asdf
Currently the script redirect to `/404.html` is not working, but we can tweak it to make it work quickly.
<!-- github-comment-id:814303656 -->
It's only possible by redirecting with the ipfsPathPrefix script. However in my mind the 404 is not really required when you're viewing a site from a CID gateway because that is a snapshot in time that will never change, so I'm ok with the compromise of using <base href="/"> to pin the 404 page to the root domain because a 404 is unlikely to be triggered unless that CID deploy happed to include internal dead links. Which should be a low probability.
The advantage of using a 404 layout means it's easy to capture the url for the 404 and report to analytics. If we redirect to a root /404 page perhaps this is also possible by checking the referer?
It's only possible by redirecting with the `ipfsPathPrefix` script. However in my mind the 404 is not really required when you're viewing a site from a CID gateway because that is a snapshot in time that will never change, so I'm ok with the compromise of using `<base href="/">` to pin the 404 page to the root domain because a 404 is unlikely to be triggered unless that CID deploy happed to include internal dead links. Which should be a low probability.
The advantage of using a 404 layout means it's easy to capture the url for the 404 and report to analytics. If we redirect to a root /404 page perhaps this is also possible by checking the referer?
<!-- github-comment-id:814331937 -->
The alternative that would work in both scenarios might be:
ipfs-404.html responsible for redirects -> {cid}/404 OR /404
/404 - responsible for displaying the 404 and reporting the referer path to analytics (so we can fix the 404)
Downside is this would only work if JS is enabled but who really browses with JS disabled these days?!
The alternative that would work in both scenarios might be:
ipfs-404.html responsible for redirects -> {cid}/404 OR /404
/404 - responsible for displaying the 404 and reporting the referer path to analytics (so we can fix the 404)
Downside is this would only work if JS is enabled but who really browses with JS disabled these days?!
<!-- github-comment-id:814335605 -->
I just checked, this would work but then you would also lose the original referer link because of the interim redirect.
eg:
[article elsewhere on the web] -> ipfs-blog/post -> ipfs-404 -> 404 (document.referer = 'ipfs-blog/post')
[article elsewhere on the web] -> ipfs-blog/post -> 404 (document.referer = 'article elsewhere on the web')
This can be helpful for figuring out the original source link and fixing them. So you would have to pass on the original referer to the 404 page to capture everything correctly or do the analytics tracking before the redirect, but then you would have to wait for that to complete before redirecting to ensure it was captured. Simply using one 404.vue is the easiest solution for now.
Also I know there aren't any 404 analytics yet on this site but that should be added asap :)
I just checked, this would work but then you would also lose the original referer link because of the interim redirect.
eg:
[article elsewhere on the web] -> ipfs-blog/post -> ipfs-404 -> 404 (document.referer = 'ipfs-blog/post')
[article elsewhere on the web] -> ipfs-blog/post -> 404 (document.referer = 'article elsewhere on the web')
This can be helpful for figuring out the original source link and fixing them. So you would have to pass on the original referer to the 404 page to capture everything correctly or do the analytics tracking before the redirect, but then you would have to wait for that to complete before redirecting to ensure it was captured. Simply using one 404.vue is the easiest solution for now.
Also I know there aren't any 404 analytics yet on this site but that should be added asap :)
<!-- github-comment-id:814350578 -->
It looks like we've covered all the burning issues now but we should do another round to actually check over optimisations and configuration, I haven't had time to go much deeper in this sprint.
Calling this complete for now so we can move onto the pre-flight transition!
It looks like we've covered all the burning issues now but we should do another round to actually check over optimisations and configuration, I haven't had time to go much deeper in this sprint.
Calling this complete for now so we can move onto the pre-flight transition!
<!-- github-comment-id:815892926 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This issue is for the need for an overall code audit, focusing in particular on:
Please separate the results out into their own issues so they're easier to work - thanks!
@cwaring -- thank you for identifying any problems here as you find them! 🙏 I can separate into checklists or individual issues as need be.
I'll report back with an evaluation within the next couple of weeks, and also my suggestions to #41.
@zebateira - per our conversation, are you able to work with @cwaring and @jdiogopeixoto to get this and #41 resolved? As we discussed, we might also want to look into establishing some sort of ongoing instrumentation for the blog to keep an eye on performance as the blog continues to expand over time. Thank you!
Note re instrumentation: @atopal recommends https://speedcurve.com/.
Do we feel we can close this issue in favor of https://github.com/ipfs/ipfs-blog/issues/41?
@jessicaschilling I would prefer to go forward with a separate code audit from the payload issue. Will leave an update here soon about this.
Agree with @zebateira here. There is a lot more to be covered than captured in that issue, best keep this on the radar.
Initial list:
I'll maintain a list of items here as I notice them:
rel="nofollow"to stop url indexingfirst two items from @cwaring list addressed in #98
Added a few more items above :)
@cwaring regarding the 404, is it possible to make it work on a subpath? It doesn't seem to be working: https://ipfs.fleek.co/ipfs/Qmb4soPiemEeQoYWciwsZXaCBP3AYeojjrCFdCGHjsSgwe/asdf
Currently the script redirect to
/404.htmlis not working, but we can tweak it to make it work quickly.It's only possible by redirecting with the
ipfsPathPrefixscript. However in my mind the 404 is not really required when you're viewing a site from a CID gateway because that is a snapshot in time that will never change, so I'm ok with the compromise of using<base href="/">to pin the 404 page to the root domain because a 404 is unlikely to be triggered unless that CID deploy happed to include internal dead links. Which should be a low probability.The advantage of using a 404 layout means it's easy to capture the url for the 404 and report to analytics. If we redirect to a root /404 page perhaps this is also possible by checking the referer?
The alternative that would work in both scenarios might be:
ipfs-404.html responsible for redirects -> {cid}/404 OR /404
/404 - responsible for displaying the 404 and reporting the referer path to analytics (so we can fix the 404)
Downside is this would only work if JS is enabled but who really browses with JS disabled these days?!
I just checked, this would work but then you would also lose the original referer link because of the interim redirect.
eg:
[article elsewhere on the web] -> ipfs-blog/post -> ipfs-404 -> 404 (document.referer = 'ipfs-blog/post')
[article elsewhere on the web] -> ipfs-blog/post -> 404 (document.referer = 'article elsewhere on the web')
This can be helpful for figuring out the original source link and fixing them. So you would have to pass on the original referer to the 404 page to capture everything correctly or do the analytics tracking before the redirect, but then you would have to wait for that to complete before redirecting to ensure it was captured. Simply using one 404.vue is the easiest solution for now.
Also I know there aren't any 404 analytics yet on this site but that should be added asap :)
WIP PR for 404 here: https://github.com/ipfs/ipfs-blog/pull/106 (includes analytics as well :) )
@cwaring does this feel like it's complete? Or do you want another iteration after launch?
It looks like we've covered all the burning issues now but we should do another round to actually check over optimisations and configuration, I haven't had time to go much deeper in this sprint.
Calling this complete for now so we can move onto the pre-flight transition!