diff --git a/README.md b/README.md index b74dc4d..b8fc4b7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ See the live demo (of the default configuration) here: 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.19.2. + +Please note that earlier (and older) versions might not work because of breaking changes across Zola versions. #### Fork disclaimer @@ -86,7 +88,7 @@ Example: Same as `image`, but with a few extra optional arguments: -- **`caption`** +- **`caption`** (supports markdown) - **`caption_position`** (center \[default\] | left | right) - **`caption_style`** @@ -97,12 +99,44 @@ Example: style="width: 25%;", position="right", caption_position="left", - caption="Ferris, the (unofficial) Rust mascot", - caption_style="font-weight: bold; font-style: italic;") }} + caption="**Ferris**, the (unofficial) Rust mascot", + caption_style="font-style: italic;") }} +``` + +## OpenGraph + +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: + +```toml +[extra] +og_image = "colocated_image.png" +``` + +Additionally, for the section pages and for posts to have a fallback image, add +`default_og_image` to the `[extra]` section: + +```toml +[extra] +default_og_image = "static/ocean.jpg" ``` ## Configuration +### Only show the post's description + +On each post you can specify the following: + +```toml +description = "test description" + +[extra] +show_only_description = true +``` + +This will render `test description` under this +particular post on the homepage instead of a summary. + ### Colors Both the accent colors and background colors are @@ -358,7 +392,7 @@ This theme has been forked from https://github.com/panr/hugo-theme-terminal - Prism.js syntax highlighting is not supported (you can use [Zola's](https://www.getzola.org/documentation/content/syntax-highlighting/)). -- All references to social media (e.g. Twitter, OpenGraph) have been removed. +- All references to social media (e.g. Twitter) have been removed. - All references to external URLs (e.g. Google CDN) have been removed. This theme's static assets are meant to be served from where it's hosted. diff --git a/config.toml b/config.toml index 80337c9..b03451a 100644 --- a/config.toml +++ b/config.toml @@ -6,10 +6,10 @@ title = "Zola Terminimal theme" compile_sass = true # The theme supports feeds (RSS and ATOM) -generate_feed = true +generate_feeds = true # Use `rss.xml` for RSS feeds and `atom.xml` for ATOM. -feed_filename = "atom.xml" +feed_filenames = ["rss.xml", "atom.xml"] # Optional: enable tags taxonomies = [ @@ -96,3 +96,8 @@ use_full_hack_font = false # # Note that the main (index) page only has the main title. page_titles = "main_only" + +# Optional: default image to use for OpenGraph. +# If the page doesnt set og_image, use this one as fallback. Usefull +# for indexes and taxonomies' pages. +#default_og_image = "static/ocean.jpg" diff --git a/content/welcome-terminimal-theme.md b/content/welcome-terminimal-theme.md index 32a356e..d7bda16 100644 --- a/content/welcome-terminimal-theme.md +++ b/content/welcome-terminimal-theme.md @@ -77,7 +77,7 @@ figure(src="http://rustacean.net/assets/rustacean-flat-gesture.png", style="width: 25%;", position="center", caption_position="left", - caption="Ferris, the (unofficial) Rust mascot", + caption="**Ferris**, the (unofficial) Rust mascot", caption_style="font-weight: bold; font-style: italic;") ``` @@ -85,8 +85,8 @@ figure(src="http://rustacean.net/assets/rustacean-flat-gesture.png", style="width: 25%;", position="center", caption_position="left", - caption="Ferris, the (unofficial) Rust mascot", - caption_style="font-weight: bold; font-style: italic;") }} + caption="**Ferris**, the (unofficial) Rust mascot", + caption_style="font-style: italic;") }} --- diff --git a/templates/404.html b/templates/404.html index b081fbc..cc2ba6e 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,7 +1,7 @@ {% extends "index.html" %} {% block title %} -404 +404 | {{ config.title }} {% endblock title %} {% block header_menu %} diff --git a/templates/index.html b/templates/index.html index 86cb0cd..fd07b4c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -11,14 +11,20 @@