fix: excerpt now generated from body if not provided#280
Merged
NiallJoeMaher merged 2 commits intocodu-code:developfrom May 13, 2023
JohnAllenTech:fix/excerpt-not-generated-when-creating-article
Merged
fix: excerpt now generated from body if not provided#280NiallJoeMaher merged 2 commits intocodu-code:developfrom JohnAllenTech:fix/excerpt-not-generated-when-creating-article
NiallJoeMaher merged 2 commits intocodu-code:developfrom
JohnAllenTech:fix/excerpt-not-generated-when-creating-article
Conversation
|
Someone is attempting to deploy a commit to the Codú Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
|
I'll review this a little later! Thanks for the help 🥇 |
NiallJoeMaher
approved these changes
May 13, 2023
Contributor
NiallJoeMaher
left a comment
There was a problem hiding this comment.
This should work perfectly! Cheers
NiallJoeMaher
pushed a commit
that referenced
this pull request
Oct 6, 2023
* fix: excerpt now generated from body if not provided
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Codu Pull Request 💻
Pull Request details:
Closes #259
Previously if the except text box was left blank the article would have no excerpt saved in the DB.
If the exceprt is not provided, This change will remove the markdown from the body and set the first 156 chars of the article as the default.
Note: I didnt populate the excerpt text box by default after clicking "Publish". This is to provide the user with the opportunity to write their own excerpt without having to delete the default one. Maybe this should be changed?
Any breaking changes
None
Associated Screenshots:
New article being written.
After clicking publish. Note no excerpt in text box
After clicking Publish again and navigating to Articles page. Note default excerpt generated
Second article being created
Excerpt populated
After clicking Publish again and navigating to Articles page. Note actual excerpt provided by user is used instead of default