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

📝 docs: clarify instructions for listing recent posts #418

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

welpo
Copy link
Owner

@welpo welpo commented Oct 20, 2024

Summary

Updated documentation to clarify instructions for listing recent posts on the main page, aiming to avoid confusion regarding the use of paginate_by and section_path. Changes were made to the README and the "Mastering tabi" post.

Adds warning when conflicting settings are set.

Related issue

The lack of clarity in the docs was evidenced in #417.

Changes

  • Documentation:

    • Updated README and "Mastering tabi" post with clearer instructions for listing recent posts.
    • Separated setup instructions into two distinct options: root path (/) and subdirectory (e.g., /blog) configurations.
  • New warning:

    • Implemented a dynamic warning message on the main page for conflicting configurations.
    • Warning appears when paginate_by is set without posts, but section_path contains posts.
    • Provides a clear explanation and solution for the conflict.

Screenshots

Warning message that appears on the main page when a conflicting configuration is detected:

warning

This warning is displayed when:

  1. Both paginate_by and section_path are set in _index.md.
  2. There are no posts to paginate in the current section (paginate_by is ineffective).
  3. Posts are available in the section specified by section_path.

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

Copy link

netlify bot commented Oct 20, 2024

Deploy Preview for tabi-demo ready!

Name Link
🔨 Latest commit d08b533
🔍 Latest deploy log https://app.netlify.com/sites/tabi-demo/deploys/67156e9c5ff2ca0008c3acd3
😎 Deploy Preview https://deploy-preview-418--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 added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 20, 2024
- Update README with clearer instructions for setting up post listings
- Align documentation in "Mastering tabi" post with README
- Improve explanations for root and subdirectory post serving options
- Add warnings about mutually exclusive settings
- Add warning when paginator is set without pages, but extra section has pages.
@welpo welpo force-pushed the docs/clarify-post-listing-options branch from 3e62e66 to d08b533 Compare October 20, 2024 20:56
@welpo welpo merged commit 2382bb2 into main Oct 20, 2024
7 checks passed
@welpo welpo deleted the docs/clarify-post-listing-options branch October 20, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant