Compare commits

..

44 Commits

Author SHA1 Message Date
Nuno Coração 2c15da1273 Update package.json 2022-10-28 19:07:40 +01:00
Nuno Coração e76cbb53ae added showMenu to configs to highlight feature 2022-10-28 18:39:36 +01:00
Nuno Coração 5a734c1a51 Merge pull request #129 from madoke/main
Optionally disable footer menu. Enabled by default
2022-10-28 18:36:18 +01:00
Nuno Coração 54a99f72e0 Update config/_default/params.toml
Co-authored-by: David Simão <madoke@users.noreply.github.com>
2022-10-28 18:34:39 +01:00
Nuno Coração a366cab831 Merge branch 'main' into main 2022-10-28 18:34:13 +01:00
Nuno Coração 2c15750c9e Merge pull request #166 from nunocoracao/163-option-to-enabledisable-medium-zoom-image-in-paramstoml
added disableImageZoom parameter to disable image zoom
2022-10-28 18:32:14 +01:00
Nuno Coração 243267d281 added disableImageZoom parameter to disable image zoom 2022-10-28 18:31:56 +01:00
Nuno Coração 828f5cda23 Merge pull request #165 from nunocoracao/164-background-hero-layout-aligns-long-titles-to-the-left-on-mobile
fixed background/hero homepage layouts not centering on mobile
2022-10-28 18:03:01 +01:00
Nuno Coração c26bae0cb7 fixed background/hero homepage layouts not centering on mobile 2022-10-28 18:02:37 +01:00
Nuno Coração e354929549 updated version 2022-10-25 23:47:57 +01:00
Nuno Coração 3d7ac720ee Merge pull request #158 from nunocoracao/157-links-rendering-with-extra-white-space
removed extra whitespace from links
2022-10-25 23:47:23 +01:00
Nuno Coração 89ab364735 removed extra whitespace from links 2022-10-25 23:46:52 +01:00
Nuno Coração 9cb99c0ec7 added katex shortcode example 2022-10-25 19:55:53 +01:00
madoke c049cec8df fix typo/markdown 2022-10-24 21:56:16 +01:00
madoke 4a8c23c9d5 showMenu defaults to enabled 2022-10-24 21:54:37 +01:00
madoke 2211ce50be Adds documentation to showMenu parameter 2022-10-24 21:54:22 +01:00
Nuno Coração 4517ae0f0f Update index.md 2022-10-24 14:00:36 +01:00
Nuno Coração 27098fab5f Update README.md 2022-10-23 22:31:50 +01:00
Nuno Coração 952d259602 Update package.json 2022-10-23 22:29:36 +01:00
Nuno Coração fc7e02a6fb Merge pull request #155 from nunocoracao/138-update-the-preferred-installation-method-in-docs
changed preferred installation method
2022-10-23 22:28:53 +01:00
Nuno Coração 9f0f603f15 changed preferred installation method 2022-10-23 22:28:35 +01:00
Nuno Coração 24ee8b12ef Merge pull request #154 from nunocoracao/153-typo-in-the-blowfishs-documentation-on-homepage-layout-section
fixed errors in homepage layout docs
2022-10-23 22:12:18 +01:00
Nuno Coração 82ae111d35 fixed errors in lyout docs 2022-10-23 22:11:49 +01:00
Nuno Coração cc1720c282 Update README.md 2022-10-21 09:36:18 +01:00
Nuno Coração 2152d37467 Update README.md 2022-10-21 09:34:37 +01:00
Nuno Coração 890958d6c8 Merge pull request #152 from nunocoracao/150-fix-prose-width
fixed width in Term partials
2022-10-20 23:28:58 +01:00
Nuno Coração fe5d9b0246 fixed width in Term partials 2022-10-20 23:28:15 +01:00
Nuno Coração 7087e71d9a Merge pull request #151 from nunocoracao/150-fix-prose-width
improved readibilit of content
2022-10-20 22:04:46 +01:00
Nuno Coração 539cfd6443 improved readibilit of content 2022-10-20 22:03:49 +01:00
Nuno Coração 4b45ff114f Update package.json 2022-10-20 12:16:36 +01:00
Nuno Coração 0253344873 Merge pull request #149 from nunocoracao/148-images-in-both-hero-card-and-background-are-not-loaded-from-assets-folder
fixed bug in homepage image loading
2022-10-20 12:16:18 +01:00
Nuno Coração c64eac525a fixed bug 2022-10-20 12:15:37 +01:00
Nuno Coração 03cf3aec76 updated installation instructions for hugo 2022-10-18 22:03:33 +01:00
Nuno Coração 2ef97effed Update package.json 2022-10-18 21:58:45 +01:00
Nuno Coração 803f7dcc52 Update go.mod 2022-10-18 21:57:44 +01:00
Nuno Coração 76e7fbdeb0 Merge pull request #141 from lukapiplica/main
Slight fix for the name.
2022-10-18 08:14:31 +01:00
lukapiplica 5d992f1719 Fixed docs for Croatian
Slight change from Hrvatski to Croatian.
2022-10-18 03:03:12 +02:00
Nuno Coração c88306afad fixed bug in series 2022-10-17 22:50:08 +01:00
Nuno Coração 7e5d4f8365 Update package.json 2022-10-17 22:30:35 +01:00
Nuno Coração 04f0fe7e4b Merge pull request #140 from nunocoracao/127-implement-series-support
127 implement series support
2022-10-17 22:29:50 +01:00
Nuno Coração a7a780971c wrap up series module and added docs 2022-10-17 22:28:39 +01:00
Nuno Coração a3d301e386 added series params to docs articles 2022-10-17 19:52:23 +01:00
Nuno Coração b54ae4a6a0 initial commit of series 2022-10-17 19:43:29 +01:00
madoke 11120610fd Optionally disable footer menu. Enabled by default 2022-10-16 21:28:27 +01:00
45 changed files with 269 additions and 114 deletions
+26 -3
View File
@@ -22,6 +22,7 @@ Blowfish is designed to be a powerful, lightweight theme for [Hugo](https://gohu
- Views count & like mechanism - Views count & like mechanism
- Multiple homepage layouts - Multiple homepage layouts
- Support for multiple authors - Support for multiple authors
- Support for series of articles
- Flexible with any content types, taxonomies and menus - Flexible with any content types, taxonomies and menus
- Multilingual content support inlcuding support for RTL languages - Multilingual content support inlcuding support for RTL languages
- Ability to link to posts on third-party websites - Ability to link to posts on third-party websites
@@ -50,9 +51,31 @@ Blowfish has [extensive documentation](https://nunocoracao.github.io/blowfish/do
## Installation ## Installation
Blowfish supports several installation methods - as a Hugo Module (easiest), a git submodule, or as a completely manual install. Blowfish supports several installation methods - as a git submodule, a Hugo Module, or as a completely manual install.
Detailed instructions for each method can be found in the [Installation](https://nunocoracao.github.io/blowfish/docs/installation) docs. You should consult the documentation for the simplest setup experience. Below is a quick start guide using Hugo modules if you're already confident installing Hugo themes. Detailed instructions for each method can be found in the [Installation](https://nunocoracao.github.io/blowfish/docs/installation) docs. You should consult the documentation for the simplest setup experience. Below is a quick start guide using submodules if you are using git, or Hugo modules if you're already confident installing Hugo themes.
### Quick start using git submodules
> **Note:** Ensure you have **Git**, **Go**, and **Hugo** installed, and that you have created a new Hugo project before proceeding.
1. From your project directory, initialise git:
```shell
git init
```
2. Configure Blowfish as a git submodule:
```shell
git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish
```
3. In the root folder of your website, delete the `config.toml` file that was generated by Hugo. Copy the `*.toml` config files from the theme into your `config/_default/` folder.
You will find these theme config files in the Hugo cache directory, or [download a copy](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/tree/main/config/_default) from GitHub.
4. Follow the [Getting Started](https://nunocoracao.github.io/blowfish/docs/getting-started/) instructions to configure your website.
### Quick start using Hugo ### Quick start using Hugo
@@ -68,7 +91,7 @@ Detailed instructions for each method can be found in the [Installation](https:/
```toml ```toml
[[imports]] [[imports]]
path = "github.com/nunocoracao/blowfish" path = "github.com/nunocoracao/blowfish/v2"
``` ```
3. Start your server using `hugo server` and the theme will be downloaded automatically. 3. Start your server using `hugo server` and the theme will be downloaded automatically.
+25 -13
View File
@@ -1570,6 +1570,14 @@ select {
margin-left: 0.5rem; margin-left: 0.5rem;
} }
.mt-2 {
margin-top: 0.5rem;
}
.mb-5 {
margin-bottom: 1.25rem;
}
.\!mb-9 { .\!mb-9 {
margin-bottom: 2.25rem !important; margin-bottom: 2.25rem !important;
} }
@@ -1662,14 +1670,14 @@ select {
width: 3rem; width: 3rem;
} }
.w-36 {
width: 9rem;
}
.w-full { .w-full {
width: 100%; width: 100%;
} }
.w-36 {
width: 9rem;
}
.w-24 { .w-24 {
width: 6rem; width: 6rem;
} }
@@ -3065,10 +3073,6 @@ body:has(#menu-controller:checked) {
} }
} }
.max-w-prose {
max-width: 75ch;
}
.first\:mt-8:first-child { .first\:mt-8:first-child {
margin-top: 2rem; margin-top: 2rem;
} }
@@ -3382,16 +3386,16 @@ body:has(#menu-controller:checked) {
background-color: rgba(var(--color-neutral-700), var(--tw-bg-opacity)); background-color: rgba(var(--color-neutral-700), var(--tw-bg-opacity));
} }
.dark .dark\:bg-primary-900 {
--tw-bg-opacity: 1;
background-color: rgba(var(--color-primary-900), var(--tw-bg-opacity));
}
.dark .dark\:bg-primary-800 { .dark .dark\:bg-primary-800 {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgba(var(--color-primary-800), var(--tw-bg-opacity)); background-color: rgba(var(--color-primary-800), var(--tw-bg-opacity));
} }
.dark .dark\:bg-primary-900 {
--tw-bg-opacity: 1;
background-color: rgba(var(--color-primary-900), var(--tw-bg-opacity));
}
.dark .dark\:from-neutral-800 { .dark .dark\:from-neutral-800 {
--tw-gradient-from: rgba(var(--color-neutral-800), 1); --tw-gradient-from: rgba(var(--color-neutral-800), 1);
--tw-gradient-to: rgba(var(--color-neutral-800), 0); --tw-gradient-to: rgba(var(--color-neutral-800), 0);
@@ -3515,6 +3519,10 @@ body:has(#menu-controller:checked) {
width: 50%; width: 50%;
} }
.sm\:max-w-prose {
max-width: 65ch;
}
.sm\:flex-row { .sm\:flex-row {
flex-direction: row; flex-direction: row;
} }
@@ -3668,6 +3676,10 @@ body:has(#menu-controller:checked) {
margin-right: 0px; margin-right: 0px;
} }
.lg\:ml-auto {
margin-left: auto;
}
.lg\:mt-0 { .lg\:mt-0 {
margin-top: 0px; margin-top: 0px;
} }
-4
View File
@@ -395,8 +395,4 @@ body:has(#menu-controller:checked) {
.article { .article {
flex-wrap: nowrap; flex-wrap: nowrap;
} }
}
.max-w-prose {
max-width: 75ch;
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+2
View File
@@ -2,6 +2,7 @@
# Refer to the theme docs for more details about each of these parameters. # Refer to the theme docs for more details about each of these parameters.
# https://nunocoracao.github.io/blowfish/docs/getting-started/ # https://nunocoracao.github.io/blowfish/docs/getting-started/
# theme = "blowfish"
# baseURL = "https://your_domain.com/" # baseURL = "https://your_domain.com/"
defaultContentLanguage = "en" defaultContentLanguage = "en"
@@ -18,6 +19,7 @@ buildFuture = false
tag = "tags" tag = "tags"
category = "categories" category = "categories"
author = "authors" author = "authors"
series = "series"
[sitemap] [sitemap]
changefreq = 'daily' changefreq = 'daily'
+2
View File
@@ -16,6 +16,7 @@ enableCodeCopy = true
# robots = "" # robots = ""
[footer] [footer]
# showMenu = true
showCopyright = true showCopyright = true
showThemeAttribution = true showThemeAttribution = true
showAppearanceSwitcher = true showAppearanceSwitcher = true
@@ -42,6 +43,7 @@ enableCodeCopy = true
showEdit = true showEdit = true
# editURL = "https://github.com/username/repo/" # editURL = "https://github.com/username/repo/"
editAppendPath = true editAppendPath = true
seriesOpened = false
showHeadingAnchors = true showHeadingAnchors = true
showPagination = true showPagination = true
invertPagination = false invertPagination = false

Before

Width:  |  Height:  |  Size: 4.8 MiB

After

Width:  |  Height:  |  Size: 4.8 MiB

+1
View File
@@ -19,6 +19,7 @@ googleAnalytics = "G-PEDMYR1V0K"
tag = "tags" tag = "tags"
category = "categories" category = "categories"
author = "authors" author = "authors"
series = "series"
[sitemap] [sitemap]
changefreq = 'always' changefreq = 'always'
+4 -2
View File
@@ -16,6 +16,7 @@ mainSections = ["docs"]
# robots = "" # robots = ""
[footer] [footer]
showMenu = true
showCopyright = true showCopyright = true
showThemeAttribution = true showThemeAttribution = true
showAppearanceSwitcher = true showAppearanceSwitcher = true
@@ -23,7 +24,7 @@ mainSections = ["docs"]
[homepage] [homepage]
layout = "custom" # valid options: page, profile, hero, card, background, custom layout = "custom" # valid options: page, profile, hero, card, background, custom
homepageImage = "iceland.jpg" # used in: hero, and card homepageImage = "/img/iceland.jpg" # used in: hero, and card
showRecent = true showRecent = true
showRecentItems = 5 showRecentItems = 5
showMoreLink = true showMoreLink = true
@@ -42,6 +43,7 @@ mainSections = ["docs"]
showEdit = true showEdit = true
editURL = "https://github.com/nunocoracao/blowfish/tree/main/exampleSite/content" editURL = "https://github.com/nunocoracao/blowfish/tree/main/exampleSite/content"
editAppendPath = true editAppendPath = true
seriesOpened = false
showHeadingAnchors = true showHeadingAnchors = true
showPagination = true showPagination = true
invertPagination = false invertPagination = false
@@ -56,7 +58,7 @@ mainSections = ["docs"]
[list] [list]
showBreadcrumbs = false showBreadcrumbs = false
showSummary = true showSummary = true
showTableOfContents = false showTableOfContents = true
showCards = true showCards = true
groupByYear = false groupByYear = false
@@ -5,6 +5,8 @@ draft: false
description: "Learn how to build Blowfish manually." description: "Learn how to build Blowfish manually."
slug: "advanced-customisation" slug: "advanced-customisation"
tags: ["advanced", "css", "docs"] tags: ["advanced", "css", "docs"]
series: ["Documentation"]
series_order: 13
--- ---
There are many ways you can make advanced changes to Blowfish. Read below to learn more about what can be customised and the best way of achieving your desired result. There are many ways you can make advanced changes to Blowfish. Read below to learn more about what can be customised and the best way of achieving your desired result.
@@ -5,6 +5,8 @@ draft: false
description: "All the configuration variables available in Blowfish." description: "All the configuration variables available in Blowfish."
slug: "configuration" slug: "configuration"
tags: ["config", "docs"] tags: ["config", "docs"]
series: ["Documentation"]
series_order: 4
--- ---
Blowfish is a highly customisable theme and uses some of the latest Hugo features to simplify how it is configured. Blowfish is a highly customisable theme and uses some of the latest Hugo features to simplify how it is configured.
@@ -72,7 +74,7 @@ The theme currently supports the following languages by default:
| :romania: Romanian | `ro` | | :romania: Romanian | `ro` |
| :es: Spanish (Spain) | `es` | | :es: Spanish (Spain) | `es` |
| :tr: Turkish | `tr` | | :tr: Turkish | `tr` |
| 🇭🇷 Hrvatski | `hr` | | 🇭🇷 Croatian | `hr` |
The default translations can be overridden by creating a custom file in `i18n/[code].yaml` that contains the translation strings. You can also use this method to add new languages. If you'd like to share a new translation with the community, please [open a pull request](https://github.com/nunocoracao/blowfish/pulls). The default translations can be overridden by creating a custom file in `i18n/[code].yaml` that contains the translation strings. You can also use this method to add new languages. If you'd like to share a new translation with the community, please [open a pull request](https://github.com/nunocoracao/blowfish/pulls).
@@ -131,6 +133,8 @@ Many of the article defaults here can be overridden on a per article basis by sp
|`logo`|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.| |`logo`|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.|
|`mainSections`|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.| |`mainSections`|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.|
|`robots`|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| |`robots`|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.|
|`disableImageZoom`|`false`|Disables image zoom feature across all the images in the site.|
|`footer.showMenu`|`true`|Show/hide the footer menu, which can be configured in the `[[footer]]` section of the `config/_default/menus.en.toml` file.|
|`footer.showCopyright`|`true`|Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n).| |`footer.showCopyright`|`true`|Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n).|
|`footer.showThemeAttribution`|`true`|Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page).| |`footer.showThemeAttribution`|`true`|Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page).|
|`footer.showAppearanceSwitcher`|`false`|Whether or not to show the appearance switcher in the site footer. The browser's local storage is used to persist the visitor's preference.| |`footer.showAppearanceSwitcher`|`false`|Whether or not to show the appearance switcher in the site footer. The browser's local storage is used to persist the visitor's preference.|
@@ -153,6 +157,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|`article.showEdit`|`false`|Whether or not the link to edit the article content should be displayed.| |`article.showEdit`|`false`|Whether or not the link to edit the article content should be displayed.|
|`article.editURL`|_Not set_|When `article.showEdit` is active, the URL for the edit link.| |`article.editURL`|_Not set_|When `article.showEdit` is active, the URL for the edit link.|
|`article.editAppendPath`|`true`|When `article.showEdit` is active, whether or not the path to the current article should be appended to the URL set at `article.editURL`.| |`article.editAppendPath`|`true`|When `article.showEdit` is active, whether or not the path to the current article should be appended to the URL set at `article.editURL`.|
|`article.seriesOpened`|`false`|Whether or not the series module will be displayed open by default or not.|
|`article.showHeadingAnchors`|`true`|Whether or not heading anchor links are displayed alongside headings within articles.| |`article.showHeadingAnchors`|`true`|Whether or not heading anchor links are displayed alongside headings within articles.|
|`article.showPagination`|`true`|Whether or not the next/previous article links are displayed in the article footer.| |`article.showPagination`|`true`|Whether or not the next/previous article links are displayed in the article footer.|
|`article.invertPagination`|`false`|Whether or not to flip the direction of the next/previous article links.| |`article.invertPagination`|`false`|Whether or not to flip the direction of the next/previous article links.|
@@ -189,4 +194,4 @@ Many of the article defaults here can be overridden on a per article basis by sp
The theme also includes a `markup.toml` configuration file. This file contains some important parameters that ensure that Hugo is correctly configured to generate sites built with Blowfish. The theme also includes a `markup.toml` configuration file. This file contains some important parameters that ensure that Hugo is correctly configured to generate sites built with Blowfish.
Always ensure this file is present in the config directory and that the required values are set. Failure to do so may cause certain features to fucntion incorrectly and could result in unintended behaviour. Always ensure this file is present in the config directory and that the required values are set. Failure to do so may cause certain features to function incorrectly and could result in unintended behaviour.
@@ -5,6 +5,8 @@ draft: false
description: "All the partials available in Blowfish." description: "All the partials available in Blowfish."
slug: "content-examples" slug: "content-examples"
tags: ["content", "example"] tags: ["content", "example"]
series: ["Documentation"]
series_order: 12
--- ---
If you've been reading the documentation in order, you should now know about all the features and configurations available in Blowfish. This page is designed to pull everything together and offer some worked examples that you might like to use in your Hugo project. If you've been reading the documentation in order, you should now know about all the features and configurations available in Blowfish. This page is designed to pull everything together and offer some worked examples that you might like to use in your Hugo project.
@@ -5,6 +5,8 @@ draft: false
description: "Learn how to integrate Firebase and get dynamic data for views and likes." description: "Learn how to integrate Firebase and get dynamic data for views and likes."
slug: "firebase-views" slug: "firebase-views"
tags: ["firebase", "views", likes] tags: ["firebase", "views", likes]
series: ["Documentation"]
series_order: 15
--- ---
In order to be able to support dynamic data across your website we've added the support to integrate Firebase. This will allow you to use the views feature across lists and posts. In order to be able to support dynamic data across your website we've added the support to integrate Firebase. This will allow you to use the views feature across lists and posts.
@@ -5,6 +5,8 @@ draft: false
description: "All the front matter variables available in Blowfish." description: "All the front matter variables available in Blowfish."
slug: "front-matter" slug: "front-matter"
tags: ["front matter", "config", "docs"] tags: ["front matter", "config", "docs"]
series: ["Documentation"]
series_order: 7
--- ---
In addition to the [default Hugo front matter parameters](https://gohugo.io/content-management/front-matter/#front-matter-variables), Blowfish adds a number of additional options to customise the presentation of individual articles. All the available theme front matter parameters are listed below. In addition to the [default Hugo front matter parameters](https://gohugo.io/content-management/front-matter/#front-matter-variables), Blowfish adds a number of additional options to customise the presentation of individual articles. All the available theme front matter parameters are listed below.
@@ -43,6 +45,9 @@ Front matter parameter default values are inherited from the theme's [base confi
|`showSummary`|`list.showSummary`|Whether or not the article summary should be displayed on list pages.| |`showSummary`|`list.showSummary`|Whether or not the article summary should be displayed on list pages.|
|`showViews`|`article.showViews`|Whether or not the article views should be displayed in lists and detailed view. This requires a firebase integration. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish| |`showViews`|`article.showViews`|Whether or not the article views should be displayed in lists and detailed view. This requires a firebase integration. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish|
|`showLikes`|`article.showLikes`|Whether or not the article likes should be displayed in lists and detailed view. This requires a firebase integration. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish| |`showLikes`|`article.showLikes`|Whether or not the article likes should be displayed in lists and detailed view. This requires a firebase integration. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish|
|`seriesOpened`|`article.seriesOpened`|Whether or not the series module will be displayed open by default or not.|
|`series`|_Not set_|Array of series the article belongs to, we recommend using only one series per article.|
|`series_order`|_Not set_|Number of the article within the series.|
|`summary`|Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}}))|When `showSummary` is enabled, this is the Markdown string to be used as the summary for this article.| |`summary`|Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}}))|When `showSummary` is enabled, this is the Markdown string to be used as the summary for this article.|
|`xml`|`true` unless excluded by `sitemap.excludedKinds`|Whether or not this article is included in the generated `/sitemap.xml` file.| |`xml`|`true` unless excluded by `sitemap.excludedKinds`|Whether or not this article is included in the generated `/sitemap.xml` file.|
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@@ -5,6 +5,8 @@ draft: false
description: "All the front matter variables available in Blowfish." description: "All the front matter variables available in Blowfish."
slug: "getting-started" slug: "getting-started"
tags: ["installation", "docs"] tags: ["installation", "docs"]
series: ["Documentation"]
series_order: 3
--- ---
{{< alert >}} {{< alert >}}
@@ -5,6 +5,8 @@ draft: false
description: "Configuring the homepage layout in the Blowfish theme." description: "Configuring the homepage layout in the Blowfish theme."
slug: "homepage-layout" slug: "homepage-layout"
tags: ["homepage", "layouts", "docs"] tags: ["homepage", "layouts", "docs"]
series: ["Documentation"]
series_order: 5
--- ---
Blowfish provides a fully flexible homepage layout. There are two main templates to choose from with additional settings to adjust the design. Alternatively, you can also provide your own template and have complete control over the homepage content. Blowfish provides a fully flexible homepage layout. There are two main templates to choose from with additional settings to adjust the design. Alternatively, you can also provide your own template and have complete control over the homepage content.
@@ -21,7 +23,7 @@ The author information is provided in the languages configuration file. Refer to
Additionally, any Markdown content that is provided in the homepage content will be placed below the author profile. This allows extra flexibility for displaying a bio or other custom content using shortcodes. Additionally, any Markdown content that is provided in the homepage content will be placed below the author profile. This allows extra flexibility for displaying a bio or other custom content using shortcodes.
To enable the profile layout, set `homepage.layout = "profile"` in the `params.toml` configuration file. To enable the Profile layout, set `homepage.layout = "profile"` in the `params.toml` configuration file.
## Page layout ## Page layout
@@ -29,7 +31,7 @@ The page layout is simply a normal content page that displays your Markdown cont
<img class="thumbnailshadow" src="home-page.png"/> <img class="thumbnailshadow" src="home-page.png"/>
To enable the page layout, set `homepage.layout = "page"` in the `params.toml` configuration file. To enable the Page layout, set `homepage.layout = "page"` in the `params.toml` configuration file.
## Hero layout ## Hero layout
@@ -37,7 +39,7 @@ The hero layout brings together ideas from the profile and card layouts. This on
<img class="thumbnailshadow" src="home-hero.png"/> <img class="thumbnailshadow" src="home-hero.png"/>
To enable the profile layout, set `homepage.layout = "profile"` and `homepage.homepageImage` in the `params.toml` configuration file. To enable the Hero layout, set `homepage.layout = "hero"` and `homepage.homepageImage` in the `params.toml` configuration file.
## Background layout ## Background layout
@@ -45,7 +47,7 @@ The background layout is a more smooth version of the hero layout. As in the Her
<img class="thumbnailshadow" src="home-background.png"/> <img class="thumbnailshadow" src="home-background.png"/>
To enable the profile layout, set `homepage.layout = "background"` and `homepage.homepageImage` in the `params.toml` configuration file. To enable the Background layout, set `homepage.layout = "background"` and `homepage.homepageImage` in the `params.toml` configuration file.
## Card layout ## Card layout
@@ -53,14 +55,14 @@ The card layout is an extension of the page layout. It provides the same level o
<img class="thumbnailshadow" src="home-card.png"/> <img class="thumbnailshadow" src="home-card.png"/>
To enable the profile layout, set `homepage.layout = "profile"` and `homepage.homepageImage` in the `params.toml` configuration file. To enable the Card layout, set `homepage.layout = "card"` and `homepage.homepageImage` in the `params.toml` configuration file.
## Custom layout ## Custom layout
If the built-in homepage layouts aren't sufficient for your needs, you have the option to provide your own custom layout. This allows you to have total control over the page content and essentially gives you a blank slate to work with. If the built-in homepage layouts aren't sufficient for your needs, you have the option to provide your own custom layout. This allows you to have total control over the page content and essentially gives you a blank slate to work with.
To enable the custom layout, set `homepage.layout = "custom"` in the `params.toml` configuration file. To enable the Custom layout, set `homepage.layout = "custom"` in the `params.toml` configuration file.
With the configuration value set, create a new `custom.html` file and place it in `layouts/partials/home/custom.html`. Now whatever is in the `custom.html` file will be placed in the content area of the site homepage. You may use whatever HTML, Tailwind, or Hugo templating functions you wish to define your layout. With the configuration value set, create a new `custom.html` file and place it in `layouts/partials/home/custom.html`. Now whatever is in the `custom.html` file will be placed in the content area of the site homepage. You may use whatever HTML, Tailwind, or Hugo templating functions you wish to define your layout.
@@ -5,6 +5,8 @@ draft: false
description: "Learn how to deploy a Blowfish site." description: "Learn how to deploy a Blowfish site."
slug: "hosting-deployment" slug: "hosting-deployment"
tags: ["hosting", "deployment", "docs", "github", "netlify", "render"] tags: ["hosting", "deployment", "docs", "github", "netlify", "render"]
series: ["Documentation"]
series_order: 14
--- ---
There are many ways to deploy your Hugo website built with Blowfish. The theme is designed to be flexible in almost any deployment scenario. There are many ways to deploy your Hugo website built with Blowfish. The theme is designed to be flexible in almost any deployment scenario.
+32 -30
View File
@@ -5,6 +5,8 @@ draft: false
description: "How to install the Blowfish theme." description: "How to install the Blowfish theme."
slug: "installation" slug: "installation"
tags: ["installation", "docs"] tags: ["installation", "docs"]
series: ["Documentation"]
series_order: 2
--- ---
Simply follow the standard Hugo [Quick Start](https://gohugo.io/getting-started/quick-start/) procedure to get up and running quickly. Simply follow the standard Hugo [Quick Start](https://gohugo.io/getting-started/quick-start/) procedure to get up and running quickly.
@@ -35,15 +37,29 @@ Note that you can name the project directory whatever you choose, but the instru
There several different ways to install the Blowfish theme into your Hugo website. From easiest to most difficult to install and maintain, they are: There several different ways to install the Blowfish theme into your Hugo website. From easiest to most difficult to install and maintain, they are:
- [Hugo module](#install-using-hugo) (recommended) - [Git submodule](#install-using-git) (recommended)
- [Git submodule](#install-using-git) - [Hugo module](#install-using-hugo)
- [Manual file copy](#install-manually) - [Manual file copy](#install-manually)
If you're unsure, choose the Hugo module method. If you're unsure, choose the Git submodule method.
#### Install using git
This method is the quickest and easiest for keeping the theme up-to-date. Besides **Hugo** and **Go**, you'll also need to ensure you have **Git** installed on your local machine.
Change into the directory for your Hugo website (that you created above), initialise a new `git` repository and add Blowfish as a submodule.
```bash
cd mywebsite
git init
git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish
```
Then continue to [set up the theme configuration files](#set-up-theme-configuration-files).
#### Install using Hugo #### Install using Hugo
This method is the quickest and easiest for keeping the theme up-to-date. Hugo uses **Go** to initialise and manage modules so you need to ensure you have `go` installed before proceeding. For this method you'll use Hugo to manage your themes. Hugo uses **Go** to initialise and manage modules so you need to ensure you have `go` installed before proceeding.
1. [Download](https://golang.org/dl/) and install Go. You can check if it's already installed by using the command `go version`. 1. [Download](https://golang.org/dl/) and install Go. You can check if it's already installed by using the command `go version`.
@@ -65,26 +81,12 @@ This method is the quickest and easiest for keeping the theme up-to-date. Hugo u
```toml ```toml
[[imports]] [[imports]]
path = "github.com/nunocoracao/blowfish" path = "github.com/nunocoracao/blowfish/v2"
``` ```
4. Start your server using `hugo server` and the theme will be downloaded automatically. 4. Start your server using `hugo server` and the theme will be downloaded automatically.
5. Continue to [set up the theme configuration files](#set-up-theme-configuration-files). 5. Continue to [set up the theme configuration files](#set-up-theme-configuration-files).
#### Install using git
For this method you'll need to ensure you have **Git** installed on your local machine.
Change into the directory for your Hugo website (that you created above), initialise a new `git` repository and add Blowfish as a submodule.
```bash
cd mywebsite
git init
git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish
```
Then continue to [set up the theme configuration files](#set-up-theme-configuration-files).
#### Install manually #### Install manually
1. Download the latest release of the theme source code. 1. Download the latest release of the theme source code.
@@ -134,10 +136,20 @@ From time to time there will be [new releases](https://github.com/nunocoracao/bl
How you go about this will depend on the installation method you chose when the theme was originally installed. Instructions for each method can be found below. How you go about this will depend on the installation method you chose when the theme was originally installed. Instructions for each method can be found below.
- [Hugo module](#update-using-hugo)
- [Git submodule](#update-using-git) - [Git submodule](#update-using-git)
- [Hugo module](#update-using-hugo)
- [Manual file copy](#update-manually) - [Manual file copy](#update-manually)
### Update using git
Git submodules can be updated using the `git` command. Simply execute the following command and the latest version of the theme will be downloaded into your local repository:
```shell
git submodule update --remote --merge
```
Once the submodule has been updated, rebuild your site and check everything works as expected.
### Update using Hugo ### Update using Hugo
Hugo makes updating modules super easy. Simply change into your project directory and execute the following command: Hugo makes updating modules super easy. Simply change into your project directory and execute the following command:
@@ -150,16 +162,6 @@ Hugo will automatically update any modules that are required for your project. I
Then simply rebuild your site and check everything works as expected. Then simply rebuild your site and check everything works as expected.
### Update using git
Git submodules can be updated using the `git` command. Simply execute the following command and the latest version of the theme will be downloaded into your local repository:
```shell
git submodule update --remote --merge
```
Once the submodule has been updated, rebuild your site and check everything works as expected.
### Update manually ### Update manually
Updating Blowfish manually requires you to download the latest copy of the theme and replace the old version in your project. Updating Blowfish manually requires you to download the latest copy of the theme and replace the old version in your project.
@@ -5,6 +5,8 @@ draft: false
description: "Configure multiple authors for your articles." description: "Configure multiple authors for your articles."
slug: "multi-author" slug: "multi-author"
tags: ["authors", "config", "docs"] tags: ["authors", "config", "docs"]
series: ["Documentation"]
series_order: 10
showAuthor: true showAuthor: true
authors: authors:
- "nunocoracao" - "nunocoracao"
@@ -5,6 +5,8 @@ draft: false
description: "All the partials available in Blowfish." description: "All the partials available in Blowfish."
slug: "partials" slug: "partials"
tags: ["partials", "analytics", "privacy", "comments", "favicons", "icon", "docs"] tags: ["partials", "analytics", "privacy", "comments", "favicons", "icon", "docs"]
series: ["Documentation"]
series_order: 9
--- ---
## Analytics ## Analytics
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

+36
View File
@@ -0,0 +1,36 @@
---
title: "Series"
date: 2020-08-09
draft: false
description: "Learn how to group articles under a series."
slug: "series"
tags: ["series", "docs"]
series: ["Documentation"]
series_order: 11
seriesOpened: true
---
Blowfish provides a feature to group a set of articles together under a "series". Placing an article under a series will display the rest of the series articles in each single page and provide a quick way to navigate amongst them. You can see an example of this above.
## Create Taxonomy
The first step to enable series is to create the `series` taxonomy. For doing this just add the `series` taxonomy to your taxonomy list in the `config.toml`.
```toml
[taxonomies]
tag = "tags"
category = "categories"
author = "authors"
series = "series"
```
## Mark Articles
Then you just need to mark each article using the `series` parameter and the `series_order`. The `series` parameter will be the id and name of the series you are placing the article into (even though the variable is an array we recommend keeping each article to a single series.). And the `series_order` defines the order of that article within the series. In the example below the article is number `11` in the `Documentation` series.
```md
series: ["Documentation"]
series_order: 11
```
## Series Behavior
Marking an article as part of a series will automatically display the series module as you see in this page for example. You can choose whether that module starts opened or not using the `article.seriesOpened` global variable in `params.toml` or the front-matter parameter `seriesOpened` to specify an override at the article level.
@@ -5,6 +5,8 @@ draft: false
description: "All the shortcodes available in Blowfish." description: "All the shortcodes available in Blowfish."
slug: "shortcodes" slug: "shortcodes"
tags: ["shortcodes", "mermaid", "icon", "lead", "docs"] tags: ["shortcodes", "mermaid", "icon", "lead", "docs"]
series: ["Documentation"]
series_order: 8
--- ---
In addition to all the [default Hugo shortcodes](https://gohugo.io/content-management/shortcodes/), Blowfish adds a few extras for additional functionality. In addition to all the [default Hugo shortcodes](https://gohugo.io/content-management/shortcodes/), Blowfish adds a few extras for additional functionality.
@@ -5,6 +5,8 @@ draft: false
description: "Turn on thumbnails for your articles." description: "Turn on thumbnails for your articles."
slug: "thumbnails" slug: "thumbnails"
tags: ["thumbnail", "config", "docs"] tags: ["thumbnail", "config", "docs"]
series: ["Documentation"]
series_order: 6
--- ---
## Thumbnails ## Thumbnails
@@ -4,6 +4,8 @@ date: 2022-01-19
draft: false draft: false
description: "Discover what's new in Blowfish version 2.0." description: "Discover what's new in Blowfish version 2.0."
tags: ["new", "docs"] tags: ["new", "docs"]
series: ["Documentation"]
series_order: 1
--- ---
{{< lead >}} {{< lead >}}
@@ -11,9 +11,12 @@ KaTeX can be used to render mathematical notation within articles.
{{< katex >}} {{< katex >}}
Blowfish will only bundle the KaTeX assets into your project if you make use of mathematical notation. In order for this to work, simply include the [`katex` shortcode]({{< ref "docs/shortcodes#katex" >}}) within the article. Any KaTeX syntax on that page will then be automatically rendered. Blowfish will only bundle the KaTeX assets into your project if you make use of mathematical notation. In order for this to work, simply include the [`katex` shortcode]({{< ref "docs/shortcodes#katex" >}}) within the article. Example below:
Use the online reference of [supported TeX functions](https://katex.org/docs/supported.html) for the available syntax. ```md
{{</* katex */>}}
```
Any KaTeX syntax on that page will then be automatically rendered. Use the online reference of [supported TeX functions](https://katex.org/docs/supported.html) for the available syntax.
## Inline notation ## Inline notation
+1 -1
View File
@@ -1,3 +1,3 @@
module github.com/nunocoracao/blowfish module github.com/nunocoracao/blowfish/v2
go 1.16 go 1.16
+1 -2
View File
@@ -1,3 +1,2 @@
<a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }} {{ if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}> <a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }} {{ if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
{{ .Text | safeHTML }} {{ .Text | safeHTML }}</a>
</a>
+1 -1
View File
@@ -25,7 +25,7 @@
</div> </div>
</section> </section>
{{ if gt .Pages 0 }} {{ if gt .Pages 0 }}
<section class="space-y-10 max-w-prose"> <section class="space-y-10 w-full">
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
{{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }} {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300"> <h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
+13 -11
View File
@@ -2,11 +2,11 @@
<article> <article>
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }} {{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
{{ $heroStyle := print "partials/hero/" .Site.Params.article.heroStyle ".html" }} {{ $heroStyle := print "partials/hero/" .Site.Params.article.heroStyle ".html" }}
{{ if templates.Exists $heroStyle }} {{ if templates.Exists $heroStyle }}
{{ partial $heroStyle . }} {{ partial $heroStyle . }}
{{ else }} {{ else }}
{{ partial "partials/hero/basic.html" . }} {{ partial "partials/hero/basic.html" . }}
{{ end }} {{ end }}
{{- end -}} {{- end -}}
<header id="single_header" class="mt-5 max-w-prose"> <header id="single_header" class="mt-5 max-w-prose">
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }} {{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
@@ -21,13 +21,15 @@
</header> </header>
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row"> <section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in {{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
.TableOfContents "<ul") }} <div class="order-first px-0 lg:order-last lg:max-w-xs ltr:lg:pl-8 rtl:lg:pr-8"> .TableOfContents "<ul") }}
<div class="order-first sm:max-w-prose lg:ml-auto px-0 lg:order-last lg:max-w-xs ltr:lg:pl-8 rtl:lg:pr-8">
<div class="toc ltr:pl-5 rtl:pr-5 print:hidden lg:sticky lg:top-10"> <div class="toc ltr:pl-5 rtl:pr-5 print:hidden lg:sticky lg:top-10">
{{ partial "toc.html" . }} {{ partial "toc.html" . }}
</div> </div>
</div> </div>
{{ end }} {{ end }}
<div class="min-w-0 min-h-0 max-w-prose"> <div class="min-w-0 min-h-0 max-w-prose">
{{ partial "series.html" . }}
{{ .Content | emojify }} {{ .Content | emojify }}
</div> </div>
<script> <script>
@@ -147,8 +149,8 @@
var header = document.getElementById("single_header") var header = document.getElementById("single_header")
var style = getComputedStyle(header); var style = getComputedStyle(header);
var hero = document.getElementById('hero') var hero = document.getElementById('hero')
if(hero){ if (hero) {
var margin = '-'+ (parseInt(style.height) + parseInt(style.marginTop) + parseInt(style.marginBottom) + 20) + 'px' var margin = '-' + (parseInt(style.height) + parseInt(style.marginTop) + parseInt(style.marginBottom) + 20) + 'px'
var height = (-parseInt(margin) + parseInt(getComputedStyle(hero).height)) + "px" var height = (-parseInt(margin) + parseInt(getComputedStyle(hero).height)) + "px"
console.log(height) console.log(height)
hero.style["margin-bottom"] = margin; hero.style["margin-bottom"] = margin;
@@ -170,9 +172,9 @@
{{ $taxonomyLink := 0 }} {{ $taxonomyLink := 0 }}
{{ range $taxonomyname, $taxonomy := $taxonomies }} {{ range $taxonomyname, $taxonomy := $taxonomies }}
{{ if (eq $taxonomyname $author) }} {{ if (eq $taxonomyname $author) }}
{{ $taxonomyLink = delimit (slice $baseURL "authors/" $author) "" }} {{ $taxonomyLink = delimit (slice $baseURL "authors/" $author) "" }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }} {{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }}
+1 -1
View File
@@ -12,7 +12,7 @@
</div> </div>
</section> </section>
{{ end }} {{ end }}
<section class="mt-5 space-y-10 max-w-prose"> <section class="mt-5 space-y-10 w-full">
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
{{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }} {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300"> <h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
+1 -1
View File
@@ -64,7 +64,7 @@
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }} {{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
<div class="flex flex-row flex-wrap items-center"> <div class="flex flex-row flex-wrap items-center">
{{ range $taxonomy, $terms := .Site.Taxonomies }} {{ range $taxonomy, $terms := .Site.Taxonomies }}
{{ if not (eq $taxonomy "authors")}} {{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series"))}}
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
{{ range $context.GetTerms $taxonomy }} {{ range $context.GetTerms $taxonomy }}
<span style="margin-top:0.5rem" class="mr-2" onclick="window.open({{ .RelPermalink }});"> <span style="margin-top:0.5rem" class="mr-2" onclick="window.open({{ .RelPermalink }});">
+15 -11
View File
@@ -1,16 +1,18 @@
<footer class="py-10 print:hidden"> <footer class="py-10 print:hidden">
{{/* Footer menu */}} {{/* Footer menu */}}
{{ if .Site.Menus.footer }} {{ if .Site.Params.footer.showMenu | default true }}
<nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400"> {{ if .Site.Menus.footer }}
<ul class="flex flex-col list-none sm:flex-row"> <nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
{{ range .Site.Menus.footer }} <ul class="flex flex-col list-none sm:flex-row">
<li class="mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0"> {{ range .Site.Menus.footer }}
<a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2" href="{{ .URL }}" <li class="mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
title="{{ .Title }}">{{ .Name | markdownify | emojify }}</a> <a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2" href="{{ .URL }}"
</li> title="{{ .Title }}">{{ .Name | markdownify | emojify }}</a>
{{ end }} </li>
</ul> {{ end }}
</nav> </ul>
</nav>
{{ end }}
{{ end }} {{ end }}
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
@@ -41,11 +43,13 @@
</div> </div>
<script> <script>
{{ if not .Site.Params.disableImageZoom | default true }}
mediumZoom(document.querySelectorAll("img:not(.nozoom)"), { mediumZoom(document.querySelectorAll("img:not(.nozoom)"), {
margin: 24, margin: 24,
background: 'rgba(0,0,0,0.5)', background: 'rgba(0,0,0,0.5)',
scrollOffset: 0, scrollOffset: 0,
}) })
{{ end }}
</script> </script>
{{ $jsProcess := resources.Get "js/process.js" }} {{ $jsProcess := resources.Get "js/process.js" }}
{{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint "sha512" }} {{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint "sha512" }}
+7 -2
View File
@@ -4,15 +4,20 @@
<div class="mx-auto max-w-7xl p-0"> <div class="mx-auto max-w-7xl p-0">
<div class="relative sm:overflow-hidden"> <div class="relative sm:overflow-hidden">
<div class="absolute inset-0"> <div class="absolute inset-0">
<img class="h-full w-full object-cover m-0 nozoom" src="{{ .Site.Params.homepage.homepageImage }}"> {{ with .Site.Params.homepage.homepageImage }}
{{ $homepageImage := resources.Get . }}
{{ if $homepageImage }}
<img class="h-full w-full object-cover m-0 nozoom" src="{{ $homepageImage.RelPermalink }}">
<div <div
class="absolute inset-0 bg-gradient-to-t from-neutral-100 dark:from-neutral-800 to-transparent dark:to-neutral-300 mix-blend-normal dark:mix-blend-multiply"> class="absolute inset-0 bg-gradient-to-t from-neutral-100 dark:from-neutral-800 to-transparent dark:to-neutral-300 mix-blend-normal dark:mix-blend-multiply">
</div> </div>
<div <div
class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"> class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
</div> </div>
{{ end }}
{{ end }}
</div> </div>
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center"> <div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center">
{{ with .Site.Author.image }} {{ with .Site.Author.image }}
{{ $authorImage := resources.Get . }} {{ $authorImage := resources.Get . }}
{{ if $authorImage }} {{ if $authorImage }}
+6 -1
View File
@@ -14,8 +14,13 @@
</div> </div>
<div class="mt-6 sm:mt-16 lg:mt-0"> <div class="mt-6 sm:mt-16 lg:mt-0">
<div class="-mr-48 pl-4 sm:pl-6 md:-mr-16 lg:relative lg:m-0 lg:h-full lg:px-0"> <div class="-mr-48 pl-4 sm:pl-6 md:-mr-16 lg:relative lg:m-0 lg:h-full lg:px-0">
{{ with .Site.Params.homepage.homepageImage }}
{{ $homepageImage := resources.Get . }}
{{ if $homepageImage }}
<img class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none" <img class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
src="{{ .Site.Params.homepage.homepageImage }}"> src="{{ $homepageImage.RelPermalink }}">
{{ end }}
{{ end }}
</div> </div>
</div> </div>
</div> </div>
+7 -2
View File
@@ -4,12 +4,17 @@
<div class="mx-auto max-w-7xl p-0"> <div class="mx-auto max-w-7xl p-0">
<div class="relative shadow-xl sm:overflow-hidden rounded-2xl"> <div class="relative shadow-xl sm:overflow-hidden rounded-2xl">
<div class="absolute inset-0"> <div class="absolute inset-0">
<img class="h-full w-full object-cover m-0 nozoom" src="{{ .Site.Params.homepage.homepageImage }}"> {{ with .Site.Params.homepage.homepageImage }}
{{ $homepageImage := resources.Get . }}
{{ if $homepageImage }}
<img class="h-full w-full object-cover m-0 nozoom" src="{{ $homepageImage.RelPermalink }}">
<div <div
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-700 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply"> class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-700 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
</div> </div>
{{ end }}
{{ end }}
</div> </div>
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center"> <div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center">
{{ with .Site.Author.image }} {{ with .Site.Author.image }}
{{ $authorImage := resources.Get . }} {{ $authorImage := resources.Get . }}
{{ if $authorImage }} {{ if $authorImage }}
+24
View File
@@ -0,0 +1,24 @@
{{ if .Params.series }}
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5" {{ if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }} open {{ end }}>
<summary
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 }} - This article is part of a series.
</summary>
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "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">
Part {{ $post.Params.series_order }}: This Article
</div>
{{ else }}
<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">
<a href="{{$post.Permalink}}">
Part {{ $post.Params.series_order }}: {{ $post.Params.title}}
</a>
</div>
{{end}}
{{end}}
</details>
{{end}}
+17 -17
View File
@@ -1,12 +1,12 @@
{ {
"name": "hugo-blowfish-theme", "name": "hugo-blowfish-theme",
"version": "1.3.1", "version": "2.4.5",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "hugo-blowfish-theme", "name": "hugo-blowfish-theme",
"version": "1.3.1", "version": "2.4.5",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -20,7 +20,7 @@
"chart.js": "^3.9.1", "chart.js": "^3.9.1",
"fuse.js": "^6.6.2", "fuse.js": "^6.6.2",
"katex": "^0.16.0", "katex": "^0.16.0",
"mermaid": "^9.1.6", "mermaid": "^9.1.7",
"prettier": "^2.7.1", "prettier": "^2.7.1",
"prettier-plugin-go-template": "^0.0.13", "prettier-plugin-go-template": "^0.0.13",
"prettier-plugin-tailwindcss": "^0.1.13", "prettier-plugin-tailwindcss": "^0.1.13",
@@ -1073,9 +1073,9 @@
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
}, },
"node_modules/dompurify": { "node_modules/dompurify": {
"version": "2.3.10", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.10.tgz", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.0.tgz",
"integrity": "sha512-o7Fg/AgC7p/XpKjf/+RC3Ok6k4St5F7Q6q6+Nnm3p2zGWioAY6dh0CbbuwOhH2UcSzKsdniE/YnE2/92JcsA+g==", "integrity": "sha512-Be9tbQMZds4a3C6xTmz68NlMfeONA//4dOavl/1rNw50E+/QO0KVpbcU0PcaW0nsQxurXls9ZocqFxk8R2mWEA==",
"dev": true "dev": true
}, },
"node_modules/fast-glob": { "node_modules/fast-glob": {
@@ -1383,16 +1383,16 @@
} }
}, },
"node_modules/mermaid": { "node_modules/mermaid": {
"version": "9.1.6", "version": "9.1.7",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-9.1.6.tgz", "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-9.1.7.tgz",
"integrity": "sha512-oBuQk7s55wQgEgH/AK0GYY8U0kBqOIGK9QlJL+VYxh+1kZQtU9tNwoy0gWCfBJDaFIRdfpc/fm9PagaIXg6XFQ==", "integrity": "sha512-MRVHXy5FLjnUQUG7YS3UN9jEN6FXCJbFCXVGJQjVIbiR6Vhw0j/6pLIjqsiah9xoHmQU6DEaKOvB3S1g/1nBPA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@braintree/sanitize-url": "^6.0.0", "@braintree/sanitize-url": "^6.0.0",
"d3": "^7.0.0", "d3": "^7.0.0",
"dagre": "^0.8.5", "dagre": "^0.8.5",
"dagre-d3": "^0.6.4", "dagre-d3": "^0.6.4",
"dompurify": "2.3.10", "dompurify": "2.4.0",
"graphlib": "^2.1.8", "graphlib": "^2.1.8",
"khroma": "^2.0.0", "khroma": "^2.0.0",
"moment-mini": "2.24.0", "moment-mini": "2.24.0",
@@ -2831,9 +2831,9 @@
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
}, },
"dompurify": { "dompurify": {
"version": "2.3.10", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.10.tgz", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.0.tgz",
"integrity": "sha512-o7Fg/AgC7p/XpKjf/+RC3Ok6k4St5F7Q6q6+Nnm3p2zGWioAY6dh0CbbuwOhH2UcSzKsdniE/YnE2/92JcsA+g==", "integrity": "sha512-Be9tbQMZds4a3C6xTmz68NlMfeONA//4dOavl/1rNw50E+/QO0KVpbcU0PcaW0nsQxurXls9ZocqFxk8R2mWEA==",
"dev": true "dev": true
}, },
"fast-glob": { "fast-glob": {
@@ -3074,16 +3074,16 @@
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="
}, },
"mermaid": { "mermaid": {
"version": "9.1.6", "version": "9.1.7",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-9.1.6.tgz", "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-9.1.7.tgz",
"integrity": "sha512-oBuQk7s55wQgEgH/AK0GYY8U0kBqOIGK9QlJL+VYxh+1kZQtU9tNwoy0gWCfBJDaFIRdfpc/fm9PagaIXg6XFQ==", "integrity": "sha512-MRVHXy5FLjnUQUG7YS3UN9jEN6FXCJbFCXVGJQjVIbiR6Vhw0j/6pLIjqsiah9xoHmQU6DEaKOvB3S1g/1nBPA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@braintree/sanitize-url": "^6.0.0", "@braintree/sanitize-url": "^6.0.0",
"d3": "^7.0.0", "d3": "^7.0.0",
"dagre": "^0.8.5", "dagre": "^0.8.5",
"dagre-d3": "^0.6.4", "dagre-d3": "^0.6.4",
"dompurify": "2.3.10", "dompurify": "2.4.0",
"graphlib": "^2.1.8", "graphlib": "^2.1.8",
"khroma": "^2.0.0", "khroma": "^2.0.0",
"moment-mini": "2.24.0", "moment-mini": "2.24.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "hugo-blowfish-theme", "name": "hugo-blowfish-theme",
"version": "2.2.0", "version": "2.5.0",
"description": "Blowfish theme for Hugo", "description": "Blowfish theme for Hugo",
"scripts": { "scripts": {
"preinstall": "rimraf assets/vendor", "preinstall": "rimraf assets/vendor",