diff --git a/README.md b/README.md index b8fc4b7..7eed167 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,7 @@ See the live demo (of the default configuration) here: https://pawroman.github.io/zola-theme-terminimal/ -Tested with Zola v0.19.2. - -Please note that earlier (and older) 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. #### Fork disclaimer @@ -88,7 +86,7 @@ Example: Same as `image`, but with a few extra optional arguments: -- **`caption`** (supports markdown) +- **`caption`** - **`caption_position`** (center \[default\] | left | right) - **`caption_style`** @@ -99,44 +97,12 @@ Example: style="width: 25%;", position="right", caption_position="left", - 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" + caption="Ferris, the (unofficial) Rust mascot", + caption_style="font-weight: bold; font-style: italic;") }} ``` ## 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 @@ -152,14 +118,13 @@ of your `config.toml`: [extra] # One of: blue, green, orange, pink, red. -# Defaults to blue. -# Append -light for light themes, e.g. blue-light -# Or append -auto, e.g. blue-auto +# Defaults to blue. accent_color = "green" -# One of: blue, dark, green, orange, pink, red, light, auto -# Enabling dark background will also modify primary font color to be darker. -# Defaults to accent color (or, if not accent color specified, to blue). +# One of: blue, dark, green, orange, pink, red. +# Enabling dark background will also modify primary font color +# to be darker. +# Defaults to accent color (or, if not accent color specified, to blue). background_color = "dark" ``` @@ -392,7 +357,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) have been removed. +- All references to social media (e.g. Twitter, OpenGraph) 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 b03451a..7af0f3d 100644 --- a/config.toml +++ b/config.toml @@ -5,12 +5,6 @@ title = "Zola Terminimal theme" # Sass compilation is required compile_sass = true -# The theme supports feeds (RSS and ATOM) -generate_feeds = true - -# Use `rss.xml` for RSS feeds and `atom.xml` for ATOM. -feed_filenames = ["rss.xml", "atom.xml"] - # Optional: enable tags taxonomies = [ {name = "tags"} @@ -25,12 +19,11 @@ highlight_theme = "boron" # One of: blue, green, orange, pink, red. # Defaults to blue. -# Append -light for light themes, e.g. blue-light -# Or append -auto, e.g. blue-auto accent_color = "blue" -# One of: blue, dark, green, orange, pink, red, light, auto -# Enabling dark background will also modify primary font color to be darker. +# One of: blue, dark, green, orange, pink, red. +# Enabling dark background will also modify primary font color +# to be darker. # Defaults to accent color (or, if not accent color specified, to blue). background_color = "blue" @@ -96,8 +89,3 @@ 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 d7bda16..32a356e 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-style: italic;") }} + caption="Ferris, the (unofficial) Rust mascot", + caption_style="font-weight: bold; font-style: italic;") }} --- diff --git a/sass/color/background_auto.scss b/sass/color/background_auto.scss deleted file mode 100644 index e1cab79..0000000 --- a/sass/color/background_auto.scss +++ /dev/null @@ -1,14 +0,0 @@ -:root { - - @media (prefers-color-scheme: light) { - --background: white; - - --color: #101010; - } - - @media (prefers-color-scheme: dark) { - --background: #101010; - - --color: #A9B7C6; - } -} diff --git a/sass/color/background_light.scss b/sass/color/background_light.scss deleted file mode 100644 index ac41318..0000000 --- a/sass/color/background_light.scss +++ /dev/null @@ -1,3 +0,0 @@ -:root { - --background: #f0f0f0; -} diff --git a/sass/color/blue-auto.scss b/sass/color/blue-auto.scss deleted file mode 100644 index bf20e33..0000000 --- a/sass/color/blue-auto.scss +++ /dev/null @@ -1,29 +0,0 @@ -:root { - @media (prefers-color-scheme: dark) { - --accent: rgb(35,176,255); - --accent-alpha-70: rgba(35,176,255,.7); - --accent-alpha-20: rgba(35,176,255,.2); - - --background: #101010; - --color: #f0f0f0; - --border-color: rgba(255,240,224,.125); - - div.logo { - color: black; - } - - } - @media (prefers-color-scheme: light) { - --accent: rgb(32,128,192); - --accent-alpha-70: rgba(32,128,192,.7); - --accent-alpha-20: rgba(32,128,192,.2); - - --background: white; - --color: #201030; - --border-color: rgba(0,0,16,.125); - - div.logo { - color: white; - } - } -} diff --git a/sass/color/blue-light.scss b/sass/color/blue-light.scss deleted file mode 100644 index c41d839..0000000 --- a/sass/color/blue-light.scss +++ /dev/null @@ -1,12 +0,0 @@ -:root { - --accent: rgb(32,128,192); - --accent-alpha-70: rgba(32,128,192,.7); - --accent-alpha-20: rgba(32,128,192,.2); - - --background: white; - --color: #1D212C; - --border-color: rgba(0, 0, 0, .1); - div.logo { - color: white; - } -} diff --git a/sass/color/green-auto.scss b/sass/color/green-auto.scss deleted file mode 100644 index 2eb5e12..0000000 --- a/sass/color/green-auto.scss +++ /dev/null @@ -1,29 +0,0 @@ -:root { - @media (prefers-color-scheme: dark) { - --accent: rgb(120,226,160); - --accent-alpha-70: rgba(120,226,160,.7); - --accent-alpha-20: rgba(120,226,160,.2); - - --background: #101010; - --color: #f0f0f0; - --border-color: rgba(255,240,224,.125); - - div.logo { - color: black; - } - - } - @media (prefers-color-scheme: light) { - --accent: rgb(24, 192, 128); - --accent-alpha-70: rgba(24, 192, 128,.7); - --accent-alpha-20: rgba(24, 192, 128,.2); - - --background: white; - --color: #201030; - --border-color: rgba(0,0,16,.125); - - div.logo { - color: white; - } - } -} diff --git a/sass/color/green-light.scss b/sass/color/green-light.scss deleted file mode 100644 index 9ee64f3..0000000 --- a/sass/color/green-light.scss +++ /dev/null @@ -1,12 +0,0 @@ -:root { - --accent: rgb(24, 192, 128); - --accent-alpha-70: rgba(24, 192, 128,.7); - --accent-alpha-20: rgba(24, 192, 128,.2); - - --background: white; - --color: #1D212C; - --border-color: rgba(0, 0, 0, .1); - div.logo { - color: white; - } -} diff --git a/sass/color/orange-auto.scss b/sass/color/orange-auto.scss deleted file mode 100644 index 3c19ce4..0000000 --- a/sass/color/orange-auto.scss +++ /dev/null @@ -1,29 +0,0 @@ -:root { - @media (prefers-color-scheme: dark) { - --accent: rgb(255,168,106); - --accent-alpha-70: rgba(255,168,106,.7); - --accent-alpha-20: rgba(255,168,106,.2); - - --background: #101010; - --color: #f0f0f0; - --border-color: rgba(255,240,224,.125); - - div.logo { - color: black; - } - - } - @media (prefers-color-scheme: light) { - --accent: rgb(240,128,48); - --accent-alpha-70: rgba(240,128,48,.7); - --accent-alpha-20: rgba(240,128,48,.2); - - --background: white; - --color: #201030; - --border-color: rgba(0,0,16,.125); - - div.logo { - color: white; - } - } -} diff --git a/sass/color/orange-light.scss b/sass/color/orange-light.scss deleted file mode 100644 index 6f7b8f9..0000000 --- a/sass/color/orange-light.scss +++ /dev/null @@ -1,12 +0,0 @@ -:root { - --accent: rgb(240,128,48); - --accent-alpha-70: rgba(240,128,48,.7); - --accent-alpha-20: rgba(240,128,48,.2); - - --background: white; - --color: #1D212C; - --border-color: rgba(0, 0, 0, .1); - div.logo { - color: white; - } -} \ No newline at end of file diff --git a/sass/color/pink-auto.scss b/sass/color/pink-auto.scss deleted file mode 100644 index 705c706..0000000 --- a/sass/color/pink-auto.scss +++ /dev/null @@ -1,29 +0,0 @@ -:root { - @media (prefers-color-scheme: dark) { - --accent: rgb(224,64,192); - --accent-alpha-70: rgba(224,64,192); - --accent-alpha-20: rgba(224,64,192,.2); - - --background: #101010; - --color: #f0f0f0; - --border-color: rgba(255,240,224,.125); - - div.logo { - color: black; - } - - } - @media (prefers-color-scheme: light) { - --accent: rgb(238,114,241); - --accent-alpha-70: rgba(238,114,241,.7); - --accent-alpha-20: rgba(238,114,241,.2); - - --background: white; - --color: #201030; - --border-color: rgba(0,0,16,.125); - - div.logo { - color: white; - } - } -} diff --git a/sass/color/pink-light.scss b/sass/color/pink-light.scss deleted file mode 100644 index aa8437c..0000000 --- a/sass/color/pink-light.scss +++ /dev/null @@ -1,12 +0,0 @@ -:root { - --accent: rgb(224,64,192); - --accent-alpha-70: rgba(224,64,192); - --accent-alpha-20: rgba(224,64,192,.2); - - --background: white; - --color: #1D212C; - --border-color: rgba(0, 0, 0, .1); - div.logo { - color: white; - } -} diff --git a/sass/color/red-auto.scss b/sass/color/red-auto.scss deleted file mode 100644 index a0016f2..0000000 --- a/sass/color/red-auto.scss +++ /dev/null @@ -1,29 +0,0 @@ -:root { - @media (prefers-color-scheme: dark) { - --accent: rgb(255,98,102); - --accent-alpha-70: rgba(255,98,102,.7); - --accent-alpha-20: rgba(255,98,102,.2); - - --background: #101010; - --color: #f0f0f0; - --border-color: rgba(255,240,224,.125); - - div.logo { - color: black; - } - - } - @media (prefers-color-scheme: light) { - --accent: rgb(240,48,64); - --accent-alpha-70: rgba(240,48,64,.7); - --accent-alpha-20: rgba(240,48,64,.2); - - --background: white; - --color: #201030; - --border-color: rgba(0,0,16,.125); - - div.logo { - color: white; - } - } -} diff --git a/sass/color/red-light.scss b/sass/color/red-light.scss deleted file mode 100644 index d2f0e4c..0000000 --- a/sass/color/red-light.scss +++ /dev/null @@ -1,12 +0,0 @@ -:root { - --accent: rgb(240,48,64); - --accent-alpha-70: rgba(240,48,64,.7); - --accent-alpha-20: rgba(240,48,64,.2); - - --background: white; - --color: #1D212C; - --border-color: rgba(0, 0, 0, .1); - div.logo { - color: white; - } -} diff --git a/templates/404.html b/templates/404.html index cc2ba6e..b081fbc 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,7 +1,7 @@ {% extends "index.html" %} {% block title %} -404 | {{ config.title }} +404 {% endblock title %} {% block header_menu %} diff --git a/templates/index.html b/templates/index.html index fd07b4c..223c348 100644 --- a/templates/index.html +++ b/templates/index.html @@ -11,20 +11,9 @@ {%- block title %}{{ config.title }}{% endblock title -%} {{ head_macros::head(config=config) }} - {%- block open_graph %}{{ head_macros::open_graph(config=config) }}{% endblock open_graph -%} - - {%- if config.generate_feeds %} - {%- for feed in config.feed_filenames %} - {%- if feed is containing('atom') %} - - {%- endif %} - - {%- if feed is containing('rss') %} - - {%- endif %} - - {%- endfor %} - {%- endif -%} + {%- if config.generate_feed %} + + {% endif -%} {%- if config.extra.favicon %} @@ -77,8 +66,7 @@ {%- for page in show_pages %}
{{ post_macros::header(page=page) }} - - {{ post_macros::content(page=page, summary=true, show_only_description=page.extra.show_only_description | default(value=false)) }} + {{ post_macros::content(page=page, summary=true) }}
{% endfor -%} {% else %} - {#- full content -#}
{{ page.content | safe }}
@@ -33,33 +28,31 @@ {% macro earlier_later(page) %} - {%- if config.extra.enable_post_view_navigation %} - {%- if page.lower or page.higher %} -