mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
A theme for Hugo designed for documentation
archetypes | ||
images | ||
layouts | ||
static | ||
.gitignore | ||
LICENSE.md | ||
README.md | ||
theme.toml |
Hugo Learn Theme
This repository contains a theme for Hugo, based on great Grav Learn Theme.
Visit the theme documentation to see what is going on. It is actually built with this theme.
Installation
Navigate to your themes folder in your Hugo site and use the following commands:
$ cd themes
$ git clone https://github.com/matcornic/hugo-theme-learn.git
Main functionalities
- Handle two levels of documentation
- Tip/Note/Info and Warning boxes
- Resize images
- Preview of original image size
- Add shadow or border on images
- Automatic table of contents
- Create buttons (typically used to provide a link to a demo)
Search
To use the search
functionality, you just have to put a lunr
index which respects this format :
[
{
"uri": "/docs/01-start/index",
"title": "Get started",
"content": "\n\nGet started\n\nAll you need to know...\n",
"tags": ["start", "intro"]
},
...
]
into a static/json/search.json
file in your hugo project.
And set search = true
in your config.toml
To generate your lunr index, you can see this project https://github.com/gwleclerc/lunr-hugo which parse your markdown files and extract toml and yaml headers to create index with corresponding format.