Conversation
✅ Deploy Preview for cookiewolf ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| @@ -0,0 +1,204 @@ | |||
| /* | |||
There was a problem hiding this comment.
It might make sense to use this package that converts markdown that we used in nextdoor nature instead of this script.
- https://www.npmjs.com/package/markdown-to-json
- https://github.com/wildlifetrusts/nextdoornature/blob/main/package.json#L10
My thinking is that it's more generic and we don't have the conversion tied to our front matter contents , it already has it's own tests.
We can also move more logic into Elm, like slug formatting.
There was a problem hiding this comment.
Hmmm I have given this some thought.
- the project you linked to is 6 years old and can we trust the dependencies are mawlare free?
- this written script is already done and works (and has zero dependencies)
- it's very generic. this script validates the fields are present and of the correct format. it also sorts the posts by publish date. it also generates the correct json, so it would be more work to move to the suggested package.
- one problem with moving things into elm is that elm has poor error feedback for doing batch jobs like this.
- we can build on this script as needed like moving case studies over to it, or having blog posts categorised by keywords
There was a problem hiding this comment.
All reasonable points, I always feel a little uneasy around parsing raw strings but it's not a blocker for me!
| { title : String | ||
| , description : String | ||
| , url : Maybe String | ||
| , imageSrc : Maybe String |
There was a problem hiding this comment.
add altText for imgs, I realize this is not a blog specific issue!
There was a problem hiding this comment.
Good catch! but probably not a priority for this PR?
Closes #70, #42
The Blog engine.
Also included here