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

Improve callout shortcode. #31802

Merged
merged 2 commits into from
Oct 12, 2020
Merged

Improve callout shortcode. #31802

merged 2 commits into from
Oct 12, 2020

Conversation

XhmikosR
Copy link
Member

@XhmikosR XhmikosR commented Oct 1, 2020

Remove the markdownify call, and instead rely on Hugo's proper syntax; {{% callout %}} when we want to the content to be rendered.

This allows for stuff like:

{{% callout info %}}
##### I'm an info callout!

.foo {
  color: #fff;
}

{{< example >}}
<div class="alert alert-warning alert-dismissible fade show" role="alert">
  <strong>Holy guacamole!</strong> You should check in on some of those fields below.
  <button type="button" class="btn-close" data-dismiss="alert" aria-label="Close"></button>
</div>
{{< /example >}}
{{% /callout %}}

Preview: https://deploy-preview-31802--twbs-bootstrap.netlify.app/

Remove the `markdownify` call, and instead rely on Hugo's proper syntax; `{{% callout %}}` when we want to the content to be rendered.

This allows for stuff like:

{{% callout info %}}
##### I'm an info callout!

```css
.foo {
  color: #fff;
}
```

{{< example >}}
<div class="alert alert-warning alert-dismissible fade show" role="alert">
  <strong>Holy guacamole!</strong> You should check in on some of those fields below.
  <button type="button" class="btn-close" data-dismiss="alert" aria-label="Close"></button>
</div>
{{< /example >}}
{{% /callout %}}
@XhmikosR
Copy link
Member Author

XhmikosR commented Oct 1, 2020

@Johann-S @MartijnCuppens @mdo @ffoodd please try this; it seems to be the proper way AFAICT :)

@XhmikosR XhmikosR merged commit 5c69253 into main Oct 12, 2020
@XhmikosR XhmikosR deleted the main-xmr-docs-callout-shortcode branch October 12, 2020 06:06
@XhmikosR XhmikosR mentioned this pull request Oct 12, 2020
6 tasks
XhmikosR added a commit that referenced this pull request Oct 12, 2020
XhmikosR added a commit that referenced this pull request Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants