Merge pull request #360 from pfrogond/dev

 Support for UTF-8 encoded series names; small updates
This commit is contained in:
Nuno Coração 2023-01-01 21:10:21 +00:00 committed by GitHub
commit 7db7ee8034
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 5 deletions

View file

@ -6,6 +6,8 @@
# baseURL = "https://your_domain.com/"
defaultContentLanguage = "en"
# pluralizeListTitles = "true"
enableRobotsTXT = true
paginate = 20
summaryLength = 30

View file

@ -53,6 +53,7 @@ Real websites that are built with Blowfish.
| [sdehm.dev](https://sdehm.dev) | Personal site |
| [dizzytech.de](https://dizzytech.de) | Personal site |
| [blog.rotrixx.eu](https://blog.rotrixx.eu) | Personal site |
| [hexwiki.cz](https://hexwiki.cz/) | Personal site |

View file

@ -25,7 +25,7 @@
<div class="relative flex flex-col grow">
<main id="main-content" class="grow">
{{ block "main" . }}{{ end }}
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 200) }}
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
<div class="pointer-events-none absolute top-[100vh] bottom-0 w-12 ltr:right-0 rtl:left-0">
<a href="#the-top"
class="pointer-events-auto sticky top-[calc(100vh-5.5rem)] flex h-12 w-12 mb-16 items-center justify-center rounded-full bg-neutral/50 text-xl text-neutral-700 backdrop-blur hover:text-primary-600 dark:bg-neutral-800/50 dark:text-neutral dark:hover:text-primary-400"

View file

@ -4,7 +4,9 @@
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }}
</summary>
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }}
{{ $seriesName := strings.ToLower (index .Params.series 0) }}
{{ $seriesNameURL := strings.Replace $seriesName " " "-" }}
{{ range $post := sort (index .Site.Taxonomies.series $seriesNameURL) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
@ -21,4 +23,4 @@
{{end}}
</details>
{{end}}
{{end}}

View file

@ -5,7 +5,9 @@
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }}
</summary>
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }}
{{ $seriesName := strings.ToLower (index .Params.series 0) }}
{{ $seriesNameURL := strings.Replace $seriesName " " "-" }}
{{ range $post := sort (index .Site.Taxonomies.series $seriesNameURL) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
@ -22,4 +24,4 @@
{{end}}
</details>
{{end}}
{{end}}