mirror of
https://github.com/pawroman/zola-theme-terminimal.git
synced 2025-01-08 03:31:05 +01:00
Add mastodon support
This commit is contained in:
parent
c620187811
commit
3abae6b153
59
README.md
59
README.md
|
@ -1,3 +1,4 @@
|
||||||
|
<!-- omit from toc -->
|
||||||
# Terminimal
|
# Terminimal
|
||||||
|
|
||||||
[![Build Status](https://github.com/pawroman/zola-theme-terminimal/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/pawroman/zola-theme-terminimal/actions/workflows/pages/pages-build-deployment)
|
[![Build Status](https://github.com/pawroman/zola-theme-terminimal/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/pawroman/zola-theme-terminimal/actions/workflows/pages/pages-build-deployment)
|
||||||
|
@ -10,6 +11,7 @@ https://pawroman.github.io/zola-theme-terminimal/
|
||||||
|
|
||||||
Tested with Zola v0.17.2. Please note that earlier versions might not work because of breaking changes across Zola versions.
|
Tested with Zola v0.17.2. Please note that earlier versions might not work because of breaking changes across Zola versions.
|
||||||
|
|
||||||
|
<!-- omit from toc -->
|
||||||
#### Fork disclaimer
|
#### Fork disclaimer
|
||||||
|
|
||||||
This theme is a fork (not a port) of "Terminal" Hugo theme
|
This theme is a fork (not a port) of "Terminal" Hugo theme
|
||||||
|
@ -21,6 +23,37 @@ Many thanks for that outstanding original theme, Radek!
|
||||||
For more information about this fork and the differences to the original theme, please see:
|
For more information about this fork and the differences to the original theme, please see:
|
||||||
[Changes compared to the original theme](#changes-compared-to-the-original-theme) below.
|
[Changes compared to the original theme](#changes-compared-to-the-original-theme) below.
|
||||||
|
|
||||||
|
<!-- omit from toc -->
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
- [Versioning](#versioning)
|
||||||
|
- [How to start](#how-to-start)
|
||||||
|
- [Shortcodes](#shortcodes)
|
||||||
|
- [`image`](#image)
|
||||||
|
- [`figure`](#figure)
|
||||||
|
- [Features](#features)
|
||||||
|
- [OpenGraph](#opengraph)
|
||||||
|
- [Mastodon](#mastodon)
|
||||||
|
- [Configuration](#configuration)
|
||||||
|
- [Only show the post's description](#only-show-the-posts-description)
|
||||||
|
- [Colors](#colors)
|
||||||
|
- [Logo text and link](#logo-text-and-link)
|
||||||
|
- [Author and copyright](#author-and-copyright)
|
||||||
|
- [Menu](#menu)
|
||||||
|
- [Tags](#tags)
|
||||||
|
- [Pagination](#pagination)
|
||||||
|
- [Language code](#language-code)
|
||||||
|
- [Hack font subset](#hack-font-subset)
|
||||||
|
- [Favicon](#favicon)
|
||||||
|
- [Page titles](#page-titles)
|
||||||
|
- [Extending](#extending)
|
||||||
|
- [How to contribute](#how-to-contribute)
|
||||||
|
- [Changes compared to the original theme](#changes-compared-to-the-original-theme)
|
||||||
|
- [New features](#new-features)
|
||||||
|
- [Features retained from the original](#features-retained-from-the-original)
|
||||||
|
- [License](#license)
|
||||||
|
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
This theme used to be non-versioned, e.g. you'd pull the master branch, and occasionally new features or fixes would
|
This theme used to be non-versioned, e.g. you'd pull the master branch, and occasionally new features or fixes would
|
||||||
|
@ -81,7 +114,7 @@ Example:
|
||||||
{{ image(src="/img/hello.png", alt="Hello Friend",
|
{{ image(src="/img/hello.png", alt="Hello Friend",
|
||||||
position="left", style="border-radius: 8px;") }}
|
position="left", style="border-radius: 8px;") }}
|
||||||
```
|
```
|
||||||
|
|
||||||
### `figure`
|
### `figure`
|
||||||
|
|
||||||
Same as `image`, but with a few extra optional arguments:
|
Same as `image`, but with a few extra optional arguments:
|
||||||
|
@ -101,7 +134,9 @@ Example:
|
||||||
caption_style="font-style: italic;") }}
|
caption_style="font-style: italic;") }}
|
||||||
```
|
```
|
||||||
|
|
||||||
## OpenGraph
|
## Features
|
||||||
|
|
||||||
|
### OpenGraph
|
||||||
|
|
||||||
To add an image to a post, set the `og_image` extra option to the desired image
|
To add an image to a post, set the `og_image` extra option to the desired image
|
||||||
in the same directory of the markdown file:
|
in the same directory of the markdown file:
|
||||||
|
@ -119,6 +154,16 @@ Additionally, for the section pages and for posts to have a fallback image, add
|
||||||
default_og_image = "static/ocean.jpg"
|
default_og_image = "static/ocean.jpg"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Mastodon
|
||||||
|
|
||||||
|
To enable [Mastodon verification](https://docs.joinmastodon.org/user/profile/#verification), add
|
||||||
|
the following to your `config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[extra]
|
||||||
|
mastodon_url = "https://hachyderm.io/@opeik"
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Only show the post's description
|
### Only show the post's description
|
||||||
|
@ -187,7 +232,7 @@ You can set the footer's copyright author name like this:
|
||||||
# copyright text. Apart from author, it will
|
# copyright text. Apart from author, it will
|
||||||
# contain current year and a link to the theme.
|
# contain current year and a link to the theme.
|
||||||
author = "My Name"
|
author = "My Name"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you don't like the default copyright text,
|
If you don't like the default copyright text,
|
||||||
you can set it to completely custom HTML:
|
you can set it to completely custom HTML:
|
||||||
|
@ -216,13 +261,13 @@ menu_items = [
|
||||||
# each of these is optional, name and url are required
|
# each of these is optional, name and url are required
|
||||||
# $BASE_URL is going to be substituted by base_url from configuration
|
# $BASE_URL is going to be substituted by base_url from configuration
|
||||||
{name = "blog", url = "$BASE_URL"},
|
{name = "blog", url = "$BASE_URL"},
|
||||||
|
|
||||||
# tags should only be enabled if you have "tags" taxonomy
|
# tags should only be enabled if you have "tags" taxonomy
|
||||||
# see documentation below for more details
|
# see documentation below for more details
|
||||||
{name = "tags", url = "$BASE_URL/tags"},
|
{name = "tags", url = "$BASE_URL/tags"},
|
||||||
{name = "archive", url = "$BASE_URL/archive"},
|
{name = "archive", url = "$BASE_URL/archive"},
|
||||||
{name = "about me", url = "$BASE_URL/about"},
|
{name = "about me", url = "$BASE_URL/about"},
|
||||||
|
|
||||||
# set newtab to true to make the link open in new tab
|
# set newtab to true to make the link open in new tab
|
||||||
{name = "github", url = "url-to-your-github", newtab = true},
|
{name = "github", url = "url-to-your-github", newtab = true},
|
||||||
]
|
]
|
||||||
|
@ -239,7 +284,7 @@ taxonomies = [
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Enabling tags will create a new `/tags` page, and
|
Enabling tags will create a new `/tags` page, and
|
||||||
cause them to show up in `archive` section. Note
|
cause them to show up in `archive` section. Note
|
||||||
that you still need to create a menu link to the tags
|
that you still need to create a menu link to the tags
|
||||||
page manually.
|
page manually.
|
||||||
|
@ -426,3 +471,5 @@ for more information.
|
||||||
|
|
||||||
The license for Hack fonts used is included in
|
The license for Hack fonts used is included in
|
||||||
[LICENSE-Hack.md](../master/LICENSE-Hack.md).
|
[LICENSE-Hack.md](../master/LICENSE-Hack.md).
|
||||||
|
|
||||||
|
[utterances]: https://utteranc.es/
|
||||||
|
|
|
@ -26,6 +26,10 @@
|
||||||
<link rel="shortcut icon" type="{{ config.extra.favicon_mimetype | default(value="image/x-icon") | safe }}" href="{{ config.extra.favicon | safe }}">
|
<link rel="shortcut icon" type="{{ config.extra.favicon_mimetype | default(value="image/x-icon") | safe }}" href="{{ config.extra.favicon | safe }}">
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
|
{%- if config.extra.mastodon_url %}
|
||||||
|
{%- block mastodon %}{{ head_macros::mastodon(config=config) }}{% endblock mastodon -%}
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
{%- block extra_head %}
|
{%- block extra_head %}
|
||||||
{% endblock extra_head -%}
|
{% endblock extra_head -%}
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -92,3 +92,7 @@
|
||||||
<meta property="twitter:domain" content="{{ config.base_url | replace(from="https://", to="") }}">
|
<meta property="twitter:domain" content="{{ config.base_url | replace(from="https://", to="") }}">
|
||||||
<meta property="twitter:url" content="{{ permalink | safe }}">
|
<meta property="twitter:url" content="{{ permalink | safe }}">
|
||||||
{% endmacro open_graph %}
|
{% endmacro open_graph %}
|
||||||
|
|
||||||
|
{% macro mastodon(config) %}
|
||||||
|
<link rel="me" href="{{ config.extra.mastodon_url }}" />
|
||||||
|
{% endmacro mastodon %}
|
||||||
|
|
Loading…
Reference in a new issue