Merge branch 'dev' into dev-1

This commit is contained in:
Karlukle 2024-04-05 07:59:11 +08:00 committed by GitHub
commit 42469c1638
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 568 additions and 449 deletions

View file

@ -7,7 +7,7 @@ jobs:
steps:
- name: Hugo setup
uses: peaceiris/actions-hugo@v2.6.0
uses: peaceiris/actions-hugo@v3.0.0
with:
hugo-version: 0.120.4
extended: true

View file

@ -9,7 +9,7 @@ jobs:
steps:
- name: Hugo setup
uses: peaceiris/actions-hugo@v2.6.0
uses: peaceiris/actions-hugo@v3.0.0
with:
hugo-version: 0.120.4
extended: true

View file

@ -42,7 +42,7 @@ jobs:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules

View file

@ -16,7 +16,7 @@ jobs:
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2.6.0
uses: peaceiris/actions-hugo@v3.0.0
with:
hugo-version: "latest"

View file

@ -2,7 +2,7 @@
# Refer to the theme docs for more details about each of these parameters.
# https://blowfish.page/docs/getting-started/
# theme = "blowfish"
theme = "blowfish"
# baseURL = "https://your_domain.com/"
defaultContentLanguage = "en"

View file

@ -14,7 +14,7 @@ description: "このページは Hugo の Blowfish テーマを利用して構
id="switch-layout-button"
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
>
レイアウトを変更する ↻
レイアウトを変更する↻
</button>
</span>
</div>

View file

@ -2,4 +2,4 @@
title: "Nuno Coração"
---
Nuno's awesome dummy bio.
Nuno の素晴らしいダミープロフィールです。

View file

@ -1,5 +1,5 @@
---
title: "Dummy Second Author"
title: "2人目のダミー作者"
---
Dummy Second Author's awesome dummy bio.
2人目のダミー作者の素晴らしいダミープロフィールです。

View file

@ -313,6 +313,13 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `fathomAnalytics.site` | _Not set_ | The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `fathomAnalytics.domain` | _Not set_ | If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain. |
### Umami Analytics
| Name | Default | Description |
| ------------------------ | --------- |-----------------------------------------------------------------------------------------------------------------------------------------------|
| `umamiAnalytics.websiteid` | _Not set_ | The site code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `umamiAnalytics.domain` | _Not set_ | If using a custom domain with Umami Analytics, provide it here to serve `script.js` from the custom domain. |
### BuyMeACoffee
| Name | Default | Description |

View file

@ -313,6 +313,13 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `fathomAnalytics.site` | _Not set_ | The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `fathomAnalytics.domain` | _Not set_ | If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain. |
### Umami Analytics
| Name | Default | Description |
| ------------------------ | --------- |-----------------------------------------------------------------------------------------------------------------------------------------------|
| `umamiAnalytics.websiteid` | _Not set_ | The site code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `umamiAnalytics.domain` | _Not set_ | If using a custom domain with Umami Analytics, provide it here to serve `script.js` from the custom domain. |
### BuyMeACoffee
| Name | Default | Description |

View file

@ -313,6 +313,14 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `fathomAnalytics.site` | _Not set_ | The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `fathomAnalytics.domain` | _Not set_ | If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain. |
### Umami Analytics
| Name | Default | Description |
| ------------------------ | --------- |-----------------------------------------------------------------------------------------------------------------------------------------------|
| `umamiAnalytics.websiteid` | _Not set_ | The site code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `umamiAnalytics.domain` | _Not set_ | If using a custom domain with Umami Analytics, provide it here to serve `script.js` from the custom domain. |
### BuyMeACoffee
| Name | Default | Description |

View file

@ -314,9 +314,17 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### Fathom Analytics
| 名称 | 默认值 | 描述 |
| ------------------------ | --------- |----------------------------------------------------------------------|
| ------------------------ | --------- |---------------------------------------------------------------------|
| `fathomAnalytics.site` | 无 | 支持 Fathom 站点分析平台。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 |
| `fathomAnalytics.domain` | 无 | 如果使用自定义域名的 Fathom Analytics请在此提供以便从自定义域名获取 `script.js`】。 |
| `fathomAnalytics.domain` | 无 | 如果使用自定义域名的 Fathom Analytics请在此提供以便从自定义域名获取 `script.js`。 |
### Umami Analytics
| Name | Default | Description |
| ------------------------ | --------- |-------------------------------------------------------------------------------------------------------------|
| `umamiAnalytics.websiteid` | _Not set_ | 支持 Umami 站点分析平台。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 |
| `umamiAnalytics.domain` | _Not set_ | 如果使用自定义域名的 Umami Analytics请在此提供以便从自定义域名获取 `script.js`。 |
### BuyMeACoffee

View file

@ -1,21 +1,21 @@
---
title: "Getting Started"
title: "Per iniziare"
date: 2020-08-15
draft: false
description: "All the front matter variables available in Blowfish."
slug: "getting-started"
tags: ["installation", "docs"]
series: ["Documentation"]
description: "Tutte le variabili del front matter sono disponibili in Blowfish.
slug: "per-iniziare"
tags: ["installazione", "documenti"]
series: ["Documentazione"]
series_order: 3
---
{{< alert >}}
This section assumes you have already [installed the Blowfish theme]({{< ref "docs/installation" >}}).
Questa sezione presuppone che si sia già [installato il tema Blowfish]({{< ref "docs/installation" >}}).
{{< /alert >}}
</br>
{{< alert "fire" >}}
We just launched a CLI tool to help you get started with Blowfish. It will help you with installation and configuration. Install the CLI tool globally using:
Abbiamo appena lanciato uno strumento CLI per aiutarvi a iniziare con Blowfish. Vi aiuterà con l'installazione e la configurazione. Installate lo strumento CLI a livello globale utilizzando:
```bash
npx blowfish-tools
```

View file

