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

Add callout shortcode #1260

Merged
merged 9 commits into from
May 17, 2024
Merged

Add callout shortcode #1260

merged 9 commits into from
May 17, 2024

Conversation

viren-nadkarni
Copy link
Member

@viren-nadkarni viren-nadkarni commented May 14, 2024

Background

#452 and #625 made an attempt to make alert boxes consistent with respect to title, colour and styling. However, there's still confusion around its use, and there are instances of colours being mixed with different levels or titles.

Changes

This PR introduces a new callout shortcode to address this.

{{< callout "tip" >}}                                         
If you get so and so error, you can do that.                                                                      
{{< /alert >}}

This shortcode supports three severity levels:

  • warning For actions that are destructive/irreversible, have security or other damaging implications

    image

  • tip For hints and tips

    image

  • note (default) Used for notices, informative points or everything else.

    image

The titles of these alert boxes are determined based on severity levels. If any other argument is passed for level or it is omitted, the default level is used.

I'm hoping these three levels should be sufficient for all severity levels. If required, adding new levels will be trivial.

@viren-nadkarni viren-nadkarni self-assigned this May 14, 2024
Copy link

github-actions bot commented May 14, 2024

🎊 PR Preview has been successfully built and deployed to https://localstack-docs-preview-pr-1260.surge.sh 🎊

@viren-nadkarni viren-nadkarni changed the title Improvements Add callout shortcode May 14, 2024
@HarshCasper HarshCasper merged commit 52d305d into main May 17, 2024
3 checks passed
@HarshCasper HarshCasper deleted the improvements branch May 17, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants