How to install it as a module for a different theme and use one feature. #635
-
I am using the https://mcshelby.github.io/hugo-theme-relearn/shortcodes/button/index.html Basically enable the button shortcode in the The screenshot shows the current directory structure and parts that are relevant are circled in red. <!-- foo.md -->
{{% button href="https://gohugo.io/" style="blue" %}}Get Hugo{{% /button %}}
{{% button href="https://gohugo.io/" style="green" %}}Get Hugo{{% /button %}}
{{% button href="https://gohugo.io/" style="grey" %}}Get Hugo{{% /button %}}
{{% button href="https://gohugo.io/" style="orange" %}}Get Hugo{{% /button %}}
{{% button href="https://gohugo.io/" style="red" %}}Get Hugo{{% /button %}} This is the bit of code I am trying to enable in my markdown. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sorry, but techically I can't help you here, as I don't have experience with this. The official Hugo forum may help you here with the general task of making the theme (and therefore the shortcodes) available in your project. Besides of that general task, I doubt that this will end in a satisfying result as the themes shortcodes are not meant to be used outside of the themes environment. The CSS to style the buttons is not modularized and would make it necessary to include all CSS styles of the theme. This most likely will interfere with your existing styles and end up in a visual mess. (Not mentioning the support for different color variants of the Relearn theme) The best would probably be to copy over just the button shortcode into your theme or project and style it by CSS to your liking. |
Beta Was this translation helpful? Give feedback.
Sorry, but techically I can't help you here, as I don't have experience with this. The official Hugo forum may help you here with the general task of making the theme (and therefore the shortcodes) available in your project.
Besides of that general task, I doubt that this will end in a satisfying result as the themes shortcodes are not meant to be used outside of the themes environment. The CSS to style the buttons is not modularized and would make it necessary to include all CSS styles of the theme. This most likely will interfere with your existing styles and end up in a visual mess. (Not mentioning the support for different color variants of the Relearn theme)
The best would probably b…