Skip to content
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

Update Write a Blog Post by adding excerpt suggestion. #351

Open
1 task
Dhruvi16 opened this issue Jul 21, 2020 · 9 comments
Open
1 task

Update Write a Blog Post by adding excerpt suggestion. #351

Dhruvi16 opened this issue Jul 21, 2020 · 9 comments
Labels
📖 aspect: docs Concerns the documentation in the repository ✨ goal: improvement Improvement to an existing feature help wanted Open to participation from the community 🟩 priority: low Low priority and doesn't need to be rushed 🏁 status: ready for work Ready for work

Comments

@Dhruvi16
Copy link
Member

Dhruvi16 commented Jul 21, 2020

Problem

In the new CCOS website, excerpts are extracted from the blog. So for proper and meaningful excerpts, we can update Write a Blog Post (content/community/write-a-blog-post/contents.lr) with suggestions for adding excerpt content in the blog.

Additional context

This is how excerpts look -

image

Implementation

  • I would be interested in implementing this feature.
@kgodey kgodey added help wanted Open to participation from the community and removed awaiting triage labels Jul 21, 2020
@kgodey
Copy link
Member

kgodey commented Jul 21, 2020

Thanks for pointing this out, @Dhruvi16

@ritesh-pandey
Copy link
Contributor

ritesh-pandey commented Jul 23, 2020

How do we plan to extract excerpt?

  • Programmatically e.g. first few characters from post
  • A new excerpt field in every post

@Dhruvi16
Copy link
Member Author

Dhruvi16 commented Jul 23, 2020

Hey @ritesh-pandey! We have used Lektor's excerpt plugin and restricted it to the first 100 words of the first line of the body. Exactly this is how we are getting excerpt:

{{ post.body | excerpt | string | striptags() | truncate(100) }}

@dhruvkb dhruvkb added ✨ goal: improvement Improvement to an existing feature Hacktoberfest and removed enhancement labels Sep 20, 2020
@cc-open-source-bot cc-open-source-bot added the 🏷 status: label work required Needs proper labelling before it can be worked on label Dec 2, 2020
@noobkid2411

This comment was marked as outdated.

@JeffyDave

This comment was marked as outdated.

@kgodey

This comment was marked as outdated.

@possumbilities

This comment was marked as outdated.

@TimidRobot TimidRobot added 🚧 status: blocked Blocked & therefore, not ready for work and removed help wanted Open to participation from the community Hacktoberfest labels Oct 13, 2022
@Abdullahhh12

This comment was marked as outdated.

@TimidRobot TimidRobot moved this to Triage in TimidRobot Sep 10, 2024
@TimidRobot TimidRobot removed the 🚧 status: blocked Blocked & therefore, not ready for work label Sep 17, 2024
@TimidRobot TimidRobot added help wanted Open to participation from the community 🟩 priority: low Low priority and doesn't need to be rushed 🏁 status: ready for work Ready for work 📖 aspect: docs Concerns the documentation in the repository and removed 🏷 status: label work required Needs proper labelling before it can be worked on labels Sep 17, 2024
@TimidRobot TimidRobot moved this from Triage to Backlog in TimidRobot Sep 17, 2024
@Queen-codes
Copy link
Contributor

Hi @TimidRobot , I’ve started working on this, and here’s what I’ve discovered:

Before adding the excerpt suggestion to the page, we should introduce an excerpt field in the contents.lr file for authors to manually add their excerpt. The code logic can then be updated to check for this excerpt, and if it’s not present, it will automatically truncate the first 100 words of the post.

Would you prefer I create a new issue for adding the excerpt field and modifying the logic, and then update this once that issue is resolved? Or should I go ahead with updating the page by adding the suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 aspect: docs Concerns the documentation in the repository ✨ goal: improvement Improvement to an existing feature help wanted Open to participation from the community 🟩 priority: low Low priority and doesn't need to be rushed 🏁 status: ready for work Ready for work
Projects
Status: Backlog
Development

No branches or pull requests