Choose between original and herman styles

This commit is contained in:
Caio Lente 2024-03-04 17:16:00 -03:00
parent f71c396687
commit d0b36f11bd
No known key found for this signature in database
GPG Key ID: E66D381776EFC03A
5 changed files with 18 additions and 1 deletions

View File

@ -125,6 +125,11 @@ already implemented:
without inline styles (see `hugo.toml` for more information), it only load its without inline styles (see `hugo.toml` for more information), it only load its
`syntax.css` if, and only if, a code block is actually present in the current `syntax.css` if, and only if, a code block is actually present in the current
page. page.
- Alternative "Herman" style (EXPERIMENTAL): if you want to check out a more
modern CSS style, you can change the `themeStyle` parameter to `"herman"` in
order to activate [Herman Martinus's](https://herman.bearblog.dev/) version of
the [Blogster Minimal](https://blogster-minimal.netlify.app/) theme for
[Astro](https://astro.build/).
- Dynamic social card generation (EXPERIMENTAL): if you don't add preview images - Dynamic social card generation (EXPERIMENTAL): if you don't add preview images
to a post, this template will generate one based on the title. You can see an to a post, this template will generate one based on the title. You can see an
example below. example below.
@ -203,6 +208,12 @@ enableRobotsTXT = true
# have the theme simply not show any link # have the theme simply not show any link
hideUntranslated = false hideUntranslated = false
# (EXPERIMENTAL) This theme has two options for its CSS styles: "original" and
# "herman". The former is what you see on Bear Cub's demo (an optimized
# version of Hugo Bear Blog), while the latter has a more modern look based on
# Herman Martinus's version of the Blogster Minimal theme for Astro.
themeStyle = "original"
# (EXPERIMENTAL) This theme is capable of dynamically generating social cards # (EXPERIMENTAL) This theme is capable of dynamically generating social cards
# for posts that don't have `images` defined in their front matter; By setting # for posts that don't have `images` defined in their front matter; By setting
# `generateSocialCard` to false, you can prevent this behavior. For more # `generateSocialCard` to false, you can prevent this behavior. For more

View File

@ -63,6 +63,12 @@ enableRobotsTXT = true
# have the theme simply not show any link # have the theme simply not show any link
hideUntranslated = false hideUntranslated = false
# (EXPERIMENTAL) This theme has two options for its CSS styles: "original" and
# "herman". The former is what you see on Bear Cub's demo (an optimized
# version of Hugo Bear Blog), while the latter has a more modern look based on
# Herman Martinus's version of the Blogster Minimal theme for Astro.
themeStyle = "original"
# (EXPERIMENTAL) This theme is capable of dynamically generating social cards # (EXPERIMENTAL) This theme is capable of dynamically generating social cards
# for posts that don't have `images` defined in their front matter; By setting # for posts that don't have `images` defined in their front matter; By setting
# `generateSocialCard` to false, you can prevent this behavior. For more # `generateSocialCard` to false, you can prevent this behavior. For more

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -11,7 +11,7 @@
{{- partial "seo_tags.html" . -}} {{- partial "seo_tags.html" . -}}
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
{{ $style := resources.Get "style.css" | minify }} {{ $style := print (default "original" .Site.Params.themeStyle) ".css" | resources.Get | minify }}
<link href="{{ $style.RelPermalink }}" rel="stylesheet"> <link href="{{ $style.RelPermalink }}" rel="stylesheet">
{{ if (.Page.Store.Get "hasCodeBlock") }} {{ if (.Page.Store.Get "hasCodeBlock") }}