diff --git a/.github/workflows/firebase-preview.yml b/.github/workflows/firebase-preview.yml index caa90cf2..382137b3 100644 --- a/.github/workflows/firebase-preview.yml +++ b/.github/workflows/firebase-preview.yml @@ -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 diff --git a/.github/workflows/firebase-production.yml b/.github/workflows/firebase-production.yml index 7f276ca0..e620f263 100644 --- a/.github/workflows/firebase-production.yml +++ b/.github/workflows/firebase-production.yml @@ -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 diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 6aa8df80..189ec4ba 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 14cdafe0..1a918ba5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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" diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index 632d7650..968d4def 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -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" diff --git a/exampleSite/content/_index.ja.md b/exampleSite/content/_index.ja.md index 0a056721..e70f3ca7 100755 --- a/exampleSite/content/_index.ja.md +++ b/exampleSite/content/_index.ja.md @@ -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" > - レイアウトを変更する ↻ + レイアウトを変更する↻ diff --git a/exampleSite/content/authors/nunocoracao/_index.ja.md b/exampleSite/content/authors/nunocoracao/_index.ja.md index caf70558..aba47315 100644 --- a/exampleSite/content/authors/nunocoracao/_index.ja.md +++ b/exampleSite/content/authors/nunocoracao/_index.ja.md @@ -2,4 +2,4 @@ title: "Nuno Coração" --- -Nuno's awesome dummy bio. +Nuno の素晴らしいダミープロフィールです。 diff --git a/exampleSite/content/authors/secondauthor/_index.ja.md b/exampleSite/content/authors/secondauthor/_index.ja.md index 039f902d..6cd94497 100644 --- a/exampleSite/content/authors/secondauthor/_index.ja.md +++ b/exampleSite/content/authors/secondauthor/_index.ja.md @@ -1,5 +1,5 @@ --- -title: "Dummy Second Author" +title: "2人目のダミー作者" --- -Dummy Second Author's awesome dummy bio. +2人目のダミー作者の素晴らしいダミープロフィールです。 diff --git a/exampleSite/content/docs/configuration/index.it.md b/exampleSite/content/docs/configuration/index.it.md index 0abe430a..1ab50b58 100644 --- a/exampleSite/content/docs/configuration/index.it.md +++ b/exampleSite/content/docs/configuration/index.it.md @@ -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 | diff --git a/exampleSite/content/docs/configuration/index.ja.md b/exampleSite/content/docs/configuration/index.ja.md index 0abe430a..1ab50b58 100644 --- a/exampleSite/content/docs/configuration/index.ja.md +++ b/exampleSite/content/docs/configuration/index.ja.md @@ -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 | diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 0abe430a..52a8ce10 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -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 | diff --git a/exampleSite/content/docs/configuration/index.zh-cn.md b/exampleSite/content/docs/configuration/index.zh-cn.md index e80b6b76..d854134e 100644 --- a/exampleSite/content/docs/configuration/index.zh-cn.md +++ b/exampleSite/content/docs/configuration/index.zh-cn.md @@ -313,10 +313,18 @@ 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 diff --git a/exampleSite/content/docs/getting-started/index.it.md b/exampleSite/content/docs/getting-started/index.it.md index b1235bad..dcefb455 100644 --- a/exampleSite/content/docs/getting-started/index.it.md +++ b/exampleSite/content/docs/getting-started/index.it.md @@ -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 >}}
{{< 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 ``` diff --git a/exampleSite/content/docs/installation/index.it.md b/exampleSite/content/docs/installation/index.it.md index fd367e8b..eb71b365 100644 --- a/exampleSite/content/docs/installation/index.it.md +++ b/exampleSite/content/docs/installation/index.it.md @@ -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: -### 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// + # Se gestisci il tuo progetto su GitHub + Hugo mod init github.com// - # 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. diff --git a/exampleSite/content/docs/installation/index.zh-cn.md b/exampleSite/content/docs/installation/index.zh-cn.md index fb1b5943..6338a5a5 100644 --- a/exampleSite/content/docs/installation/index.zh-cn.md +++ b/exampleSite/content/docs/installation/index.zh-cn.md @@ -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)的教程也可以看此文档。 @@ -206,4 +206,4 @@ Hugo 将自动更新项目中所需的任何模块。它通过检查 `module.tom 2. 解压缩, 将文件夹重命名为 `blowfish`,并移动到根目录 `themes/` 目录下。你需要覆盖旧版以替换所有的主题文件。 -3. 重建站点,并检查网站是否一切正常。 \ No newline at end of file +3. 重建站点,并检查网站是否一切正常。 diff --git a/exampleSite/content/docs/partials/index.it.md b/exampleSite/content/docs/partials/index.it.md index 4af2a536..66b6f8ba 100644 --- a/exampleSite/content/docs/partials/index.it.md +++ b/exampleSite/content/docs/partials/index.it.md @@ -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 `` of the website. diff --git a/exampleSite/content/docs/partials/index.ja.md b/exampleSite/content/docs/partials/index.ja.md index 4af2a536..66b6f8ba 100644 --- a/exampleSite/content/docs/partials/index.ja.md +++ b/exampleSite/content/docs/partials/index.ja.md @@ -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 `` of the website. diff --git a/exampleSite/content/docs/partials/index.md b/exampleSite/content/docs/partials/index.md index 4af2a536..43fe8d9f 100644 --- a/exampleSite/content/docs/partials/index.md +++ b/exampleSite/content/docs/partials/index.md @@ -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 `` of the website. diff --git a/exampleSite/content/docs/partials/index.zh-cn.md b/exampleSite/content/docs/partials/index.zh-cn.md index 8d3f9d64..168dbbc0 100644 --- a/exampleSite/content/docs/partials/index.zh-cn.md +++ b/exampleSite/content/docs/partials/index.zh-cn.md @@ -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) 都是支持的,参考如下示例: -根据提供的配置值,版本 3(analytics.js)和版本 4(gtag.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`文件,它就会自动将其包含在网站的``中。 +### 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` 中的内容添加到整个站点的 `` 中。 ## 评论 -为了在文章中添加评论,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` 文件,该文件就会被加入网站的 `` 中,取代默认资源。 ## 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,8 +117,8 @@ Blowfish 还提供了许多扩展 partial,可以扩展基本功能。 如果您希望在文章链接后插入附加代码,请创建一个 `layouts/partials/extend-article-link.html` 文件。如果与[`badge`]({{< ref "shortcodes#badge" >}})简码结合使用,该功能将尤为强大,可用于突出显示某些文章的元数据。 -### 页眉和页脚 +### 头部和尾部 本主题允许在模板的``和`