diff options
Diffstat (limited to 'layouts/shortcodes/codecaption.html')
-rw-r--r-- | layouts/shortcodes/codecaption.html | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/layouts/shortcodes/codecaption.html b/layouts/shortcodes/codecaption.html index 6048378..52b7a34 100644 --- a/layouts/shortcodes/codecaption.html +++ b/layouts/shortcodes/codecaption.html @@ -1,11 +1,18 @@ -<!-- codecaption short code - basically this is normal highlighted code with caption on top - example usage (Hugo seems to ignore stuff in this): +<!-- Author: Parsia Hakimian https://github.com/parsiya/Hugo-Shortcodes --> - { { < codecaption lang="language e.g. python/csharp" title="captiontitle" > } } +<!-- codecaption short code - basically this is normal highlighted code with caption on top. - code to be highlighted + Usage: - { { < /codecaption > } } --> + {{< codecaption lang="language e.g. python/csharp" title="captiontitle" >}} + package main + + import "fmt" + + func main() { + fmt.Println("Hello World!") + } + {{< /codecaption >}} --> <figure class="code"> <figcaption> @@ -14,4 +21,4 @@ <div class="codewrapper"> {{ highlight (trim .Inner "\n\r") (.Get "lang") "linenos=true" }} </div> -</figure> +</figure>
\ No newline at end of file |