chore: update ja translation

This commit is contained in:
Xin
2025-08-14 19:28:16 +08:00
parent f79b1d262c
commit 24debf9b0c
26 changed files with 1155 additions and 449 deletions

View File

@@ -4,24 +4,24 @@ prev: /docs/guide/shortcodes
next: /docs/advanced
---
Hugoは静的サイトを生成するため、柔軟なホスティングオプションが可能です。
このページでは、Hextraサイトをさまざまなプラットフォームにデプロイするためのガイドを提供します。
Hugo は静的サイトを生成するため、柔軟なホスティングオプションが利用可能です。
このページでは、Hextra サイトを様々なプラットフォームにデプロイする方法を解説します。
<!--more-->
## GitHub Pages
[GitHub Pages](https://docs.github.com/pages)は無料でウェブサイトをデプロイおよびホストするための推奨方法です。
[GitHub Pages](https://docs.github.com/pages) は無料でサイトをデプロイホストするための推奨方法です。
[hextra-starter-template](https://github.com/imfing/hextra-starter-template)を使用してサイトをブートストラップした場合、GitHub Pagesへの自動デプロイを支援するGitHub Actionsワークフローがすぐに利用可能です。
[hextra-starter-template](https://github.com/imfing/hextra-starter-template) を使用してサイトを構築した場合、GitHub Pages への自動デプロイを支援する GitHub Actions ワークフローが最初から用意されています。
{{% details title="GitHub Actions設定" closed="true" %}}
{{% details title="GitHub Actions 設定" closed="true" %}}
以下は[hextra-starter-template](https://github.com/imfing/hextra-starter-template)からの設定例です
以下は [hextra-starter-template](https://github.com/imfing/hextra-starter-template) の設定例です:
```yaml {filename=".github/workflows/pages.yaml"}
# HugoサイトをGitHub Pagesにデプロイするためのサンプルワークフロー
# Hugo サイトをビルドし GitHub Pages にデプロイするサンプルワークフロー
name: Deploy Hugo site to Pages
on:
@@ -29,22 +29,21 @@ on:
push:
branches: ["main"]
# Actionsタブから手動でこのワークフローを実行可能
# Actions タブから手動で実行可能
workflow_dispatch:
# GITHUB_TOKENの権限を設定してGitHub Pagesへのデプロイを許可
# GITHUB_TOKEN の権限を設定GitHub Pages へのデプロイを許可
permissions:
contents: read
pages: write
id-token: write
# 同時実行を1つに制限し、進行中の実行と最新のキューイングされた実行の間の実行をスキップ。
# ただし、進行中の実行はキャンセルしないでください。これらの本番デプロイを完了させたいためです。
# 同時実行を1つに制限進行中の実行はキャンセルしない)
concurrency:
group: "pages"
cancel-in-progress: false
# デフォルトはbash
# デフォルトシェルを bash に設定
defaults:
run:
shell: bash
@@ -59,7 +58,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # .GitInfo.Lastmodのためにすべての履歴を取得
fetch-depth: 0 # .GitInfo.Lastmod 用に全履歴を取得
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v5
@@ -74,7 +73,7 @@ jobs:
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build with Hugo
env:
# Hugoモジュールとの最大限の互換性のため
# Hugo モジュールとの最大互換性のため
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
@@ -103,13 +102,13 @@ jobs:
{{< callout >}}
リポジトリ設定で、**Pages** > **Build and deployment** > **Source** を **GitHub Actions** に設定します:
リポジトリ設定で、**Pages** > **Build and deployment** > **Source** を **GitHub Actions** に設定してください:
![](https://user-images.githubusercontent.com/5097752/266784808-99676430-884e-42ab-b901-f6534a0d6eee.png)
{{< /callout >}}
デフォルトでは、上記のGitHub Actionsワークフロー `.github/workflows/pages.yaml` は、サイトが `https://<USERNAME>.github.io/<REPO>/` デプロイされることを前提としています。
デフォルトでは、上記の GitHub Actions ワークフロー `.github/workflows/pages.yaml` は `https://<USERNAME>.github.io/<REPO>/` へのデプロイを想定しています。
`https://<USERNAME>.github.io/` にデプロイする場合は`--baseURL` を変更します:
`https://<USERNAME>.github.io/` にデプロイする場合は `--baseURL` を修正してください:
```yaml {filename=".github/workflows/pages.yaml",linenos=table,linenostart=54,hl_lines=[4]}
run: |
@@ -118,47 +117,47 @@ run: |
--baseURL "https://${{ github.repository_owner }}.github.io/"
```
独自ドメインにデプロイする場合は、`--baseURL` の値を適宜変更してください。
独自ドメインを使用する場合は、`--baseURL` の値を適宜変更してください。
## Cloudflare Pages
1. サイトのソースコードをGitリポジトリ例:GitHubに配置します。
2. [Cloudflareダッシュボード](https://dash.cloudflare.com/)にログインしアカウントを選択します。
3. アカウントホームで、**Workers & Pages** > **Create application** > **Pages** > **Connect to Git** を選択します。
4. リポジトリを選択し、**Set up builds and deployments** セクションで以下の情報を提供します:
1. サイトのソースコードを Git リポジトリGitHub など)に配置
2. [Cloudflare ダッシュボード](https://dash.cloudflare.com/) にログインしアカウントを選択
3. Account Home で **Workers & Pages** > **Create application** > **Pages** > **Connect to Git** を選択
4. リポジトリを選択し、**Set up builds and deployments** セクションで以下を設定:
| 設定 | 値 |
| ---------------- | ------------------- |
| 本番ブランチ | `main` |
| ビルドコマンド | `hugo --gc --minify` |
| ビルドディレクトリ | `public` |
| 設定項目 | 値 |
| ----------------- | -------------------- |
| Production branch | `main` |
| Build command | `hugo --gc --minify` |
| Build directory | `public` |
詳細については、以下を確認してください:
- [Hugoサイトのデプロイ](https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site/#deploy-with-cloudflare-pages)
- [言語サポートとツール](https://developers.cloudflare.com/pages/platform/language-support-and-tools/)
詳細は以下を参照:
- [Deploy a Hugo site](https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site/#deploy-with-cloudflare-pages)
- [Language support and tools](https://developers.cloudflare.com/pages/platform/language-support-and-tools/)
## Netlify
1. コードをGitリポジトリGitHubGitLabなどにプッシュします。
2. [プロジェクトをインポート](https://app.netlify.com/start)してNetlifyに追加します。
3. [hextra-starter-template][hextra-starter-template]を使用していない場合、以下の設定を手動で行います:
- ビルドコマンドを `hugo --gc --minify` に設定します。
- 公開ディレクトリを `public` に指定します。
- 環境変数 `HUGO_VERSION` を追加し`0.147.7` 設定するか、`netlify.toml` ファイル設定します。
4. デプロイします
1. コードを Git リポジトリGitHub, GitLab など)にプッシュ
2. Netlify に [プロジェクトをインポート](https://app.netlify.com/start)
3. [hextra-starter-template][hextra-starter-template] を使用していない場合、以下を手動設定:
- Build command を `hugo --gc --minify` に設定
- Publish directory を `public` に指定
- 環境変数 `HUGO_VERSION` を追加し `0.147.7` 設定、または `netlify.toml` ファイル設定
4. デプロイ!
詳細については、[NetlifyでのHugo](https://docs.netlify.com/integrations/frameworks/hugo/)を確認してください。
詳細は [Hugo on Netlify](https://docs.netlify.com/integrations/frameworks/hugo/) を参照
## Vercel
1. コードをGitリポジトリGitHubGitLabなどにプッシュします。
2. [Vercelダッシュボード](https://vercel.com/dashboard)に移動しHugoプロジェクトをインポートします。
3. プロジェクトを設定し、フレームワークプリセットとしてHugoを選択します。
4. ビルドコマンドとインストールコマンドを上書きします:
1. ビルドコマンドを `hugo --gc --minify` に設定します。
2. インストールコマンドを `yum install golang` に設定します。
1. コードを Git リポジトリGitHub, GitLab など)にプッシュ
2. [Vercel ダッシュボード](https://vercel.com/dashboard) に移動し Hugo プロジェクトをインポート
3. プロジェクトを設定、Framework Preset で Hugo を選択
4. Build Command と Install command を上書き:
1. Build Command を `hugo --gc --minify` に設定
2. Install Command を `yum install golang` に設定
![Vercelデプロイ設定](https://github.com/imfing/hextra/assets/5097752/887d949b-8d05-413f-a2b4-7ab92192d0b3)
![Vercel デプロイ設定](https://github.com/imfing/hextra/assets/5097752/887d949b-8d05-413f-a2b4-7ab92192d0b3)