-
Notifications
You must be signed in to change notification settings - Fork 0
WIP: The blog #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
WIP: The blog #69
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add altText for imgs, I realize this is not a blog specific issue!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! but probably not a priority for this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair, I will open a ticket!
Closes #70, #42
The Blog engine.
Also included here