Darklane includes several custom shortcodes to enhance your content beyond standard Markdown.
This post demonstrates the alert, highlight, details, img, tab, tabgroup, table, and youtube shortcodes.
Alert Shortcodes
Alerts come in several types for different purposes:
You can also create unlabeled alerts:
alert types:
- info
- note
- warning
- success
- error
- important
- (empty) - no label
Highlight Shortcodes
Highlights are similar to alerts but with different styling:
highlight types
- info
- note
- warning
- success
- error
- important
Details (Collapsible Sections)
Use details for optional information that readers can expand:
Click to see technical details
Here’s some detailed technical information that most readers might not need. By hiding it in a collapsible section, you keep the main content focused while still providing depth for interested readers.
You can include any Markdown content here:
- Lists
- Code blocks
- Formatted text
Configuration example
theme: darklane
params:
author: Your Name
description: Your site description
Tab Groups
Tab groups let you show related content in different formats:
def hello():
print("Hello, world!")
function hello() {
console.log("Hello, world!");
}
package main
import "fmt"
func main() {
fmt.Println("Hello, world!")
}
Images with Captions
The image shortcode provides consistent styling and optional captions:
{{< img src="images/photo.jpg" caption="A beautiful landscape" >}}
You can also control the width:
{{< img src="images/photo.jpg" width="600" caption="Smaller image" >}}
Colored Tables
Use the table shortcode to add a little color to your table headers:
| Language | Type | First Release |
|---|---|---|
| Python | Interpreted | 1991 |
| JavaScript | Interpreted | 1995 |
| Go | Compiled | 2009 |
| Rust | Compiled | 2010 |
Colors
infonotewarningsuccesserrorimportant
YouTube Embeds
Embed YouTube videos easily:
{{< youtube "VIDEO_ID" title="Video Title" >}}
These shortcodes help you create professional, informative content without writing custom HTML.