@ -1,83 +1,82 @@
---
title: "Installation"
title: "Installazione"
date: 2020-08-16
draft: false
description: "How to install the Blowfish theme."
description: "Come installare il tema Blowfish."
slug: "installation"
tags: ["installation", "docs"]
series: ["Documentation"]
tags: ["installazione", "documenti"]
series: ["Documentazione"]
series_order: 2
---
Simply follow the standard Hugo [Quick Start](https://gohugo.io/getting-started/quick-start/) procedure to get up and running quickly.
Segui semplicemente la procedura standard [Avvio Rapido](https://gohugo.io/getting-started/quick-start/) di Hugo per iniziare subito.
Detailed installation instructions can be found below. Instructions for [updating the theme](#installing-updates) are also available.
Sono riportate le istruzioni dettagliate per l'installazione. Sono disponibili anche le istruzioni per [aggiornare il tema](#installazione-aggiornamenti).
## Installation
## Installazione
These instructions will get you up and running using Hugo and Blowfish from a completely blank state. Most of the dependencies mentioned in this guide can be installed using the package manager of choice for your platform.
Queste istruzioni ti consentiranno di iniziare a utilizzare Hugo e Blowfish partendo da uno stato completamente vuoto. La maggior parte delle dipendenze menzionate in questa guida possono essere installate utilizzando il gestore pacchetti corretti per la tua piattaforma.
### Install Hugo
### Installare Hugo
If you haven't used Hugo before, you will need to [install it onto your local machine](https://gohugo.io/getting-started/installing). You can check if it's already installed by running the command `hugo version`.
Se non hai mai utilizzato Hugo prima, dovrai [installarlo nella tua local machine] (https://gohugo.io/getting-started/installing).
Puoi verificare se hai già installato Hugo utilizzando il comando `hugo version`.
{{< alert >}}
Make sure you are using **Hugo version 0.87.0** or later as the theme takes advantage of some of the latest Hugo features.
Assicurati di usare la **versione 0.87.0 di Hugo** o successiva, poiché il tema sfrutta alcune delle ultime caratteristiche di Hugo.
{{< /alert >}}
You can find detailed installation instructions for your platform in the [Hugo docs](https://gohugo.io/getting-started/installing).
Puoi trovare le istruzioni dettagliate sull'installazione per la propria piattaforma in [Documenti Hugo](https://gohugo.io/getting-started/installing).
### Blowfish Tools (recommended)
### Strumenti Blowfish (raccomandato)
We just launched a new CLI tool to help you get started with Blowfish. It will create a new Hugo project, install the theme and set up the theme configuration files for you. It's still in beta so please [report any issues you find](https://github.com/nunocoracao/blowfish-tools).
Abbiamo appena lanciato un nuovo strumento CLI per aiutarti a iniziare con Blowfish. Questo ti permette di creare un nuovo progetto Hugo, di installare il tema e di impostare i file di configurazione del tema per te. È ancora in fase beta, quindi per favore [segnala qualsiasi problema che riscontri] (https://github.com/nunocoracao/blowfish-tools).
Install the CLI tool globally using npm (or other package manager):
Installa globalmente lo strumento CLI usando npm (o altri gestori di pacchetti):
```shell
npx blowfish-tools
```
or
oppure
```shell
npm i -g blowfish-tools
```
Then run the command `blowfish-tools` to start an interactive run which will guide you through creation and configuration use-cases.
Poi esegui il comando `blowfish-tools` per avviare un'esecuzione interattiva che ti guiderà attraverso la creazione e la configurazione dei casi d'uso.
```shell
blowfish-tools
```
You can also run the command `blowfish-tools new` to create a new Hugo project and install the theme in one go. Check the CLI help for more information.
È anche possibile eseguire il comando `blowfish-tools new` per creare un nuovo progetto Hugo e installare il tema in una sola volta. Per ulteriori informazioni, consulta la guida del CLI.
```shell
blowfish-tools new mynewsite
```
Here's a quick video of how fast it is to get started with Blowfish using the CLI tool:
Ecco un rapido video che ti mostra quanto sia veloce iniziare a utilizzare Blowfish con lo strumento CLI:
<iframe width="100%" height="350" src="https://www.youtube.com/embed/SgXhGb-7QbU?si=ce44baicuQ6zMeXz" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
### Install Manually
### Installazione Manuale
#### Create a new site
#### Crea un novo sito
Run the command `hugo new site mywebsite` to create a new Hugo site in a directory named `mywebsite`.
Esegui il comando `hugo new site mywebsite` per creare un nuovo sito di Hugo in una cartella chiamata `mywebsite`.
Note that you can name the project directory whatever you choose, but the instructions below will assume it's named `mywebsite`. If you use a different name, be sure to substitute it accordingly.
La cartella del progetto può essere chiamata come si vuole, ma le istruzioni che seguono presuppongono che si chiami `mywebsite`. Se si usa un nome diverso, sostituiscilo di conseguenza.
#### Download the Blowfish theme
#### Scaricare il tema Blowfish
There several different ways to install the Blowfish theme into your Hugo website. From easiest to most difficult to install and maintain, they are:
Esistono diversi modi per installare il tema Blowfish nel proprio sito web Hugo. Dal più facile al più difficile da installare e mantenere, sono:
- [Git submodule](#install-using-git) (recommended)
- [Hugo module](#install-using-hugo)
- [Manual file copy](#install-manually)
- [Copia manuale dei file](#install-manually)
If you're unsure, choose the Git submodule method.
Se non sei sicuro, scegli il metodo Git submodule.
##### Install using git
##### Installazione usando 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.
Questo è il metodo piu facile e veloce per mantere il tema aggiornato. Oltre **Hugo** e **Go**, dovrai assicurarti di avere **Git** installato nel tuo 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.
cambia la directory del tuo sito web Hugo (che hai creato sopra), inizializza un nuovo repository `git` e aggiungi Blowfish come sottomodulo.
```bash
cd mywebsite
@ -85,61 +84,61 @@ 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).
poi continua a [impostare i file di configurazione del tema](#set-up-theme-configuration-files).
##### Install using Hugo
##### Installazione usando Hugo
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.
Per questo metodo utilizzerai Hugo per gestire i tuoi temi. Hugo utilizza **Go** per inizializzare e gestire i moduli, quindi assicurati di aver installato `go` prima di procedere.
1. [Download](https://golang.org/dl/) and install Go. You can check if it's already installed by using the command `go version`.
1. [Scarica](https://golang.org/dl/) e installa Go. Puoi verificare se l'hai già installato utilizzando il comando `go version`.
{{< alert >}}
Make sure you are using **Go version 1.12** or later as Hugo requires this for modules to work correctly.
Assicurati di usare la **versione Go 1.12** o successive poiché Hugo lo richiede affinché i moduli funzionino correttamente.
{{< /alert >}}
2. From your Hugo project directory (that you created above), initialise modules for your website:
2. Dalla directory del tuo progetto Hugo (che hai creato sopra), inizializza i moduli per il tuo sito web:
```shell
# If you're managing your project on GitHub
hugo mod init github.com/<username>/<repo-name>
# Se gestisci il tuo progetto su GitHub
Hugo mod init github.com/<nomeutente>/<nome-repo>
# If you're managing your project locally
hugo mod init my-project
# Se gestisci il tuo progetto localmente
Hugo mod init my-project
```
3. Add the theme to your configuration by creating a new file `config/_default/module.toml` and adding the following:
3. Aggiungi il tema alla tua configurazione creando un nuovo file `config/_default/module.toml` e aggiungendo quanto segue:
```toml
[[imports]]
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).
4. Avvia il tuo server utilizzando `hugo server` e il tema verrà scaricato automaticamente.
5. Continua con [impostare i file di configurazione del tema](#set-up-theme-configuration-files).
##### Install manually
##### Installazione manuale
1. Scarica l'ultima versione del codice sorgente del tema.
1. Download the latest release of the theme source code.
{{< button href="https://github.com/nunocoracao/blowfish/releases/latest" target="_blank" >}}Scarica da Github{{< /button >}}
{{< button href="https://github.com/nunocoracao/blowfish/releases/latest" target="_blank" >}}Download from Github{{< /button >}}
"blowfish" e "themes/"
2. Estrai l'archivio, rinomina la cartella in `blowfish` spostala nella directory `themes/` all'interno della cartella principale del tuo progetto Hugo.
3. Continua con [impostare i file di configurazione del tema](#set-up-theme-configuration-files).
2. Extract the archive, rename the folder to `blowfish` and move it to the `themes/` directory inside your Hugo project's root folder.
3. Continue to [set up the theme configuration files](#set-up-theme-configuration-files).
#### Imposta i file di configurazione del tema
#### Set up theme configuration files
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. This will ensure you have all the correct theme settings and will enable you to easily customise the theme to your needs.
Nella cartella principale del tuo sito web, elimina il file `config.toml` generato da Hugo. Copia i file di configurazione `*.toml` dal tema nella tua cartella `config/_default/`. Ciò ti garantirà di avere tutte le impostazioni corrette del tema e ti consentirà di personalizzare facilmente il tema in base alle tue esigenze.
{{< alert >}}
**Note:** You should not overwrite the `module.toml` file if one already exists in your project!
**Note:** Non dovresti sovrascrivere il file `module.toml` se ne esiste già uno nel tuo progetto!
{{< /alert >}}
Depending on how you installed the theme you will find the theme config files in different places:
A seconda di come hai installato il tema, troverai i file di configurazione del tema in posti diversi:
- **Hugo Modules:** 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
- **Git submodule or Manual install:** `themes/blowfish/config/_default`
- **Hugo modules:** Nella directory della cache di Hugo o [scarica una copia](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/ tree/main/config/_default) da GitHub
- **Git submodule o installazione manuale:** `themes/blowfish/config/_default`
Once you've copied the files, your config folder should look like this:
Una volta che hai copiato i file, la tua cartella delle configurazioni dovrebbe essere cosi:
```shell
config/_default/
@ -147,64 +146,64 @@ config/_default/
├─ languages.en.toml
├─ markup.toml
├─ menus.en.toml
├─ module.toml # if you installed using Hugo Modules
├─ module.toml # se hai usato Hugo modules come installazione
└─ params.toml
```
{{< alert >}}
**Important:** If you didn't use Hugo Modules to install Blowfish, you must add the line `theme = "blowfish"` to the top of your `config.toml` file.
**Importante:** Se non hai utilizzato Hugo Modules per installare Blowfish, devi aggiungere la riga `theme = "blowfish"` all'inizio del tuo file `config.toml`.
{{< /alert >}}
### Next steps
### Passo successivo
The basic Blowfish installation is now complete. Continue to the [Getting Started]({{< ref "getting-started" >}}) section to learn more about configuring the theme.
L'installazione di base di Blowfish è ora completa. Continua alla sezione [Per iniziare]({{< ref "getting-started" >}}) per ulteriori informazioni sulla configurazione del tema.
---
## Installing updates
## Installazione degli aggiornamenti
From time to time there will be [new releases](https://github.com/nunocoracao/blowfish/releases) posted that apply fixes and add new functionality to the theme. In order to take advantage of these changes, you will need to update the theme files on your website.
Di tanto in tanto verranno pubblicate [nuove versioni](https://github.com/nunocoracao/blowfish/releases) che applicano correzioni e aggiungono nuove funzionalità al tema. Per sfruttare questi cambiamenti, dovrai aggiornare i file del tema sul tuo sito web.
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.
Il modo in cui procedere dipenderà dal metodo di installazione scelto al momento dell'installazione originale del tema. Le istruzioni per ciascun metodo sono disponibili di seguito.
- [Git submodule](#update-using-git)
- [Hugo module](#update-using-hugo)
- [Manual file copy](#update-manually)
- [Copia manuale del file](#aggiornamento-manuale)
### Update using git
### Aggiornamento utilizzando 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:
I sottomoduli Git possono essere aggiornati utilizzando il comando `git`. Esegui semplicemente il comando seguente e l'ultima versione del tema verrà scaricata nel tuo repository locale:
```shell
git submodule update --remote --merge
```
Once the submodule has been updated, rebuild your site and check everything works as expected.
Una volta aggiornato il sottomodulo, riavvia il tuo sito e verifica che tutto funzioni come previsto.
### Update using Hugo
### Aggiornamento utilizzando Hugo
Hugo makes updating modules super easy. Simply change into your project directory and execute the following command:
Hugo rende l'aggiornamento dei moduli estremamente semplice. Basta passare alla directory del progetto ed eseguire il seguente comando:
```shell
hugo mod get -u
```
Hugo will automatically update any modules that are required for your project. It does this by inspecting your `module.toml` and `go.mod` files. If you have any issues with the update, check to ensure these files are still configured correctly.
Hugo aggiornerà automaticamente tutti i moduli richiesti per il tuo progetto. Lo fa controllando i file `module.toml` e `go.mod`. In caso di problemi con l'aggiornamento, assicurati che questi file siano ancora configurati correttamente.
Then simply rebuild your site and check everything works as expected.
Quindi riavvia semplicemente il tuo sito e verifica che tutto funzioni come previsto.
### Update manually
### Aggiornamenti manuali
Updating Blowfish manually requires you to download the latest copy of the theme and replace the old version in your project.
L'aggiornamento manuale di Blowfish richiede il download dell'ultima copia del tema e la sostituzione della vecchia versione nel progetto.
{{< alert >}}
Note that any local customisations you have made to the theme files will be lost during this process.
Tieni presente che ogni personalizzazione locale apportata ai file del tema andranno perse durante questo processo.
{{< /alert >}}
1. Download the latest release of the theme source code.
1. Scarica l'ultima versione del codice sorgente del tema.
{{< button href="https://github.com/nunocoracao/blowfish/releases/latest" target="_blank" >}}Download from Github{{< /button >}}
{{< button href="https://github.com/nunocoracao/blowfish/releases/latest" target="_blank" >}}Scarica da Github{{< /button >}}
2. Extract the archive, rename the folder to `blowfish` and move it to the `themes/` directory inside your Hugo project's root folder. You will need to overwrite the existing directory to replace all the theme files.
2. Estrai l'archivio, rinomina la cartella in "blowfish" e spostala nella directory "themes/" all'interno della cartella principale del tuo progetto Hugo. Dovrai sovrascrivere la directory esistente per sostituire tutti i file del tema.
3. Rebuild your site and check everything works as expected.
3. Riavvia il tuo sito e verifica che tutto funzioni come previsto.

View file

@ -9,7 +9,7 @@ series: ["部署教程"]
series_order: 2
---
如果想快速上,可以按照标准的 Hugo [快速启动](https://gohugo.io/getting-started/quick-start/) 文档。
如果想快速上,可以按照标准的 Hugo [快速启动](https://gohugo.io/getting-started/quick-start/) 文档。
更详细的安装如下,[更新主题](#installing-updates)的教程也可以看此文档。

View file

@ -40,6 +40,19 @@ googleAnalytics = "UA-PROPERTY_ID"
googleAnalytics = "G-MEASUREMENT_ID"
```
### Umami Analytics
To enable Umami Analytics support, simply provide your [Umami tracking code](https://umami.is/docs/collect-data) in the `config/_default/params.toml` file.
If you also use the custom domain feature of Umami and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Umami DNS (analytics.umami.is).
```toml
# config/_default/params.toml
[umamiAnalytics]
websiteid = "ABC12345"
domain = "llama.yoursite.com"
```
### Custom analytics providers
If you wish to use a different analytics provider on your website you can also override the analytics partial and provide your own script. Simply create the file `layouts/partials/extend-head.html` in your project and it will automatically include it in the `<head>` of the website.

View file

@ -40,6 +40,19 @@ googleAnalytics = "UA-PROPERTY_ID"
googleAnalytics = "G-MEASUREMENT_ID"
```
### Umami Analytics
To enable Umami Analytics support, simply provide your [Umami tracking code](https://umami.is/docs/collect-data) in the `config/_default/params.toml` file.
If you also use the custom domain feature of Umami and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Umami DNS (analytics.umami.is).
```toml
# config/_default/params.toml
[umamiAnalytics]
websiteid = "ABC12345"
domain = "llama.yoursite.com"
```
### Custom analytics providers
If you wish to use a different analytics provider on your website you can also override the analytics partial and provide your own script. Simply create the file `layouts/partials/extend-head.html` in your project and it will automatically include it in the `<head>` of the website.

View file

@ -11,7 +11,7 @@ series_order: 9
## Analytics
Blowfish provides built-in support for Fathom Analytics and Google Analytics. Fathom is a paid alternative to Google Analytics that respects user privacy.
Blowfish provides built-in support for Fathom Analytics, Google Analytics annd Umami Analytics. Fathom is a paid alternative to Google Analytics that respects user privacy.
### Fathom Analytics
@ -40,6 +40,19 @@ googleAnalytics = "UA-PROPERTY_ID"
googleAnalytics = "G-MEASUREMENT_ID"
```
### Umami Analytics
To enable Umami Analytics support, simply provide your [Umami tracking code](https://umami.is/docs/collect-data) in the `config/_default/params.toml` file.
If you also use the custom domain feature of Umami and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Umami DNS (analytics.umami.is).
```toml
# config/_default/params.toml
[umamiAnalytics]
websiteid = "ABC12345"
domain = "llama.yoursite.com"
```
### Custom analytics providers
If you wish to use a different analytics provider on your website you can also override the analytics partial and provide your own script. Simply create the file `layouts/partials/extend-head.html` in your project and it will automatically include it in the `<head>` of the website.

View file

@ -9,13 +9,15 @@ series: ["部署教程"]
series_order: 9
---
## 数据分析
## 站点分析
Blowfish 提供对 Fathom Analytics 和 Google Analytics 的内置支持。Fathom 是 Google Analytics 的付费替代品,尊重用户隐私
Blowfish 支持了 Fathom、Google 和 Umami。Fathom 和 Umami 都是开源、简单、且注重隐私的站点分析服务,他们可以很好地替代 Google 分析。Fathom 和 Umami 都有公有云的付费版本,当然你也可以自己手动部署开源版
### Fathom Analytics
要启用 Fathom Analytics 支持,只需在 `config/_default/params.toml` 文件中提供您的 Fathom 站点代码。如果您还使用 Fathom 的自定义域功能,并希望从您的域中提供脚本,还可以额外提供 `domain` 配置值。如果不提供 `domain` 值,脚本将直接从 Fathom DNS 加载。
### Fathom
要启用 Fathom Analytics 支持,只需在 `config/_default/params.toml` 文件中提供您的 Fathom 站点代码。如果您还使用 Fathom 的自定义域功能,并希望从您的域中提供脚本,还可以额外提供 `domain` 配置值。如果不提供 `domain` 值,脚本将直接从 Fath只需要在 `config/_default/params.toml` 文件提供你的 Fathom 站点代码,就可以快速支持 Fathom 站点分析。
如果你想使用自定义域名来获取跟踪脚本, 那么需要提供 `domain` 参数,否则会从 Fathom 云服务版的地址 (cdn.usefathom.com) 获取脚本。
```toml
# config/_default/params.toml
@ -25,38 +27,55 @@ Blowfish 提供对 Fathom Analytics 和 Google Analytics 的内置支持。Fatho
domain = "llama.yoursite.com"
```
### Google Analytics
### Google
Google Analytics 支持通过 Hugo 内部 partial 提供。只需在 `config/_default/config.toml` 文件中提供 `googleAnalytics` 密钥,脚本就会自动添加。
Hugo partial 本身已经支持了 Google 站点分析。只需要在 `config/_default/config.toml` 文件添加 `googleAnalytics` 参数即可,跟踪脚本会自动添加。
版本3 (analytics.js) 和版本4 (gtag.js) 都是支持的,参考如下示例:
根据提供的配置值,版本 3analytics.js和版本 4gtag.js均可支持
```toml
# config/_default/config.toml
# version 3
# 版本 3
googleAnalytics = "UA-PROPERTY_ID"
# version 4
# 版本 4
googleAnalytics = "G-MEASUREMENT_ID"
```
### 自定义数据分析提供商
如果您希望在网站上使用不同的分析提供商,也可以覆盖分析部分并提供自己的脚本。只需在项目中创建`layouts/partials/extend-head.html`文件,它就会自动将其包含在网站的`<head>`中。
### Umami
只需要在 `config/_default/params.toml` 文件提供你的 [Umami 跟踪代码](https://umami.is/docs/collect-data),就可以快速支持 Umami 站点分析。
如果你想使用自定义域名来获取跟踪脚本, 那么需要提供 `domain` 参数,否则会从 Umami 云服务版的地址 (analytics.umami.is) 获取脚本。
```toml
# config/_default/params.toml
[umamiAnalytics]
websiteid = "ABC12345"
domain = "llama.yoursite.com"
```
### 提供自定义站点分析
如果你想在你的网站提供其他站点分析,你可以自己提供脚本,并覆盖 Blowfish 主题中内置的 partial。
只需要创建 `layouts/partials/extend-head.html` 文件并在内容中提供脚本即可Blowfish 主题会自动将 `extend-head.html` 中的内容添加到整个站点的 `<head>` 中。
## 评论
为了在文章中添加评论Blowfish 可在每篇文章页面底部引入评论 partial。只需提供一个 `layouts/partials/comments.html`即可,其中要包含显示所选评论所需的代码。
Blowfish 支持了在每篇文章底部添加一个评论功能。只需要提供一个 `layouts/partials/comments.html` 文件,并在其中添加显示评论的代码即可
您可以使用 Hugo 内置的 Disqus 模板,也可以提供自己的自定义代码。更多信息请参阅 [Hugo 文档](https://gohugo.io/content-management/comments/)。
你可以使用 Hugo 中内置的 Disqus 模板,也可以提供自定义代码。更多内容和细节可以参考 [Hugo 文档](https://gohugo.io/content-management/comments/).
一旦提供了 partial就可以使用 "showComments "参数对评论在不同页面的显示与否进行更精细的控制。该值可以在 "params.toml"[配置文件]{{< ref "configuration#theme-parameters" >}})中进行主题级别的设置,也可以在[front matter]{{< ref "front-matter" >}})中按每篇文章设置。该参数的默认值为 "false",因此必须在其中一个位置将其设置为 "true",才能显示评论。
一旦提供了评论的 partial你就可以使用 `showComments` 更细致地控制评论的显隐。此参数可以在 `params.toml` [配置文件]({{< ref "configuration#theme-parameters" >}}) 中全局设置,也可以在每篇文章的 [扉页参数]({{< ref "front-matter" >}}) 中单独针对特定文章设置。该参数默认为 `false`,因此需要在上面两个位置设置为 `true` 才能显示评论。
## Favicons 图标
## 网站图标Favicons
Blowfish 提供了一套默认的纯色图标供用户使用,但用户也可以提供自己的图标资源来覆盖这些图标。获取最新 favicon 资源的最简单方法是使用第三方提供商生成,如 [favicon.io](https://favicon.io)。
Blowfish 提供了一套空白网站图标以便快速上手,但你可以提供自己的资源来覆盖他们。想要获取新的图标资源最简单的方法是使用第三方提供商,如 [favicon.io](https://favicon.io)。
网站图标资源的位置在 `static/` 文件夹中,并务必按照如下的名称命名。如果你使用了[favicon.io](https://favicon.io),那么下载下来的文件名和下面的示例完全一致;当然你也可以通过别的方式提供,记得重命名就行。
图标资源应直接放在网站的 `static/` 文件夹中,并按以下列表命名。如果使用 [favicon.io](https://favicon.io),这些文件名将自动为您生成,但您也可以根据需要提供自己的资源。
```shell
static/
@ -69,19 +88,22 @@ static/
└─ site.webmanifest
```
或者,您也可以完全覆盖默认的 favicon 行为,提供自己的 favicon HTML 标签和资源。只需在项目中提供一个 `layouts/partials/favicons.html` 文件,该文件就会被加入网站的 `<head>` 中,取代默认资源。
## Icon 图标
与 [图标简码]{{< ref "shortcodes#icon" >}})类似,您也可以通过使用 Blowfish 的 `icon.html` partial在自己的模板和 partial 中加入图标。该部分包含一个参数,即要包含的图标名称。
**Example:**
**示例:**
```go
{{ partial "icon.html" "github" }}
```
图标使用 Hugo pipelines 填充因此非常灵活。Blowfish 内置了大量用于社交、链接和其他用途的图标。请查看[图标示例]{{< ref "samples/icons" >}})页面,查看支持图标的完整列表。
图标使用 Hugo 管道填充因此非常灵活。Blowfish 内置了大量用于社交、链接和其他用途的图标。请查看[图标示例]{{< ref "samples/icons" >}})页面,查看支持图标的完整列表。
可以通过在项目的 `assets/icons/` 目录中提供自己的图标资源来添加自定义图标。然后,可以通过使用 SVG 文件名(不含`.svg`扩展名)在局部中引用图标。
@ -95,7 +117,7 @@ Blowfish 还提供了许多扩展 partial可以扩展基本功能。
如果您希望在文章链接后插入附加代码,请创建一个 `layouts/partials/extend-article-link.html` 文件。如果与[`badge`]({{< ref "shortcodes#badge" >}})简码结合使用,该功能将尤为强大,可用于突出显示某些文章的元数据。
### 页眉和页脚
### 头部和尾部
本主题允许在模板的`<head>`和`<footer>`部分直接插入附加代码。这些代码可用于提供不属于主题的脚本或其他逻辑。

View file

@ -739,16 +739,38 @@ A shortcut to embed youtube videos using the [lite-youtube-embed](https://github
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ----------------------------------- |
| --------- | -------------------------------------------- |
| `id` | [String] Youtube video id to embed. |
| `label` | [String] Label for the video |
| `params` | [String] Extras parameters for video playing |
<!-- prettier-ignore-end -->
**Example 1:**
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" */>}}
```
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" >}}
**Example 2:**
You can use all of Youtube's [player parameters](https://developers.google.com/youtube/player_parameters#Parameters) for the `params` variable, as demonstrated below:
> This video will start after 130 seconds (2m10)
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130" */>}}
```
> This video will not have UI controls, will start playing at 130 seconds and will stop 10 seconds later.
To concatenate multiple options as shown below, you need to add the `&` character between them.
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" */>}}
```
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" */>}}
More informations can be found on the [youtubeLite GitHub repo](https://github.com/paulirish/lite-youtube-embed/blob/master/readme.md#custom-player-parameters) and Youtube's [player parameters](https://developers.google.com/youtube/player_parameters#Parameters) page.

View file

@ -1,42 +1,42 @@
---
title: "Welcome to Blowfish"
title: "Benvenuti a Blowfish"
date: 2022-01-19
draft: false
description: "Discover what's new in Blowfish version 2.0."
tags: ["new", "docs"]
series: ["Documentation"]
description: "Scopri le novità della versione 2.0 di Blowfish."
tags: ["novità", "documenti"]
series: ["Documentazione"]
series_order: 1
---
{{< lead >}}
Blowfish is packed with tons of features.
Blowfish è ricco di tantissime funzionalità.
{{< /lead >}}
The original aim of Blowfish was to develop a theme that was simple and lightweight. The theme is a fork of <a target="_blank" href="https://github.com/nunocoracao/congo">Congo</a> and expands its initial vision.
Lo scopo originale di Blowfish era quello di sviluppare un tema semplice e leggero. Il tema è un fork del <a target="_blank" href="https://github.com/nunocoracao/congo">Congo</a> e ne espande la visione iniziale.
## Tailwind CSS 3.0
Tailwind CSS is at the heart of Blowfish and this release contains the very latest [Tailwind CSS version 3](https://tailwindcss.com/blog/tailwindcss-v3). It brings with it performance optimisations and support for some great new CSS features.
Tailwind CSS è il cuore di Blowfish e questa versione contiene l'ultima [Tailwind CSS versione 3](https://tailwindcss.com/blog/tailwindcss-v3). Porta con sé ottimizzazioni delle prestazioni e supporto per alcune nuove fantastiche funzionalità CSS.
{{< youtube "TmWIrBPE6Bc" >}}
## Multilingual support
## Supporto multilingue
A highly requested feature, Blowfish is now multilingual! If you publish your content in multiple languages, the site will be built with all the translations available.
Blowfish è ora multilingue! Una funzionalità molto richiesta. Se pubblichi i tuoi contenuti in più lingue, il sito verrà realizzato con tutte le traduzioni disponibili.
<div class="text-2xl text-center" style="font-size: 2.8rem">:gb: :de: :fr: :es: :cn: :brazil: :tr: :bangladesh:</div>
Thanks to submissions from the community, Blowfish has already been translated into [twenty-six languages](https://github.com/nunocoracao/blowfish/tree/main/i18n) with more to be added over time. By the way, [pull requests](https://github.com/nunocoracao/blowfish/pulls) for new languages are always welcome!
Grazie ai contributi della community, Blowfish è già stato tradotto in [ventisei lingue](https://github.com/nunocoracao/blowfish/tree/main/i18n) e altre verranno aggiunte nel tempo. A proposito, le [richieste pull](https://github.com/nunocoracao/blowfish/pulls) per nuove lingue sono sempre benvenute!
## RTL language support
## Supporto per la lingua RTL
One of the benefits of the new Tailwind and Multilingual features is the ability to add RTL language support. When enabled, the entire site will reflow content from right-to-left. Every element in the theme has been restyled to ensure it looks great in this mode which aids authors who wish to generate content in RTL languages.
Uno dei vantaggi delle nuove funzionalità Tailwind e Multilingual è la possibilità di aggiungere il supporto della lingua RTL. Se abilitato, l'intero sito ridiscorrerà i contenuti da destra a sinistra. Ogni elemento del tema è stato ridisegnato per garantire che abbia un bell'aspetto in questa modalità che aiuta gli autori che desiderano generare contenuti nelle lingue RTL.
RTL is controlled on a per-language basis so you can mix and match both RTL and LTR content in your projects and the theme will respond accordingly.
RTL è controllato in base alla lingua, quindi puoi mescolare e abbinare sia il contenuto RTL che LTR nei tuoi progetti e il tema risponderà di conseguenza.
## Automatic image resizing
## Ridimensionamento automatico delle immagini
A big change in Blowfish 2.0 is the addition of automatic image resizing. Using the power of Hugo Pipes, images in Markdown content are now automatically scaled to different output sizes. These are then presented using HTML `srcset` attributes enabling optimised file sizes to be served to your site visitors.
Un grande cambiamento in Blowfish 2.0 è l'aggiunta del ridimensionamento automatico delle immagini. Utilizzando la potenza di Hugo Pipes, le immagini nei contenuti Markdown vengono ora ridimensionate automaticamente in diverse dimensioni di output. Questi vengono poi presentati utilizzando gli attributi HTML "srcset" che consentono di offrire dimensioni di file ottimizzate ai visitatori del tuo sito.
![](image-resizing.png)
@ -53,27 +53,27 @@ A big change in Blowfish 2.0 is the addition of automatic image resizing. Using
/>
```
Best of all there's nothing you need to change! Simply insert standard Markdown image syntax and let the theme do the rest. If you want a little more control, the `figure` shortcode has been completely rewritten to provide the same resizing benefits.
La cosa interessante è che non c'è nulla che devi cambiare! Inserisci semplicemente la sintassi standard dell'immagine Markdown e lascia che il tema faccia il resto. Se desideri un po' più di controllo, lo shortcode `figure` è stato completamente riscritto per fornire gli stessi vantaggi di ridimensionamento.
## Site search
## Ricerca nel sito
Powered by [Fuse.js](https://fusejs.io), site search allows visitors to quickly and easily find your content. All searches are performed client-side meaning there's nothing to configure on the server and queries are performed super fast. Simply enable the feature in your site configuration and you're all set. Oh, and it also supports full keyboard navigation!
Basata su [Fuse.js](https://fusejs.io), la ricerca sul sito consente ai visitatori di trovare rapidamente e facilmente i tuoi contenuti. Tutte le ricerche vengono eseguite lato client, il che significa che non c'è nulla da configurare sul server e le query vengono eseguite molto velocemente. Abilita semplicemente la funzione nella configurazione del tuo sito e tutto è pronto. Oh, e supporta anche la navigazione completa tramite tastiera!
## Tables of contents
## Sommario
A highly requested feature, Blowfish now supports tables of contents on article pages. You can see it in action on this page. The contents are fully responsive and will adjust to take advantage of the space available at different screen resolutions.
Una funzionalità molto richiesta, Blowfish ora supporta i sommari nelle pagine degli articoli. Puoi vedere come funziona in questa pagina. I contenuti sono completamente reattivi e si adatteranno per sfruttare lo spazio disponibile con diverse risoluzioni dello schermo.
Available on a global or per article basis, the table of contents can be fully customised using standard Hugo configuration values, allowing you to adjust the behaviour to suit your project.
Disponibile su base globale o per articolo, il sommario può essere completamente personalizzato utilizzando i valori di configurazione Hugo standard, consentendoti di adattare il comportamento al tuo progetto.
## Accessibility improvements
## Miglioramenti dell'accessibilità
From adding ARIA descriptions to more items or simply adjusting the contrast of certain text elements, this release is the most accessible yet.
Dall'aggiunta di descrizioni ARIA a più elementi o semplicemente dalla regolazione del contrasto di alcuni elementi di testo, questa versione è la più accessibile finora.
Version 2 also introduces "skip to content" and "scroll to top" links that enable quick navigation. There's also keyboard shortcuts for enabling items like search without reaching for the mouse.
La versione 2 introduce anche i collegamenti "salta al contenuto" e "scorri verso l'alto" che consentono una navigazione rapida. Ci sono anche scorciatoie da tastiera per abilitare elementi come la ricerca senza raggiungere il mouse.
The new image resizing features also provide full control over `alt` and `title` elements enabling an accessible experience for all visitors.
Le nuove funzionalità di ridimensionamento delle immagini forniscono inoltre il pieno controllo sugli elementi "alt" e "titolo" consentendo un'esperienza accessibile a tutti i visitatori.
## A whole lot more
## Molto altro ancora
There's countless other features to explore. From being able to display taxonomies on articles and list pages, to using the new `headline` author parameter to customise your homepage. There's also improved JSON-LD structured data which further optimises SEO performance.
Ci sono innumerevoli altre funzioni da esplorare. Dalla possibilità di visualizzare tassonomie su articoli e pagine di elenchi, all'uso del nuovo parametro autore `headline` per personalizzare la propria homepage. Sono stati inoltre migliorati i dati strutturati JSON-LD, che ottimizzano ulteriormente le prestazioni SEO.

View file

@ -1,6 +1,6 @@
---
title: "Samples"
description: "See what's possible with Blowfish."
title: "サンプル"
description: "Blowfish で何ができるのか閲覧する。"
cascade:
showEdit: false
@ -9,11 +9,11 @@ cascade:
---
{{< lead >}}
Blowfish brings your content to life. :heart_eyes:
Blowfish はあなたのコンテンツに命を宿します。:heart_eyes:
{{< /lead >}}
This section contains some demo pages that show how Blowfish renders different types of content. You can also see an example [taxonomy listing]({{< ref "tags" >}}) page.
このセクションは、 Blowfish で様々な種類のコンテンツをどのように表示するのかを紹介するデモページを含みます。例としては[分類一覧]({{< ref "tags" >}})ページも参考になります。
_**Sidenote:** This page is just a standard Blowfish article listing and Hugo has been configured to generate a `samples` content type and display article summaries._
_**サイドノート:** このページは一般的な Blowfish のリストで、 Hugo が生成した `samples` コンテンツタイプと記事の要約を表示する様に設定しています。_
---

View file

@ -1,28 +1,28 @@
---
title: "Charts"
title: "図表"
date: 2019-03-06
description: "Guide to Chart.js usage in Blowfish"
summary: "Blowfish includes Chart.js for powerful charts and data visualisations."
description: "Blowfish での Chart.js の利用方法のガイド"
summary: "Blowfish は強力な図表とデータの視覚化のために Chart.js を内蔵しています。"
tags: ["chart", "sample", "graph", "shortcodes"]
showDate: false
type: 'sample'
---
Blowfish includes support for Chart.js using the `chart` shortcode. Simply wrap the chart markup within the shortcode. Blowfish automatically themes charts to match the configured `colorScheme` parameter, however the colours can be customised using normal Chart.js syntax.
Blowfish は Chart.js の `chart` ショートコードを内蔵し、利用をサポートしています。ショートコードでグラフのマークアップを囲むだけです。 Blowfish は `colorScheme` パラメータで自動的にグラフのテーマが適応されますが、通常の Chart.js 構文を利用して色をカスタマイズすることも可能です。
Refer to the [chart shortcode]({{< ref "docs/shortcodes#chart" >}}) docs for more details.
[グラフのショートコード]({{< ref "docs/shortcodes#chart" >}})資料で更に詳細を参照出来ます。
The examples below are a small selection taken from the [official Chart.js docs](https://www.chartjs.org/docs/latest/samples). You can also [view the page source](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/charts/index.md) on GitHub to see the markup.
以下は [Chart.js 公式資料](https://www.chartjs.org/docs/latest/samples)から抜粋した例です。 GitHub でマークアップを[ページソースで見る](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/charts/index.md)ことができます。
## Bar chart
## 棒グラフ
<!-- prettier-ignore-start -->
{{< chart >}}
type: 'bar',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月'],
datasets: [{
label: 'My First Dataset',
label: '初めてのデータセット',
data: [65, 59, 80, 81, 56, 55, 40],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
@ -48,15 +48,15 @@ data: {
{{< /chart >}}
<!-- prettier-ignore-end -->
## Line chart
## 折れ線グラフ
<!-- prettier-ignore-start -->
{{< chart >}}
type: 'line',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月'],
datasets: [{
label: 'My First Dataset',
label: '初めてのデータセット',
data: [65, 59, 80, 81, 56, 55, 40],
tension: 0.2
}]
@ -64,15 +64,15 @@ data: {
{{< /chart >}}
<!-- prettier-ignore-end -->
## Doughnut chart
## 円グラフ
<!-- prettier-ignore-start -->
{{< chart >}}
type: 'doughnut',
data: {
labels: ['Red', 'Blue', 'Yellow'],
labels: ['赤色', '青色', '黄色'],
datasets: [{
label: 'My First Dataset',
label: '初めてのデータセット',
data: [300, 50, 100],
backgroundColor: [
'rgba(255, 99, 132, 0.7)',

View file

@ -1,30 +1,30 @@
---
title: "Diagrams and Flowcharts"
title: "ダイアグラムとフローチャート"
date: 2019-03-06
description: "Guide to Mermaid usage in Blowfish"
summary: "It's easy to add diagrams and flowcharts to articles using Mermaid."
description: "Blowfish での Mermaid の利用方法についてのガイド"
summary: "Mermaid を利用して簡単に図やフローチャートを記事に追加する方法。"
tags: ["mermaid", "sample", "diagram", "shortcodes"]
type: 'sample'
---
Mermaid diagrams are supported in Blowfish using the `mermaid` shortcode. Simply wrap the diagram markup within the shortcode. Blowfish automatically themes Mermaid diagrams to match the configured `colorScheme` parameter.
Mermaid 図は `mermaid` ショートコードを使うことで Blowfish でサポートされています。ダイヤグラムのマークアップをショートコードを囲むだけです。 Blowfish は設定された `colorScheme` パラメータに合うように自動T系に Mermaid ダイヤグラムをテーマ化します。
Refer to the [mermaid shortcode]({{< ref "docs/shortcodes#mermaid" >}}) docs for more details.
[mermaid ショートコード]({{< ref "docs/shortcodes#mermaid" >}})資料にてより詳細を参照できます。
The examples below are a small selection taken from the [official Mermaid docs](https://mermaid-js.github.io/mermaid/). You can also [view the page source](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/diagrams-flowcharts/index.md) on GitHub to see the markup.
以下の例は [Mermaid 公式資料](https://mermaid-js.github.io/mermaid/)から抜粋した一分です。GitHub の[ページソース](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/diagrams-flowcharts/index.md)でマークアップを確認することができます。
## Flowchart
## フローチャート
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[/Another/]
C ==>|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[Car]
subgraph Section
A[クリスマス] -->|収入| B(買い物にいく)
B --> C{考える}
B --> G[//]
C ==>|1| D[ノートパソコン]
C -->|2| E[iPhone]
C -->|3| F[車]
subgraph セクション
C
D
E
@ -34,29 +34,29 @@ end
{{< /mermaid >}}
</div>
## Sequence diagram
## 順序図
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
sequenceDiagram
autonumber
par Action 1
Alice->>John: Hello John, how are you?
and Action 2
Alice->>Bob: Hello Bob, how are you?
par 行動 1
アリス->>ジョン: こんにちはジョン、お元気ですか?
and 行動 2
アリス->>ボブ: こんにちはボブ、お元気ですか?
end
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
Note right of John: John is perceptive
John-->>-Alice: I feel great!
loop Every minute
John-->Alice: Great!
アリス->>+ジョン: こんにちはジョン、お元気ですか?
アリス->>+ジョン: ジョン、聞こえていますか?
ジョン-->>-アリス: こんにちはアリス、聞こえています!
Note right of ジョン: ジョンは察しがよい
ジョン-->>-アリス: とても気分がいいです!
loop 毎分
ジョン-->アリス: すばらしい!
end
{{< /mermaid >}}
</div>
## Class diagram
## クラス図
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
@ -84,7 +84,7 @@ class Zebra{
{{< /mermaid >}}
</div>
## Entity relationship diagram
## 主従関係図
<div style="background-color:white; padding: 20px">
{{< mermaid >}}

View file

@ -1,20 +1,20 @@
---
title: "Emoji :parachute:"
title: "絵文字 :parachute:"
date: 2019-03-05
description: "Guide to Emoji usage in Blowfish"
description: "Blowfihs での絵文字の利用方法についてのガイド"
summary: "📖🏞️🧗🏽🐉🧙🏽‍♂️🧚🏽👸"
tags: ["emoji", "sample"]
type: 'sample'
---
Emoji is supported throughout Blowfish by default. Emoji can be used in titles, menu items and article content.
絵文字は Blowfish を通してデフォルトでサポートされています。絵文字はタイトル、メニューアイテム、そして記事のコンテンツで利用可能です。
{{< alert >}}
**Note:** The rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack.
**ノート:** これらの図形のレンダリングはブラウザとプラットフォームに依存します。絵文字をスタイルするには、サードパーティ製の絵文字フォントを利用するか、フォントスタックを利用します。
{{< /alert >}}
Emoji replacements are automatic throughout Blowfish, so you can use shorthand codes in your content and front matter and they will be converted to their corresponding symbols at build time.
絵文字の置換は Blowfish 全体を通して自動的に行われるため、コンテンツや表で省略符号を利用しても、ビルド時に対応する記号に変換されます。
**Example:** `see_no_evil` :see_no_evil:, `hear_no_evil` :hear_no_evil:, `speak_no_evil` :speak_no_evil:.
**:** `see_no_evil` :see_no_evil:, `hear_no_evil` :hear_no_evil:, `speak_no_evil` :speak_no_evil:
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
[絵文字チートシート](http://www.emoji-cheat-sheet.com/)は絵文字ショートハンドコードのための便利な参照ページです。

View file

@ -1,8 +1,8 @@
---
title: "An External Article"
title: "外部の記事"
date: 2019-01-24
externalUrl: "https://nunocoracao.com/projects/"
summary: "The `externalUrl` front matter parameter can link to any URL."
summary: "`externalUrl` 表示は任意の URL にリンクすることができます。"
showReadingTime: true
_build:
render: "false"
@ -10,6 +10,6 @@ _build:
type: 'sample'
---
This page uses the `externalUrl` front matter parameter to link to an article outside of this Hugo website.
このページは、 `externalUrl` 表示パラメータを利用して、この Hugo ウェブサイト外の記事とリンクしています。
It's great for things like linking to posts on Medium or to research papers you may have hosted on third party websites.
Medium の投稿へのリンクや、サードパーティのウェブサイトでホストしている研究論文へのリンクなどに最適です。

View file

@ -1,114 +1,114 @@
---
title: "Icons"
title: "アイコン"
date: 2020-08-14
lastmod: 2022-03-09
draft: false
description: "Icon support in Blowfish."
description: "Blowfish でサポートしているアイコン。"
slug: "icons"
tags: ["icons", "sample", "shortcodes"]
type: 'sample'
---
Blowfish has built-in support for a number of [FontAwesome 6](https://fontawesome.com/icons) icons. These can be included in your website through either the [icon partial]({{< ref "docs/partials#icon" >}}) or [icon shortcode]({{< ref "docs/shortcodes#icon" >}}).
Blowfish はいくつもの [FontAwesome 6](https://fontawesome.com/icons) のアイコンを組み込み、サポートしています。これらは[アイコンパーシャル]({{< ref "docs/partials#icon" >}})または[アイコンショートコード]({{< ref "docs/shortcodes#icon" >}})のどちらかを利用してウェブサイトに含めることが出来ます。
Additionally, custom icons are also fully supported. Simply provide your own SVG icon assets by placing them in the `assets/icons/` directory in the root of your project. Any icons in the icons directory will then be available to use throughout the theme. In order achieve automatic color filling every SVG path needs fill="currentColor" XML attribute.
加えて、カスタムアイコンも完全にサポートされています。プロジェクトのルートにある `assets/icons/` ディレクトリーに SVG アイコンアセットを置くだけです。アイコンディレクトリ内のアイコンはテーマ全体で利用可能になります。自動的に色を塗りつぶすために、全ての SVG パスは fill="currentColor" の XML 属性が必要です。
The full list of built-in icons and their corresponding names can referenced below.
組み込んでいるアイコンと対応する名称の全リストは以下を参照してください。
| Icon name | Preview |
| アイコン名 | プレビュー |
| -------------------- | --------------------------------- |
| amazon | {{< icon amazon >}} |
| apple | {{< icon apple >}} |
| bars | {{< icon bars >}} |
| bell | {{< icon bell >}} |
| バー | {{< icon bars >}} |
| ベル | {{< icon bell >}} |
| blogger | {{< icon blogger >}} |
| bluesky | {{< icon bluesky >}} |
| bomb | {{< icon bomb >}} |
| bug | {{< icon bug >}} |
| check | {{< icon check >}} |
| circle-info | {{< icon circle-info >}} |
| code | {{< icon code>}} |
| ボム | {{< icon bomb >}} |
| バグ | {{< icon bug >}} |
| チェック | {{< icon check >}} |
| 情報 (円) | {{< icon circle-info >}} |
| コード | {{< icon code>}} |
| codepen | {{< icon codepen >}} |
| comment | {{< icon comment >}} |
| コメント | {{< icon comment >}} |
| dev | {{< icon dev >}} |
| discourse | {{< icon discourse >}} |
| docker | {{< icon docker >}} |
| download | {{< icon download >}} |
| ダウンロード | {{< icon download >}} |
| dribbble | {{< icon dribbble >}} |
| edit | {{< icon edit >}} |
| email | {{< icon email >}} |
| envelope | {{< icon envelope >}} |
| expand | {{< icon expand >}} |
| eye | {{< icon eye >}} |
| 編集 | {{< icon edit >}} |
| メール | {{< icon email >}} |
| 封筒 | {{< icon envelope >}} |
| 拡大 | {{< icon expand >}} |
| | {{< icon eye >}} |
| facebook | {{< icon facebook >}} |
| fire | {{< icon fire >}} |
| | {{< icon fire >}} |
| flickr | {{< icon flickr >}} |
| fork | {{< icon fork >}} |
| foursquare | {{< icon foursquare >}} |
| ghost | {{< icon ghost >}} |
| 幽霊 | {{< icon ghost >}} |
| github | {{< icon github >}} |
| gitlab | {{< icon gitlab >}} |
| globe | {{< icon globe >}} |
| 地球 | {{< icon globe >}} |
| goodreads | {{< icon goodreads >}} |
| google | {{< icon google >}} |
| graduation-cap | {{< icon graduation-cap >}} |
| 卒業帽 | {{< icon graduation-cap >}} |
| hackernews | {{< icon hackernews >}} |
| hashnode | {{< icon hashnode >}} |
| heart-empty | {{< icon heart-empty >}} |
| heart | {{< icon heart >}} |
| image | {{< icon image >}} |
| ハート (空) | {{< icon heart-empty >}} |
| ハート | {{< icon heart >}} |
| 画像 | {{< icon image >}} |
| instagram | {{< icon instagram >}} |
| keybase | {{< icon keybase >}} |
| kickstarter | {{< icon kickstarter >}} |
| ko-fi | {{< icon ko-fi >}} |
| language | {{< icon language >}} |
| 言語 | {{< icon language >}} |
| lastfm | {{< icon lastfm >}} |
| lightbulb | {{< icon lightbulb >}} |
| link | {{< icon link >}} |
| ひらめき | {{< icon lightbulb >}} |
| リンク | {{< icon link >}} |
| linkedin | {{< icon linkedin >}} |
| list | {{< icon list >}} |
| location-dot | {{< icon location-dot >}} |
| lock | {{< icon lock >}} |
| リスト | {{< icon list >}} |
| 地図のピン | {{< icon location-dot >}} |
| ロック | {{< icon lock >}} |
| mastodon | {{< icon mastodon >}} |
| medium | {{< icon medium >}} |
| microsoft | {{< icon microsoft >}} |
| moon | {{< icon moon >}} |
| mug-hot | {{< icon mug-hot >}} |
| music | {{< icon music >}} |
| | {{< icon moon >}} |
| ホットマグカップ | {{< icon mug-hot >}} |
| 音楽 | {{< icon music >}} |
| orcid | {{< icon orcid >}} |
| patreon | {{< icon patreon >}} |
| paypal | {{< icon paypal >}} |
| pencil | {{< icon pencil >}} |
| pgpkey | {{< icon pgpkey >}} |
| phone | {{< icon phone >}} |
| 鉛筆 | {{< icon pencil >}} |
| pgp キー | {{< icon pgpkey >}} |
| 電話 | {{< icon phone >}} |
| pinterest | {{< icon pinterest >}} |
| poo | {{< icon poo >}} |
| うんち | {{< icon poo >}} |
| reddit | {{< icon reddit >}} |
| researchgate | {{< icon researchgate >}} |
| rss | {{< icon rss >}} |
| rss-square | {{< icon rss-square >}} |
| scale-balanced | {{< icon scale-balanced >}} |
| search | {{< icon search >}} |
| shield | {{< icon shield >}} |
| skull-crossbones | {{< icon skull-crossbones >}} |
| rss (四角) | {{< icon rss-square >}} |
| 天秤 | {{< icon scale-balanced >}} |
| 検索 | {{< icon search >}} |
| | {{< icon shield >}} |
| ドクロ | {{< icon skull-crossbones >}} |
| slack | {{< icon slack >}} |
| snapchat | {{< icon snapchat >}} |
| soundcloud | {{< icon soundcloud >}} |
| stack-overflow | {{< icon stack-overflow >}} |
| star | {{< icon star >}} |
| | {{< icon star >}} |
| steam | {{< icon steam >}} |
| stripe | {{< icon stripe >}} |
| substack | {{< icon substack >}} |
| sun | {{< icon sun >}} |
| tag | {{< icon tag >}} |
| 太陽 | {{< icon sun >}} |
| タグ | {{< icon tag >}} |
| telegram | {{< icon telegram >}} |
| threads | {{< icon threads >}} |
| tiktok | {{< icon tiktok >}} |
| triangle-exclamation | {{< icon triangle-exclamation >}} |
| 警告 (三角) | {{< icon triangle-exclamation >}} |
| tumblr | {{< icon tumblr >}} |
| twitch | {{< icon twitch >}} |
| twitter | {{< icon twitter >}} |
| wand-magic-sparkles | {{< icon wand-magic-sparkles >}} |
| 輝く魔法の杖 | {{< icon wand-magic-sparkles >}} |
| whatsapp | {{< icon whatsapp >}} |
| x-twitter | {{< icon x-twitter >}} |
| xing | {{< icon xing >}} |

View file

@ -1,18 +1,18 @@
---
title: "Markdown"
date: 2019-03-11
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
description: "基本的な Markdown 構文と HTML 要素のフォーマットを紹介するサンプル記事です。"
tags: ["markdown", "css", "html", "sample"]
type: 'sample'
---
This article offers a sample of basic Markdown formatting that can be used in Blowfish, also it shows how some basic HTML elements are decorated.
この記事は Blowfish を利用した基本的な Markdown フォーマットのサンプルを提供し、また基本的な HTML 要素がどのように装飾できるのかを示しています。
<!--more-->
## Headings
## 見出し
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
こちらは HTML の `<h1>`—`<h6>` 要素に相当する6種類の見出しを使用できます。 `<h1>` が最大の見出しで、 `<h6>` に近づくほど小さくなっていきます。
# H1
@ -26,121 +26,121 @@ The following HTML `<h1>`—`<h6>` elements represent six levels of section head
###### H6
## Paragraph
## 段落
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
## Blockquotes
## ブロック引用
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
ブロック引用要素は、他の情報元から引用された内容を表します。 `footer` または `cite` 要素を使った引用や、注釈や省略形などの変更を伴うことも可能です。
### Blockquote without attribution
### 出典なしのブロック引用
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use _Markdown syntax_ within a blockquote.
> **ノート** ブロック構文では、 _Markdown 構文_ を利用可能です。
### Blockquote with attribution
### 出典ありのブロック引用
> Don't communicate by sharing memory, share memory by communicating.<br>
> — <cite>Rob Pike[^1]</cite>
[^1]: The above quote is excerpted from Rob Pike's [talk `about` nothing](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
[^1]: 上記の引用は、2015年11月18日に開催された Gopherfest での Rob Pikes の [`講演`](https://www.youtube.com/watch?v=PAAkCSZUG1c) からの抜粋です。
## Tables
## テーブル
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
テーブルは Markdown の仕様には含まれていません。しかし Hugp はテーブルをすぐに利用できるようサポートしています。
| Name | Age |
| ----- | --- |
| 名前 | 年齢 |
| ----- | ---- |
| Bob | 27 |
| Alice | 23 |
### Inline Markdown within tables
### テーブルないのインライン Markdown
| Italics | Bold | Code |
| --------- | -------- | ------ |
| _italics_ | **bold** | `code` |
| 斜体 | 太字 | コード |
| ------ | -------- | -------- |
| _斜体_ | **太字** | `コード` |
## Code Blocks
## コードブロック
### Code block with backticks
### バックチックによるコードブロック
```html
<!DOCTYPE html>
<html lang="en">
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>Example HTML5 Document</title>
<title>HTML5 資料の例</title>
</head>
<body>
<p>Test</p>
<p>テスト</p>
</body>
</html>
```
### Code block indented with four spaces
### 4スペースのインデントによるコードブロック
<!DOCTYPE html>
<html lang="en">
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
<title>HTML5 資料の例</title>
</head>
<body>
<p>Test</p>
<p>テスト</p>
</body>
</html>
### Code block with Hugo's internal highlight shortcode
### Hugo 内のショートコード・ハイライトを利用したコードブロック
{{< highlight html "linenos=table,hl_lines=4 7-9" >}}
<!DOCTYPE html>
<html lang="en">
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
<title>HTML5 資料の例</title>
</head>
<body>
<p>Test</p>
<p>テスト</p>
</body>
</html>
{{< /highlight >}}
## List Types
## リスト形式
### Ordered List
### 順序のあるリスト
1. First item
2. Second item
3. Third item
1. 1つ目のアイテム
2. 2つ目のアイテム
3. 3つ目のアイテム
### Unordered List
### 順序がないリスト
- List item
- Another item
- And another item
- リストアイテム
- 他のアイテム
- 他のアイテム
### Nested list
### 入れ子型リスト
- Fruit
- Apple
- Orange
- Banana
- Dairy
- Milk
- Cheese
- 果実
- りんご
- オレンジ
- バナナ
- 乳製品
- 牛乳
- チーズ
## Other Elements — abbr, sub, sup, kbd, mark
## その他の要素 — abbr, sub, sup, kbd, mark
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
<abbr title="Graphics Interchange Format">GIF</abbr> はビットマップ画像フォーマットです。
H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd> to end the session.
<kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd>を押すことでセッションを終了出来ます。
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
多くの<mark>サラマンダー</mark>は夜行性で、昆虫やミミズ、その他の生物を狩ります。

View file

@ -1,45 +1,46 @@
---
title: Mathematical notation
title: 数学的記法
date: 2019-03-08
description: A brief sample of mathematical notation in Blowfish.
description: Blowfish での数学的記法の簡単なサンプル。
tags: ["sample", "katex", "maths", "shortcodes"]
type: 'sample'
---
KaTeX can be used to render mathematical notation within articles.
KaTeX は数学的記法を記事内にレンダリングする際に利用できます。
<!--more-->
{{< 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. Example below:
Blowfish は数学的記法を利用する場合のみ、 KaTeX アセットをプロジェクトにバンドルします。これを機能させるには、単に記事内に [`katex` ショートコード]({{< ref "docs/shortcodes#katex" >}}) を含ませてください。以下が例です:
```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.
ページ上のすべての KaTeX 構文は自動的にレンダリングされます。
利用可能な構文は[サポートしている TeX 機能](https://katex.org/docs/supported.html)のオンラインの文献を参照してください。
## Inline notation
## インライン表記
Inline notation can be generated by wrapping the expression in `\\(` and `\\)` delimiters.
インライン表記は `\\(``\\)` 記号で式を囲むことで生成できます。
**Example:**
**:**
```tex
% KaTeX inline notation
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
% KaTeX インライン表記
インライン表記: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
```
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
インライン表記: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
## Block notation
## ブロック表記
Alternatively, block notation can be generated using `$$` delimiters. This will output the expression in its own HTML block.
または、ブロック表記は `$$` 記号を利用することで生成できます。これによって、式が独自の HTML ブロックに出力されます。
**Example:**
**:**
```tex
% KaTeX block notation
% KaTeX ブロック表記
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$

View file

@ -1,10 +1,10 @@
---
title: "Multiple Authors"
title: "複数人の著者"
date: 2022-10-12
draft: false
description: "Sample for a multiple author setup"
description: "複数人の著者の設定方法のサンプル"
tags: ["authors", "sample"]
summary: "A quick example of how multiple authors could be used."
summary: "複数人の著者の利用方法の簡単な例。"
showAuthor: false
authors:
- "nunocoracao"
@ -12,4 +12,4 @@ authors:
type: 'sample'
---
This is an example of how an article with multiple authors will look like.
これは、著者が複数人の記事がどのように見えるかの例です。

View file

@ -1,5 +1,5 @@
---
title: "Placeholder Text"
title: "代用語文"
date: "2019-03-09"
lastmod: "2022-01-24"
draft: false

View file

@ -1,36 +1,36 @@
---
title: "Rich Content"
title: "リッチコンテンツ"
date: 2019-03-10
description: "A brief description of Hugo Shortcodes"
description: "Hugo ショートコードの簡単な説明"
summary: "This is an _example_ of a **rich** content summary."
tags: ["shortcodes", "privacy", "sample", "gist", "twitter", "youtube", "vimeo"]
type: 'sample'
---
Hugo ships with several [built-in shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [privacy config](https://gohugo.io/about/hugo-and-gdpr/) and a set of _simple shortcodes_ that enable static and no-JS versions of various social media embeds.
Hugo には、リッチコンテンツのためのいくつかの[組み込みショートコード](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes)と[プライバシー設定](https://gohugo.io/about/hugo-and-gdpr/)、そして様々なソーシャルメディアの埋め込みを静的に、 JS なしで可能にする _simple shortcodes_ のセットが同梱されています。
## YouTube
Below is an example using the built-in `youtube` shortcode.
下記のものは `youtube` ショートコードの組み込みを利用した例です。
{{< youtube ZJthWmvUzzc >}}
## Twitter
This example uses the `twitter_simple` shortcode to output a Tweet. It requires two named parameters `user` and `id`.
この例はツイートを `twitter_simple` ショートコードを利用して出力しています。こちらは `user``id` の二つのパラメータを必須としています。
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
Alternatively, the `tweet` shortcode can be used to embed a fully marked up Twitter card.
代わりとして、 `tweet` ショートコードが完全にマークアップされた Twitter カードの埋め込みに利用できます、
## Gist
The `gist` shortcode can be used to embed a GitHub Gist. It requires two unnamed parameters: the username and ID of the Gist.
`gist` ショートコードは GitHub Gist の埋め込みに利用できます。こちらは Gist のユーザー名と ID の二つのパラメータを必須としています。
{{< gist nunocoracao 2779792841f7ffa7c7e62dc4d38626d4 >}}
## Vimeo
The `vimeo_simple` shortcode will embed a Vimeo video.
`vimeo_simple` ショートコードは Vimeo 動画を埋め込むことができます。
{{< vimeo_simple 48912912 >}}

View file

@ -1,24 +1,24 @@
---
title: "Thumbnails"
title: "サムネイル"
date: 2022-09-26
draft: false
description: "Turn on thumbnails for your articles."
description: "記事のサムネイルを変更する。"
slug: "thumbnail_sample"
tags: ["thumbnail", "sample"]
summary: "A quick example of how to start using Thumbnails in your artciles."
type: 'sample'
---
A quick example of how to start using Thumbnails in your articles.
記事でどのようにサムネイルを利用するかの簡単な例です。
If your average directory for an article looks like this:
記事の平均的なディレクトリが以下のようなものだとしたら:
```shell
content
└── awesome_article.md
```
You need to change it from a single markdown file into a folder. Create a directory with the same name of the article, inside create a `index.md` file. You'll get a structure similar to what's below.
単一の markdown ファイルから、フォルダーに入っている形式に変更する必要があります。記事の名前と同一のディレクトリを作成し、その中に `index.md` ファイルを作成します。このようにすると、以下のような構成になります。
```shell
content
@ -26,7 +26,7 @@ content
└── featured.png
```
Inside the article you can now add an image file (almost all formats are supported but we recommend `.png` or `.jpg`) that starts with `feature*`. Example below.
記事内に `feature*` から始まる名前の画像ファイル (ほとんど全てのフォーマットを対応していますが、 `.png``.jpg` を推奨しています) を追加できます。以下が例です。
```shell
content
@ -35,4 +35,4 @@ content
└── featured.png
```
This will tell Blowfish that this article has a feature image that can be used both as a thumbnail across your website as well as for <a target="_blank" href="https://oembed.com/">oEmbed</a> cards across social platforms. As an example, you can try copy pasting the URL of this article into a platform that shows oEmbeds (e.g. Twitter, WhatsApp, Telegram, etc) and see what is displayed.
これによって Blowfish は、記事のサムネイルをウェブサイトまたは SNS の <a target="_blank" href="https://oembed.com/">oEmbed</a> カードの紹介画像として利用できます。例としては、この記事の URL を oEmbeds を表示するプラットフォーム (例: Twitter, WhatsApp, Telegram など) にコピーペーストどのように表示されるかをご覧ください。

View file

@ -11,6 +11,6 @@
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute('content');
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute('content');
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute('content');
umami.track(type + ':' +title, {'url': url});
umami.track(type + ':' + title, {'url': url});
});
</script>

View file

@ -1,17 +1,19 @@
<span>
{{ if eq .Kind "taxonomy"}}
<span id="likes_taxonomy_{{ .Page.Data.Plural }}"
{{ else if eq .Kind "term"}}
<span id="likes_term_{{ .Page.Data.Term }}"
{{ if eq .Kind "taxonomy" }}
<span id="likes_taxonomy_{{ .Page.Data.Plural }}">
{{ else if eq .Kind "term" }}
<span id="likes_term_{{ .Page.Data.Term }}">
{{ else }}
{{ $path := .File.Path }}
{{range .AllTranslations}}
{{ $translations := .AllTranslations }}
{{ with .File }}
{{ $path := .Path }}
{{range $translations}}
{{ $lang := print "." .Lang ".md" }}
{{ $path = replace $path $lang ".md" }}
{{end}}
<span id="likes_{{ $path }}"
<span id="likes_{{ $path }}">
{{ end }}
{{ end }}
class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400" title="likes">loading</span>
<span class="inline-block align-text-bottom">{{ partial "icon.html" "heart" }}</span>
</span>
{{- /* Trim EOF */ -}}

View file

@ -1,17 +1,19 @@
<span>
{{ if eq .Kind "taxonomy"}}
<span id="views_taxonomy_{{ .Page.Data.Plural }}"
{{ else if eq .Kind "term"}}
<span id="views_term_{{ .Page.Data.Term }}"
{{ if eq .Kind "taxonomy" }}
<span id="views_taxonomy_{{ .Page.Data.Plural }}">
{{ else if eq .Kind "term" }}
<span id="views_term_{{ .Page.Data.Term }}">
{{ else }}
{{ $path := .File.Path }}
{{range .AllTranslations}}
{{ $translations := .AllTranslations }}
{{ with .File }}
{{ $path := .Path }}
{{range $translations}}
{{ $lang := print "." .Lang ".md" }}
{{ $path = replace $path $lang ".md" }}
{{end}}
<span id="views_{{ $path }}"
<span id="views_{{ $path }}">
{{ end }}
{{ end }}
class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400" title="views">loading</span>
<span class="inline-block align-text-bottom">{{ partial "icon.html" "eye" }}</span>
</span>
{{- /* Trim EOF */ -}}

View file

@ -1,4 +1,5 @@
{{- $id := .Get "id" | default "SgXhGb-7QbU" -}}
{{- $label := .Get "id" | default "Blowfish" -}}
{{- $params := .Get "params" -}}
<lite-youtube videoid="{{ $id }}" playlabel="{{ $label }}"></lite-youtube>
<lite-youtube videoid="{{ $id }}" playlabel="{{ $label }}" params="{{ $params }}"></lite-youtube>

117
package-lock.json generated
View file

@ -1,23 +1,23 @@
{
"name": "hugo-blowfish-theme",
"version": "2.63.0",
"version": "2.64.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "hugo-blowfish-theme",
"version": "2.63.0",
"version": "2.64.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@headlessui/react": "^1.7.18",
"@heroicons/react": "^2.1.1",
"@heroicons/react": "^2.1.3",
"@iamtraction/google-translate": "^2.0.1",
"@tailwindcss/forms": "^0.5.7",
"commander": "^12.0.0"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.10",
"@tailwindcss/typography": "^0.5.12",
"chart.js": "^4.4.2",
"fuse.js": "^7.0.0",
"jquery": "^3.7.1",
@ -27,10 +27,10 @@
"packery": "^2.1.2",
"prettier": "^3.2.5",
"prettier-plugin-go-template": "^0.0.15",
"prettier-plugin-tailwindcss": "^0.5.12",
"puppeteer": "^22.5.0",
"prettier-plugin-tailwindcss": "^0.5.13",
"puppeteer": "^22.6.2",
"rimraf": "^5.0.5",
"tailwindcss": "^3.4.1",
"tailwindcss": "^3.4.3",
"tw-elements": "2.0.0",
"typeit": "^8.8.3",
"vendor-copy": "^3.0.1"
@ -114,9 +114,9 @@
}
},
"node_modules/@heroicons/react": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.1.1.tgz",
"integrity": "sha512-JyyN9Lo66kirbCMuMMRPtJxtKJoIsXKS569ebHGGRKbl8s4CtUfLnyKJxteA+vIKySocO4s1SkTkGS4xtG/yEA==",
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.1.3.tgz",
"integrity": "sha512-fEcPfo4oN345SoqdlCDdSa4ivjaKbk0jTd+oubcgNxnNgAfzysfwWfQUr+51wigiWHQQRiZNd1Ao0M5Y3M2EGg==",
"peerDependencies": {
"react": ">= 16"
}
@ -279,9 +279,9 @@
}
},
"node_modules/@tailwindcss/typography": {
"version": "0.5.10",
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.10.tgz",
"integrity": "sha512-Pe8BuPJQJd3FfRnm6H0ulKIGoMEQS+Vq01R6M5aCrFB/ccR/shT+0kXLjouGC1gFLm9hopTFN+DMP0pfwRWzPw==",
"version": "0.5.12",
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.12.tgz",
"integrity": "sha512-CNwpBpconcP7ppxmuq3qvaCxiRWnbhANpY/ruH4L5qs2GCiVDJXde/pjj2HWPV1+Q4G9+V/etrwUYopdcjAlyg==",
"dev": true,
"dependencies": {
"lodash.castarray": "^4.4.0",
@ -370,9 +370,9 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.11.30",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz",
"integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==",
"version": "20.12.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.3.tgz",
"integrity": "sha512-sD+ia2ubTeWrOu+YMF+MTAB7E+O7qsMqAbMfW7DG3K1URwhZ5hN1pLlRVGbf4wDFzSfikL05M17EyorS86jShw==",
"dev": true,
"optional": true,
"dependencies": {
@ -402,9 +402,9 @@
}
},
"node_modules/agent-base": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz",
"integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
"integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==",
"dev": true,
"dependencies": {
"debug": "^4.3.4"
@ -489,21 +489,20 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"node_modules/bare-events": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.2.1.tgz",
"integrity": "sha512-9GYPpsPFvrWBkelIhOhTWtkeZxVxZOdb3VnFTCzlOo3OjvmTvzLoZFUT8kNFACx0vJej6QPney1Cf9BvzCNE/A==",
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.2.2.tgz",
"integrity": "sha512-h7z00dWdG0PYOQEvChhOSWvOfkIKsdZGkWr083FgN/HyoQuebSew/cgirYqh9SCuy/hRvxc5Vy6Fw8xAmYHLkQ==",
"dev": true,
"optional": true
},
"node_modules/bare-fs": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.2.2.tgz",
"integrity": "sha512-X9IqgvyB0/VA5OZJyb5ZstoN62AzD7YxVGog13kkfYWYqJYcK0kcqLZ6TrmH5qr4/8//ejVcX4x/a0UvaogXmA==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.2.3.tgz",
"integrity": "sha512-amG72llr9pstfXOBOHve1WjiuKKAMnebcmMbPWDZ7BCevAoJLpugjuAPRsDINEyjT0a6tbaVx3DctkXIRbLuJw==",
"dev": true,
"optional": true,
"dependencies": {
"bare-events": "^2.0.0",
"bare-os": "^2.0.0",
"bare-path": "^2.0.0",
"streamx": "^2.13.0"
}
@ -733,9 +732,9 @@
}
},
"node_modules/chromium-bidi": {
"version": "0.5.13",
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.13.tgz",
"integrity": "sha512-OHbYCetDxdW/xmlrafgOiLsIrw4Sp1BEeolbZ1UGJO5v/nekQOJBj/Kzyw6sqKcAVabUTo0GS3cTYgr6zIf00g==",
"version": "0.5.16",
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.16.tgz",
"integrity": "sha512-IT5lnR44h/qZQ4GaCHvBxYIl4cQL2i9UvFyYeRyVdcpY04hx5H720HQfe/7Oz7ndxaYVLQFGpCO71J4X2Ye/Gw==",
"dev": true,
"dependencies": {
"mitt": "3.0.1",
@ -1498,9 +1497,9 @@
"dev": true
},
"node_modules/devtools-protocol": {
"version": "0.0.1249869",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1249869.tgz",
"integrity": "sha512-Ctp4hInA0BEavlUoRy9mhGq0i+JSo/AwVyX2EFgZmV1kYB+Zq+EMBAn52QWu6FbRr10hRb6pBl420upbp4++vg==",
"version": "0.0.1262051",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1262051.tgz",
"integrity": "sha512-YJe4CT5SA8on3Spa+UDtNhEqtuV6Epwz3OZ4HQVLhlRccpZ9/PAYk0/cy/oKxFKRrZPBUPyxympQci4yWNWZ9g==",
"dev": true
},
"node_modules/didyoumean": {
@ -2109,9 +2108,9 @@
}
},
"node_modules/jiti": {
"version": "1.20.0",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz",
"integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==",
"version": "1.21.0",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
"integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==",
"bin": {
"jiti": "bin/jiti.js"
}
@ -3195,9 +3194,9 @@
}
},
"node_modules/prettier-plugin-tailwindcss": {
"version": "0.5.12",
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.12.tgz",
"integrity": "sha512-o74kiDBVE73oHW+pdkFSluHBL3cYEvru5YgEqNkBMFF7Cjv+w1vI565lTlfoJT4VLWDe0FMtZ7FkE/7a4pMXSQ==",
"version": "0.5.13",
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.13.tgz",
"integrity": "sha512-2tPWHCFNC+WRjAC4SIWQNSOdcL1NNkydXim8w7TDqlZi+/ulZYz2OouAI6qMtkggnPt7lGamboj6LcTMwcCvoQ==",
"dev": true,
"engines": {
"node": ">=14.21.3"
@ -3207,6 +3206,7 @@
"@prettier/plugin-pug": "*",
"@shopify/prettier-plugin-liquid": "*",
"@trivago/prettier-plugin-sort-imports": "*",
"@zackad/prettier-plugin-twig-melody": "*",
"prettier": "^3.0",
"prettier-plugin-astro": "*",
"prettier-plugin-css-order": "*",
@ -3232,6 +3232,9 @@
"@trivago/prettier-plugin-sort-imports": {
"optional": true
},
"@zackad/prettier-plugin-twig-melody": {
"optional": true
},
"prettier-plugin-astro": {
"optional": true
},
@ -3261,9 +3264,6 @@
},
"prettier-plugin-svelte": {
"optional": true
},
"prettier-plugin-twig-melody": {
"optional": true
}
}
},
@ -3321,15 +3321,16 @@
}
},
"node_modules/puppeteer": {
"version": "22.5.0",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.5.0.tgz",
"integrity": "sha512-PNVflixb6w3FMhehYhLcaQHTCcNKVkjxekzyvWr0n0yBnhUYF0ZhiG4J1I14Mzui2oW8dGvUD8kbXj0GiN1pFg==",
"version": "22.6.2",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.6.2.tgz",
"integrity": "sha512-3GMAJ9adPUSdIHGuYV1b1RqRB6D2UScjnq779uZsvpAP6HOWw2+9ezZiUZaAXVST+Ku7KWsxOjkctEvRasJClA==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
"@puppeteer/browsers": "2.2.0",
"cosmiconfig": "9.0.0",
"puppeteer-core": "22.5.0"
"devtools-protocol": "0.0.1262051",
"puppeteer-core": "22.6.2"
},
"bin": {
"puppeteer": "lib/esm/puppeteer/node/cli.js"
@ -3339,15 +3340,15 @@
}
},
"node_modules/puppeteer-core": {
"version": "22.5.0",
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.5.0.tgz",
"integrity": "sha512-bcfmM1nNSysjnES/ZZ1KdwFAFFGL3N76qRpisBb4WL7f4UAD4vPDxlhKZ1HJCDgMSWeYmeder4kftyp6lKqMYg==",
"version": "22.6.2",
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.6.2.tgz",
"integrity": "sha512-Sws/9V2/7nFrn3MSsRPHn1pXJMIFn6FWHhoMFMUBXQwVvcBstRIa9yW8sFfxePzb56W1xNfSYzPRnyAd0+qRVQ==",
"dev": true,
"dependencies": {
"@puppeteer/browsers": "2.2.0",
"chromium-bidi": "0.5.13",
"chromium-bidi": "0.5.16",
"debug": "4.3.4",
"devtools-protocol": "0.0.1249869",
"devtools-protocol": "0.0.1262051",
"ws": "8.16.0"
},
"engines": {
@ -3630,12 +3631,12 @@
}
},
"node_modules/socks-proxy-agent": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz",
"integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==",
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz",
"integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==",
"dev": true,
"dependencies": {
"agent-base": "^7.0.2",
"agent-base": "^7.1.1",
"debug": "^4.3.4",
"socks": "^2.7.1"
},
@ -3874,9 +3875,9 @@
}
},
"node_modules/tailwindcss": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz",
"integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==",
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz",
"integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==",
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2",
@ -3886,7 +3887,7 @@
"fast-glob": "^3.3.0",
"glob-parent": "^6.0.2",
"is-glob": "^4.0.3",
"jiti": "^1.19.1",
"jiti": "^1.21.0",
"lilconfig": "^2.1.0",
"micromatch": "^4.0.5",
"normalize-path": "^3.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "hugo-blowfish-theme",
"version": "2.63.0",
"version": "2.64.0",
"description": "Blowfish theme for Hugo",
"scripts": {
"postinstall": "vendor-copy",
@ -34,7 +34,7 @@
},
"homepage": "https://github.com/nunocoracao/blowfish#readme",
"devDependencies": {
"@tailwindcss/typography": "^0.5.10",
"@tailwindcss/typography": "^0.5.12",
"chart.js": "^4.4.2",
"fuse.js": "^7.0.0",
"jquery": "^3.7.1",
@ -44,10 +44,10 @@
"packery": "^2.1.2",
"prettier": "^3.2.5",
"prettier-plugin-go-template": "^0.0.15",
"prettier-plugin-tailwindcss": "^0.5.12",
"puppeteer": "^22.5.0",
"prettier-plugin-tailwindcss": "^0.5.13",
"puppeteer": "^22.6.2",
"rimraf": "^5.0.5",
"tailwindcss": "^3.4.1",
"tailwindcss": "^3.4.3",
"tw-elements": "2.0.0",
"typeit": "^8.8.3",
"vendor-copy": "^3.0.1"
@ -109,7 +109,7 @@
],
"dependencies": {
"@headlessui/react": "^1.7.18",
"@heroicons/react": "^2.1.1",
"@heroicons/react": "^2.1.3",
"@iamtraction/google-translate": "^2.0.1",
"@tailwindcss/forms": "^0.5.7",
"commander": "^12.0.0"