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

Feat: starr posts to get readers attention #223

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

pitscher
Copy link
Contributor

What problem does this PR solve?

None.

Is this PR adding a new feature?

Indeed.
This PR will add the option to starr single posts. An author can set the optional config isStarred: true in a posts front matter. This will cause a little star icon to be rendered (for the post) in the list of posts.
An author can use this to get a readers attention.
The mentioned star will only be shown in the list of posts - nowhere else (to not overload the theme).

For the records
I set the isStarred: true in the front matter of the Markdown Syntax Guide en-us example post to showcase this new option.
It might be worth recreating the themes demo picture (used here: https://themes.gohugo.io/themes/hugo-blog-awesome/) to attract the attention of possible theme users. 🤓

Is this PR related to any issue or discussion?

This feature was discussed here: #222

PR Checklist

  • I have verified that the code works as described/as intended.
  • This change adds a social icon which has a permissive license to use it.
  • This change does not include any external library/resources.
  • This change does not include any unrelated scripts (e.g. bash and python scripts).
  • I have enabled maintainer edits for this PR.

If isStarred: true in a posts front matter, the star SVG will be rendered for this post in the list of posts.
…ult archetypes

If isStarred is not specified or set to false in a posts front matter, no star icon will appear.
…n Syntax Guide example site

To demo the new optional feature, the config isStarred was added to an example post which will be rendered as soon as someone uses the theme for the first time (because en-us is the default language).
Copy link

netlify bot commented Aug 27, 2024

Deploy Preview for hugo-blog-awesome ready!

Name Link
🔨 Latest commit 266fb95
🔍 Latest deploy log https://app.netlify.com/sites/hugo-blog-awesome/deploys/66ce17ad18cc1000084848da
😎 Deploy Preview https://deploy-preview-223--hugo-blog-awesome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

sonarcloud bot commented Aug 27, 2024

Copy link
Owner

@hugo-sid hugo-sid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pitscher for the feature.

@hugo-sid hugo-sid merged commit 48ffc30 into hugo-sid:main Aug 29, 2024
7 checks passed
@pitscher pitscher deleted the feat/starr-posts branch August 30, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants