WARNING: This repo is no longer maintained. It's archived and read-only.
A minimal hugo theme made with bootstrap that focuses on content readability.
- Demo
- Minimum Hugo version
- Installation
- Updating
- Run example site
- Configuration
- Favicons
- Override
- Syntax highlighting
- Shortcodes
- Getting help
https://minimal-bootstrap-hugo-theme.netlify.com/
Hugo version 0.60.1
or higher is required. View the Hugo releases and download the binary for your OS.
From the root of your site:
git submodule add https://github.com/zwbetz-gh/minimal-bootstrap-hugo-theme.git themes/minimal-bootstrap-hugo-theme
From the root of your site:
git submodule update --remote --merge
From the root of themes/minimal-bootstrap-hugo-theme/exampleSite
:
hugo server --themesDir ../..
Copy the config.toml
from the exampleSite
, then edit as desired.
Upload your image to RealFaviconGenerator then copy-paste the generated favicon files under static
.
As an example, let's say you didn't like the default homepage, and wanted to design one of your own. To do this, you would:
- Copy file
YOUR_SITE/themes/minimal-bootstrap-hugo-theme/layouts/index.html
- Paste that file to
YOUR_SITE/layouts/index.html
- Edit
index.html
as desired
You can change the position, layout, color palette, "Learn more" link, compliance type, and custom text of the cookie consent popup. To do this, you would:
- Copy file
YOUR_SITE/themes/minimal-bootstrap-hugo-theme/layouts/partials/cookie-consent.html
- Paste that file to
YOUR_SITE/layouts/partials/cookie-consent.html
- Complete the cookie consent wizard
- Paste the generated code from the wizard into
cookie-consent.html
Hugo has built-in syntax highlighting, provided by Chroma. It is currently enabled in the config.toml
file from the exampleSite
.
Checkout the Chroma style gallery and choose the style you like.
This will format your blockquotes nicely. To use it, put the quote within the shortcode. The author
argument is optional.
{{< blockquote author="Laura Ingalls" >}}
I am beginning to learn that it is the sweet, **simple** things of life which are the real ones after all.
{{< /blockquote >}}
This will insert an image into your content by absolute path. To use it, pass the pathURL
of your image.
These arguments are optional: alt
, class
, style
.
{{< imgAbs
pathURL="img/some-img.png"
alt="Some description"
class="some-class"
style="some-style" >}}
This will insert an image into your content by relative path. To use it, pass the pathURL
of your image.
These arguments are optional: alt
, class
, style
.
{{< imgRel
pathURL="img/some-img.png"
alt="Some description"
class="some-class"
style="some-style" >}}
This will process an image from a page bundle, then provide a link to the original image. To use it, pass the image name, command, and command options.
The command
argument will be one of: Resize
, Fit
, Fill
. For a deeper dive see the hugo docs for image processing.
These arguments are optional: alt
, class
, style
.
The below example resizes an image to 800px width, while keeping the aspect ratio.
{{< imgProc
img="some-img.png"
command="Resize"
options="800x"
alt="Some description"
class="some-class"
style="some-style" >}}
This will embed a toot in an iframe
.
These arguments are optional: width
, height
.
{{% mastodon
status="https://mastodon.social/@kevingimbel/100700713283716694"
width="1000" height="500" %}}
This will insert a link to a file by relative path into your content.
To use it, pass the pathURL
of your file.
The arguments class
and style
are optional.
{{< fileRel
pathURL="files/file.pdf"
name="filename"
class="someclass"
style="somestyle" >}},
If you run into an issue that isn't answered by this documentation or the exampleSite
, then visit the Hugo forum. The folks there are helpful and friendly. Before asking your question, be sure to read the requesting help guidelines.