blob: d3277eddb53f71e637c00a2a84a6c8f14ea5e472 (
plain) (
tree)
|
|
---
title: Code snippets
excerpt: >
Easily include code snippets in your posts.
snippets_root_directory: snippets
snippets_language: c++
snippets:
hello:
- hello.hpp
- hello.cpp
world:
- world.hpp
- world.cpp
---
It's pretty simple, just use the corresponding include:
{% include snippets/section.html section_id='hello' %}
This is another set of snippets:
{% include snippets/section.html section_id='world' %}
You can insert a code snippet using the regular Markdown syntax without any
highlighting:
```
#!/usr/bin/env bash
set -o errexit -o nounset -o pipefail
main() {
echo "Hello, world!"
}
main
```
Also, some inline code: `./test.sh`!
|