Adding the page constructor for the individual blog posts
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project - Commits
- rABC31e75323f8ff: [e.cash] Add blog post page
preview the site and go to /blog page
click on some of the links and see if the post pages render correct
also try navigating directly to some of the post pages
note: some images are still broken on the post pages, this is not an issue here they just need to be
added to strapi still
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- ecash-posts-pages
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 24374 Build 48357: Build Diff Build 48356: arc lint + arc unit
Event Timeline
Build Bitcoin ABC Diffs / Diff Testing (preview-e.cash) passed.
Preview is available at http://54.39.19.73:41778 for the next 60 minutes.
Build Bitcoin ABC Diffs / Diff Testing (preview-e.cash) passed.
Preview is available at http://51.68.37.192:41826 for the next 60 minutes.
Noticed a few weirdnesses the look like broken images
from here: http://51.68.37.192:41826/blog/ecash-aliases-development-sneak-peek-june-2023
Weirdly cropped image here: http://51.68.37.192:41826/blog/what-the-future-holds-for-ecash
And another broken-looking image here: http://51.68.37.192:41826/blog/ecash-monthly-recap-may-2023
Yeah for the broken images see the note in the description, those are broken on the cms side not here.
Basically the transfered webflow data just had relative image paths (ie: '/images/filename.jpg') so will need to go through and update those in strapi.
That is add the image to strapi and update the image in the content section
Will be a tedious job, but hopefully can divide it up? everyone take 20 posts or something
As for the cropping, will check that out
Build Bitcoin ABC Diffs / Diff Testing (preview-e.cash) passed.
Preview is available at http://54.39.19.73:41871 for the next 60 minutes.
Yeah for the broken images see the note in the description, those are broken on the cms side not here.
Basically the transfered webflow data just had relative image paths (ie: '/images/filename.jpg') so will need to go through and update those in strapi.
That is add the image to strapi and update the image in the content section
Will be a tedious job, but hopefully can divide it up? everyone take 20 posts or something
What's the workflow to take this on?
What's the workflow to take this on?
Yeah so basically
- Get an account setup in strapi
- Download the images from the webflow post
- Upload the images to strapi
- Replace the image paths in the content section of each post in strapi with the correct uploaded image
Figure theres like at least five of us that could split it up? so about 17 posts each
Other jank but faster solution is just download all of the images and put them in the next.js images folder and the image paths should all work lol, but figured we dont want that
Build Bitcoin ABC Diffs / Diff Testing (preview-e.cash) passed.
Preview is available at http://54.39.19.73:41044 for the next 60 minutes.
web/e.cash/pages/blog/[slug].js | ||
---|---|---|
41 | This is hardcoded more than once in this component. Can define it somewhere, const STRAPI_URL = Seems to appear throughout the app in various places. Ideally would be defined in one place in case we change our strapi backend at some point. At the very least, define it in this component. | |
65 | var for hard coded url |
For sure, I added it here for now, but will make an issue to replace it globally as it is being used in a lot of places
Build Bitcoin ABC Diffs / Diff Testing (preview-e.cash) passed.
Preview is available at http://54.39.19.73:41440 for the next 60 minutes.
Build Bitcoin ABC Diffs / Diff Testing (preview-e.cash) passed.
Preview is available at http://54.39.19.73:41384 for the next 60 minutes.
Figure theres like at least five of us that could split it up? so about 17 posts each
Can we get a script to automate this ? So a single person can run it all in seconds, at the cost of a few minutes/hours of dev. That would be a huge man/hour gain.
web/e.cash/pages/blog/[slug].js | ||
---|---|---|
1 ↗ | (On Diff #41297) | Is the file name normal ? |
22 ↗ | (On Diff #41297) | That's better, but it would be even better in a config file so we can update at all the places at once |
typical approach for blog migration would be
- download all the images
- upload them all with the same name
- run a script to change the base url in all the href links
unfortunately, here's the URL of a typical blog image: https://assets-global.website-files.com/60d1114fcb4e3e7fbb5115ad/6388d5f13da41f37032adf10_hRvZoMZLSednx3mHjFmxPk_fxRhb83V4D1eHxlfzCy5_-cs3LHzRQJBeO5aFkqh8EdCUTitdaxIgXdKhviepF5t9xgL5A9bPyRLepawwpPa9X0ctBHZsRm-E1Yn_jN0HdBQ_Ak6Qyr-9hbCyGctXF6bEnXPjOTX9zapEIm7kYyyIyu4WnCZjgK4Bv6CT1A.jpeg
imo probably not desirable to preserve this naming convention. Also, when you export them from webflow, they aren't named that way...so even if you wanted to preserve the names, you need to manually download them all.
...so, it is scriptable, but probably better to just work through it one page at a time. get better seo and maintainability with better image names.
Can we get a script to automate this ? So a single person can run it all in seconds, at the cost of a few minutes/hours of dev. That would be a huge man/hour gain.
Yeah a script would be great. Im not sure I can knock something like that out in minutes/hours though, or at all, Im not sure there is a way around the manual media uploads in strapi
web/e.cash/pages/blog/[slug].js | ||
---|---|---|
1 ↗ | (On Diff #41297) | oh were you asking if the brackets are normal? the brackets are normal, and required for generated pages like this in next.js. |
Build Bitcoin ABC Diffs / Diff Testing (preview-e.cash) passed.
Preview is available at http://54.39.19.73:41053 for the next 60 minutes.
green tho still some tasks left to get the blog up to speed
- image uploads
- code formatting (e.g. blog/building-on-ecash-january-2023)