Merge branch 'main' into main

This commit is contained in:
Nuno Coração
2022-10-28 18:34:13 +01:00
committed by GitHub
55 changed files with 362 additions and 133 deletions

View File

@@ -5,6 +5,8 @@ draft: false
description: "Learn how to build Blowfish manually."
slug: "advanced-customisation"
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.

View File

@@ -5,6 +5,8 @@ draft: false
description: "All the configuration variables available in Blowfish."
slug: "configuration"
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.
@@ -68,9 +70,11 @@ The theme currently supports the following languages by default:
| :jp: Japanese | `ja` |
| :brazil: Portuguese (Brazil) | `pt-br` |
| :portugal: Portuguese (Portugal) | `pt-pt` |
| :poland: Polish | `pl` |
| :romania: Romanian | `ro` |
| :es: Spanish (Spain) | `es` |
| :tr: Turkish | `tr` |
| 🇭🇷 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).
@@ -129,6 +133,7 @@ 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.|
|`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.|
|`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.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).|
@@ -152,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.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.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.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.|
@@ -188,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.
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.

View File

@@ -5,6 +5,8 @@ draft: false
description: "All the partials available in Blowfish."
slug: "content-examples"
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.

View File

@@ -5,6 +5,8 @@ draft: false
description: "Learn how to integrate Firebase and get dynamic data for views and likes."
slug: "firebase-views"
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.

View File

@@ -5,6 +5,8 @@ draft: false
description: "All the front matter variables available in Blowfish."
slug: "front-matter"
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.
@@ -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.|
|`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|
|`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.|
|`xml`|`true` unless excluded by `sitemap.excludedKinds`|Whether or not this article is included in the generated `/sitemap.xml` file.|
<!-- prettier-ignore-end -->

View File

@@ -5,6 +5,8 @@ draft: false
description: "All the front matter variables available in Blowfish."
slug: "getting-started"
tags: ["installation", "docs"]
series: ["Documentation"]
series_order: 3
---
{{< alert >}}

View File

@@ -5,6 +5,8 @@ draft: false
description: "Configuring the homepage layout in the Blowfish theme."
slug: "homepage-layout"
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.
@@ -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.
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
@@ -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"/>
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
@@ -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"/>
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
@@ -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"/>
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
@@ -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"/>
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
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.

View File

@@ -5,6 +5,8 @@ draft: false
description: "Learn how to deploy a Blowfish site."
slug: "hosting-deployment"
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.

View File

@@ -5,6 +5,8 @@ draft: false
description: "How to install the Blowfish theme."
slug: "installation"
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.
@@ -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:
- [Hugo module](#install-using-hugo) (recommended)
- [Git submodule](#install-using-git)
- [Git submodule](#install-using-git) (recommended)
- [Hugo module](#install-using-hugo)
- [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
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`.
@@ -65,26 +81,12 @@ This method is the quickest and easiest for keeping the theme up-to-date. Hugo u
```toml
[[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.
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
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.
- [Hugo module](#update-using-hugo)
- [Git submodule](#update-using-git)
- [Hugo module](#update-using-hugo)
- [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
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.
### 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
Updating Blowfish manually requires you to download the latest copy of the theme and replace the old version in your project.

View File

@@ -5,6 +5,8 @@ draft: false
description: "Configure multiple authors for your articles."
slug: "multi-author"
tags: ["authors", "config", "docs"]
series: ["Documentation"]
series_order: 10
showAuthor: true
authors:
- "nunocoracao"

View File

@@ -5,6 +5,8 @@ draft: false
description: "All the partials available in Blowfish."
slug: "partials"
tags: ["partials", "analytics", "privacy", "comments", "favicons", "icon", "docs"]
series: ["Documentation"]
series_order: 9
---
## Analytics

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

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.

View File

@@ -5,6 +5,8 @@ draft: false
description: "All the shortcodes available in Blowfish."
slug: "shortcodes"
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.

View File

@@ -5,6 +5,8 @@ draft: false
description: "Turn on thumbnails for your articles."
slug: "thumbnails"
tags: ["thumbnail", "config", "docs"]
series: ["Documentation"]
series_order: 6
---
## Thumbnails

View File

@@ -4,6 +4,8 @@ date: 2022-01-19
draft: false
description: "Discover what's new in Blowfish version 2.0."
tags: ["new", "docs"]
series: ["Documentation"]
series_order: 1
---
{{< lead >}}