Skip to content
/ lmg-hugo Public

A collection of shortcodes and partials that I started while migrating my gamedev blog to Hugo.

Notifications You must be signed in to change notification settings

Stals/lmg-hugo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Useful Hugo Shortcodes & HTML

This is a collection of shortcodes and partials that I started while migrating my gamedev blog to Hugo.

Shortcodes Usage

You can find all the shortcodes in the shortcodes folder. Copy them to layouts/shortcodes folder and use depending on the shortcode itself. Or you can also add any of this reposity subfolders as submodules.

Text Highlight

Usage:

{{< text-highlight >}}
Your highlighted text goes here
{{< /text-highlight >}}

You can also use other highlight colors if you just pass "Crimson", "Cyan" or any other color names supported by modern browsers, or specify a full color code including transparency, like #dc143c26

{{< text-highlight color="#dc143c26">}}
Your highlighted text goes here
{{< /text-highlight >}}

Collapsible

This may not work for some older browser versions, see here.

Usage:

{{< collapsible summary="Click to Expand" >}}
Here goes something you want to be mostly hidden by default, but with ability to open it.
{{< /collapsible >}}

Use can even add other shortcodes inside the collapsible block

{{< collapsible summary="Code Example" >}}
{{< highlight "C#" >}}
// your code here
{{< /highlight >}}
{{< /collapsible >}}

Table of Contents

Usage: {{< table-of-contents >}}

About

A collection of shortcodes and partials that I started while migrating my gamedev blog to Hugo.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages