Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP1universalStack: universal
htmlseometa-tagstemplates
Guard optional meta tags with an existence check on their content
Only emit a meta/SEO tag when the value backing it actually exists, rather than rendering empty tags.
PR: hegnar-web · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codehtml
| 1 | <meta name="description" content="{{ description }}"> |
Explanation (EN)
Objašnjenje (HR)
Good example
New codehtml
| 1 | {% if description %}<meta name="description" content="{{ description }}">{% endif %} |
Explanation (EN)
Objašnjenje (HR)