Added a relativePath filter to be used for all internal links, imports and images
This filter expects the page front matter to be passed in to determine the relative path of the links/images/imports(that's why the partial imports now have with context because the page context isn't available in those files by default)
Updated the tailwind font path to be relative
The app is using the localImages plugin to save external images locally, which prevented me from using my relativePath filter because those asset paths are re-written after all the markup has already been compiled. To get around this I wrote a relativeLocalImages plugin that works as kind of a post-processor for localImages and converts all those paths to relative paths after that plugin has run for each image
There are some extra codes changes in the files I touched because my prettier plugin auto-formatted some things
I noticed the footer copyright date was hardcoded to 2021 so i wrote a small util function to render the year dynamically
Note: I clicked/looked around quite a bit and I'm pretty sure I fixed every instance where things were breaking on the IPFS version, but please let me know if you see anything I missed 👌🏼
Description
relativePath
filter to be used for all internal links, imports and imagespage
front matter to be passed in to determine the relative path of the links/images/imports(that's why the partial imports now havewith context
because the page context isn't available in those files by default)localImages
plugin to save external images locally, which prevented me from using myrelativePath
filter because those asset paths are re-written after all the markup has already been compiled. To get around this I wrote arelativeLocalImages
plugin that works as kind of a post-processor forlocalImages
and converts all those paths to relative paths after that plugin has run for each image2021
so i wrote a small util function to render the year dynamicallyNote: I clicked/looked around quite a bit and I'm pretty sure I fixed every instance where things were breaking on the IPFS version, but please let me know if you see anything I missed 👌🏼
Link to issue
https://github.com/fission-suite/landing-page/issues/61
Type of change
Screenshots/Screencaps
Paths working the same as before on the non-IPFS version: https://www.loom.com/share/b1297a23fb424eaeb3e4e379e97ed015
All stylesheet, font, internal image and internal links now working on the IPFS version: https://www.loom.com/share/d4cc1940fcb344e180c43c3db6dba31b
Screenshots/Screencaps
Deployed non-IPFS version: https://tubular-triangular-yellow-cat.fission.app/
Deployed IPFS version: https://ipfs.runfission.com/ipns/tubular-triangular-yellow-cat.fission.app/