Skip to content

Improve callout shortcode.#31802

Merged
XhmikosR merged 2 commits into
mainfrom
main-xmr-docs-callout-shortcode
Oct 12, 2020
Merged

Improve callout shortcode.#31802
XhmikosR merged 2 commits into
mainfrom
main-xmr-docs-callout-shortcode

Conversation

@XhmikosR

@XhmikosR XhmikosR commented Oct 1, 2020

Copy link
Copy Markdown
Member

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

XhmikosR commented Oct 1, 2020

Copy link
Copy Markdown
Member Author

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

@XhmikosR XhmikosR marked this pull request as ready for review October 5, 2020 18:10
@XhmikosR XhmikosR requested review from ffoodd and mdo October 5, 2020 18:12
@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