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(comments): allow page override of global system #216

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

welpo
Copy link
Owner

@welpo welpo commented Oct 27, 2023

Summary

This pull request adds the ability to override global settings for comment systems at the page-level. Additionally, it refactors the existing code to make it more concise and maintainable.

Changes

  • Page-specific overrides: Adds the capability to disable comment systems on individual pages, overriding global settings. Useful for non-articles like "about", "privacy policy", etc. For example, if you have isso enabled globally, you can disable it for a specific page with isso = false.

  • Code refactoring: Simplifies the existing logic by using loops and making the code more DRY (Don't Repeat Yourself).

  • Documentation: This feature is documented in the Mastering tabi post.

Technical details

The Tera template code for enabling comment systems has been refactored to iterate over an array of systems. This makes it easier to manage and extend.

Also refactors the logic to check if the systems are enabled
to be more maintainble.
@welpo welpo added the enhancement New feature or request label Oct 27, 2023
@welpo welpo merged commit de28c7f into main Oct 27, 2023
1 check passed
@welpo welpo deleted the feat/disable-comments-per-page branch October 27, 2023 00:04
Smtbook pushed a commit to Smtbook/zola-theme-tabi that referenced this pull request Feb 29, 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