McShelby / hugo-theme-relearn

A theme for Hugo designed for documentation
https://mcshelby.github.io/hugo-theme-relearn/
MIT License
426 stars 186 forks source link

shortcodes: make style parameter configurable #905

Closed McShelby closed 1 month ago

McShelby commented 2 months ago

Currently the theme only supports a few styles https://mcshelby.github.io/hugo-theme-relearn/shortcodes/button/index.html#style

The amount of styles was expanded in 6.2.0 to make it compatible to GitHub styled alerts.

With 6.3.0 we have introduced processing of Obsidian styled alerts.

While the technical aspect is implemented into the theme, the styles are not simply because it doesn't scale well. Now users are able to use their own styles in Markdown - not just the predefined shipped with the theme.

Aim of this issue is to make styles configurable for the user, assigning a title, icon and color to it.

This will move the the CSS variables for style colors into the hugo.toml and will cause the page to look differently if the user has defined its own colors for a given style. Because of this, I consider this a change better to be released in a major version.

McShelby commented 1 month ago

Duplicate of #913