在 Markdown 中引用 bootstrap 组件

reference bootstrap component in markdown

我们有一个包含 Liquid、Kramdown 和 Bootstrap 的 Jekyll 站点。我想开始在 Markdown 页面中使用 Bootstrap 导航标签。 https://getbootstrap.com/docs/4.0/components/navs/#tabs Also discussed here https://getbootstrap.com/docs/4.0/components/navs/#javascript-behavior

问题是这会在我们的 Markdown 源中引入一堆 HTML 并降低它们的可读性。

过去,当我们遇到这种情况时,我们已经能够经常使用[link](url){:target="_blank"}这样的标签。这似乎是由于 Kramdown。我也明白可以以类似的方式引用 CSS,例如 {:.CSSClass}。同样,由于 Kramdown。

我的问题是,有没有办法对来自 Bootstrap 的这些导航执行类似的操作?我希望能够做这样的事情:

{{< tabs >}}
{{% tab name="Choice A" %}}
Contents of Choice A tab
{{% /tab %}}
{{% tab name="Choice B" %}}
Contents of Choice B tab
{{% /tab %}}
{{< /tabs >}}

但这是我在 Hugo 网站上看到的。

你可以像这样使用 include:

{% include tabstart.html title="choice a" %}

Content of your tab

{% include tabend.html %}