Introduction
Uwe Uwe (u²) is a minimalist theme that helps you build fully responsive documentation websites for small projects.
It will create a very simple website by merging all your markdown and/or html pages to one single index.html
page.
No other kinds of webpages or files in other output formats are created.
Please note
The Uwe Uwe (u²) theme is most likely not for you if you need a website with a more sophisticated structure.Features
Besides the default markdown features and shortcodes that are provided by Hugo out-of-the-box, the Uwe Uwe (u²) theme ships with the following additional features:
- Custom shortcodes for:
- Info, warning and danger notifications (can also be displayed as sidenotes)
- Tabs (can also be used for code examples)
- Footnotes which are displayed as sidenotes or as modals on screens with a smaller horizontal screen resolution.
- Optional syntax highlighting via Prism.js 1
- Configurable platform links with three visualization modes (as icon, as text and icon, as text only)
- Configurable logo, short description and table of contents
Prerequisites
You need at least version 0.71.0
of Hugo to use the Uwe Uwe (u²) theme due to the fact that it is using
Markdown Render Hooks
to alter the HTML output of images, links and headings.
Hugo latest release
https://github.com/gohugoio/hugo/releases/latestInstallation
Independently of the installation methods described below you have to specify in the configuration file of your website-project that you want to built your site using the Uwe Uwe (u²) theme.
{
baseURL: "<Base Url of your website>",
languageCode: "<Language of your website >",
title: "<Title of your website >",
theme: "uwe-uwe",
...
}
Manual download
You can download
the latest version of the Uwe Uwe (u²) theme
directly to the /themes
directory of your website-project.
Git submodule
Should you use
Git
to track changes within your website-project you can also add the Uwe Uwe (u²) theme as a git submodule by cloning it directly to the /themes
directory of your website-project using the following command:
git submodule add https://github.com/mbrt-yeah/uwe-uwe-hugo.git themes/uwe-uwe
Hugo Configuration
The recommended Hugo configuration when you are using the Uwe Uwe (u²) theme.
Disable creation of contents
In order not to clutter the build-result with unnecessary files you can disable the creation of section, taxonomy, term and RSS contents using the disableKinds option in your project configuration file.
Markup related configurations
For markdown in notifications and sidenotes to be correctly displayed you have to set the
markup.goldmark.renderer.unsafe
flag to true
.
Furthermore, it has been found that the igor
style of
Hugo’s internal syntax highlighter
works best with the design of the Uwe Uwe (u²) theme.
Theme Configuration
All custom configuration parameters have to be set in the params.uweuwe
section of the configuration file of your website-project.
{
baseURL: "<Base Url of your website>",
languageCode: "<Language of your website >",
title: "<Title of your website >",
theme: "uwe-uwe",
...
params: {
uweuwe: {
...
}
}
}
Metadata
You can specify different information that serve as metadata for your website.
Logo
The logo is displayed at the top of the website.
If you don’t want to display the logo just set the value of the logo.display
parameter to false
.
Short Description
The short description is displayed below the title of your website.
If you don’t want to display the short description just set the value of the shortDesc.display
parameter to false
.
{
params: {
uweuwe: {
shortDesc: {
display: true,
value: "<WEBSITE_SHORT_DESCRIPTION>"
}
}
}
}
Platform Links
The platform links are displayed below the short description of the website.
You can choose between the following display modes:
- as-text: Displays a textual link to the specified platforms.
- as-icons: Displays only an iconized link to the specified platforms.
- as-icons-and-text: Displays an iconized link to the specified platforms with a text below.
If you don’t want to display the platform links just set the value of the platformLinks.display
parameter to false
.
You can specify an unlimited number of platform links simply by adding entries to the platformLinks.platforms
array/set. Every entry is composed of the following fields:
- name: Name of the platform
- display: Show or hide the platform link
- iconSrc: Path to the platform icon
- target: Target of the platform link
- text: Text of the platform link
- title: Title of the platformn link
{
params: {
uweuwe: {
platformLinks: {
display: true,
displayMode: "as-icons-and-text"
platforms: [
{
name: "<PLAFTORM_NAME>",
display: true,
iconSrc: "<PATH_TO_PLATFORM_ICON>",
target: "<LINK_TARGET>",
text: "<LINK_TEXT>",
title: "<LINK_TITLE>"
},
...
]
}
}
}
}
Table of Contents
title
attribute in the front-matter of your content pages.
The table of contents is displayed below the platform links of your website.
If you don’t want to display the table of contents just set the value of the toc.display
parameter to false
.
Markdown Render Hooks
Per default the Uwe Uwe (u²) theme uses Markdown Render Hooks to alter the HTML output of images, links and headings.
However, you can deactivate their usage in the following way:
{
params: {
uweuwe: {
renderHooks: {
image: {
use: false,
},
link: {
use: false,
},
heading: {
use: false,
}
}
}
}
}
Syntax Highlighting via Prism.js
Instead of Hugo’s custom syntax highlighter you can also choose the Javascript-based syntax highlighter Prism.js .
Please note that activating the Prism.js based syntax higlighting will cause the loading of additional Javascript and CSS files.
License
The Uwe Uwe (u²) theme is licensed under the MIT License.