You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is need to implement the ability to mark blog posts as "pinned." Pinned posts should always appear at the top of the list on the homepage and within their respective categories.
Tasks:
Update Post Class:
Add a isPinned property to the Post class.
Implement a isPinned() method to check if a post is pinned.
Modify Post Creation Logic:
Update the createFromFile method in the Post class to detect and assign the isPinned property based on filenames that start with +.
Sorting Logic:
Modify sorting logic within the PostCollection class to ensure pinned posts always appear at the top of any list.
Adjust Controllers:
Ensure that methods fetching the latest posts (like for /latest/) exclude pinned posts from being selected as the "latest" post.
UI/UX Consideration:
Consider how pinned posts will be visually differentiated from non-pinned posts on the frontend display.
Acceptance Criteria:
A post is considered pinned if its filename begins with a +.
Pinned posts always appear at the top of their respective lists.
The logic for fetching the latest post (e.g. for /latest/) should not include pinned posts in determining the latest item.
The text was updated successfully, but these errors were encountered:
There is need to implement the ability to mark blog posts as "pinned." Pinned posts should always appear at the top of the list on the homepage and within their respective categories.
Tasks:
Update Post Class:
isPinned
property to thePost
class.isPinned()
method to check if a post is pinned.Modify Post Creation Logic:
createFromFile
method in thePost
class to detect and assign theisPinned
property based on filenames that start with+
.Sorting Logic:
PostCollection
class to ensure pinned posts always appear at the top of any list.Adjust Controllers:
/latest/
) exclude pinned posts from being selected as the "latest" post.UI/UX Consideration:
Acceptance Criteria:
+
./latest/
) should not include pinned posts in determining the latest item.The text was updated successfully, but these errors were encountered: