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(shortcodes): support body admonitions #423

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

welpo
Copy link
Owner

@welpo welpo commented Nov 7, 2024

Summary

Add support for using admonition shortcodes with a content body:

{% admonition(type="danger", icon="tip", title="An important tip") %}
Stay hydrated~

This method is particularly useful for longer content or multiple paragraphs.
{% end %}

This allows for more natural writing of longer content blocks while maintaining backward compatibility with the existing parameter-based syntax.

Changes

  • Added support for body content in admonition shortcodes
  • Updated documentation in all languages to show both usage methods
  • Maintained backward compatibility with existing parameter-based syntax

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
    • Updated "Mastering tabi" post in Spanish
    • Updated "Mastering tabi" post in Catalan

@welpo welpo added the enhancement New feature or request label Nov 7, 2024
Copy link

netlify bot commented Nov 7, 2024

Deploy Preview for tabi-demo ready!

Name Link
🔨 Latest commit fd62e89
🔍 Latest deploy log https://app.netlify.com/sites/tabi-demo/deploys/672cc136439c93000774d7ca
😎 Deploy Preview https://deploy-preview-423--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 force-pushed the feat/admonition-body-support branch from ec549d3 to fd62e89 Compare November 7, 2024 13:31
@welpo welpo merged commit e8381d0 into main Nov 7, 2024
8 checks passed
@welpo welpo deleted the feat/admonition-body-support branch November 7, 2024 13:33
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