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: allow pinned posts with pagination #428

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

welpo
Copy link
Owner

@welpo welpo commented Nov 13, 2024

Summary

Adds support for pinned posts when using pagination (paginate_by). Previously, pinned posts only worked when using section_path.

Also restricts pinned posts to appear only on root pages (e.g., /, /es/, /fr/).

Related issue

Should've probably been added in #424.

Changes

  • Handle pinned posts with pagination
    • Show pinned posts only on page 1
  • Restricted pinned posts to root pages only (language-aware)
  • Added clear documentation about pinned posts behavior with pagination

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have verified the accessibility of my changes
  • I have tested all possible scenarios for this change
  • I have updated theme.toml with a sane default for the feature
  • I have made corresponding changes to the documentation:
    • Updated config.toml comments
    • Updated theme.toml comments
    • Updated "Mastering tabi" post in English
    • (Optional) Updated "Mastering tabi" post in Spanish
    • (Optional) Updated "Mastering tabi" post in Catalan

Additionally, it ensures pinned posts are only shown in root paths, not in blog/ or similar.

Should've probably be done in #424
@welpo welpo added the enhancement New feature or request label Nov 13, 2024
Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for tabi-demo ready!

Name Link
🔨 Latest commit 1956d4b
🔍 Latest deploy log https://app.netlify.com/sites/tabi-demo/deploys/6735349c7429320008a6386f
😎 Deploy Preview https://deploy-preview-428--tabi-demo.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.

@welpo welpo merged commit d7da6fe into main Nov 13, 2024
8 checks passed
@welpo welpo deleted the feat/pinned-posts-pagination branch November 13, 2024 23:24
@welpo welpo changed the title ✨ feat: allow pinned post with pagination ✨ feat: allow pinned posts with pagination Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant