Components: BlogHeader, BlogImage, BlogText (corresponding React components on frontend)
Collection: Blog
New Astro page: /blogs/[blog]
Typegen! See notes cause it's not directly related to ticket
Bugfix: add authorisation header in strapi.ts (see this thread)
How To Review
Lots of commits and some are overwritten later on so review file-wise:
Boot up strapi and check the types/constraints etc are alg
Review files in src/pages/blogs/... and src/components/blog/... on frontend
Try out typegen - is there anything we can improve it?
Testing
Created a blog in strapi with slug test and all three blog components and navigated to /blogs/test - all works.
Notes
Typegen
If you run yarn typegen in the root directory, it now runs a script that creates typescript types from Strapi types and moves them to the frontend (web/src/types) to use on the frontend like normal types 🎉. At the moment, the cp command only works in bash terminal so use that to run yarn typegen.
Can anyone make it work in powershell too?
Anyone know how to make it watch the Strapi types and automatically create and copy types whenever something changes so we don't need to keep manually running it?
It currently throws a bunch on misleading (ignorable I think?) errors! How to suppress?
Context
We want blogs (this Figma page)
Also adds typegen.
Closes #30
What Changed?
How To Review
Lots of commits and some are overwritten later on so review file-wise:
src/pages/blogs/...
andsrc/components/blog/...
on frontendTesting
test
and all three blog components and navigated to/blogs/test
- all works.Notes
Typegen
If you run
yarn typegen
in the root directory, it now runs a script that creates typescript types from Strapi types and moves them to the frontend (web/src/types
) to use on the frontend like normal types 🎉. At the moment, the cp command only works in bash terminal so use that to runyarn typegen
.