base16
base 16 colour scheme for for hugo blog.
Built-in shortcodes
image
(prop required:src
; props optional:alt
,
position
(left is default | center | right),style
)- eg:
{{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}}
- eg:
figure
(same asimage
, plus few optional props:caption
,
captionPosition
(left | center is default | right),
captionStyle
- eg:
{{< figure src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" caption="Hello Friend!" captionPosition="right" captionStyle="color: red;" >}}
- eg:
Code highlighting
A custom syntax highlighting based on PrismJS. All you need to do is to wrap you
code like this:
```html
// your code here
```
How to start
You can download the theme manually by going to
butlerx/hugo-theme-base16 and
pasting it to themes/terminal
in your root directory.
You can also clone it directly to your Hugo folder:
git clone https://github.com/bulerx/hugo-theme-base16.git themes/terminal
If you don't want to make any radical changes, it's the best option, because you
can get new updates when they are available. You can also include it as a git
submodule:
git submodule add https://github.com/bulerx/hugo-theme-base16.git themes/terminal
How to configure
The theme doesn't require any advanced configuration. Just copy:
baseurl = "/"
languageCode = "en-us"
title = "Blog Title"
author = "Authors Name"
pygmentsCodeFences = true
theme = "base16"
paginate = 5
[outputs]
home = ["HTML", "RSS", "JSON"]
[params]
hero = "Base16"
message = "Sub Title message"
descriptions = "Blog description"
twitter = "twitter user"
to config.toml
file in your Hugo root directory and change params fields
Enable Search
To enable search add create the search.md
from the search archtype by running
hugo new --kind search search.md
. Then add JSON
to the output of home
in
config.toml
as
[outputs]
home = ["HTML", "RSS", "JSON"]
Post archetype
See the basic post
file params supported by the theme —
https://github.com/panr/hugo-theme-terminal/blob/master/archetypes/post.md