Created by: MartijnCuppens
This should be a little bit easier that creating a custom regex per case.
Usage in .scss
:
// scss-docs-start awesome-code
.my-awesome-code {
// The best CSS in the world
}
// scss-docs-end awesome-code
In the docs files:
{{< scss-docs name="awesome-code" file="scss/_variables.scss" >}}
I don't think the positive lookbehind syntax works in Hugo, so I replaced the comments in the end of the file, there are probably better ways to fix this (bump @XhmikosR)
TODO:
-
Check all occurrences of code snippets -
Strip !default
flags by default