【Hugo入門】Gitを使用してHugoにテーマを追加する

スポンサーリンク

Hugoのインストールを行い、新しいアプリケーションを作成し、Gitを使用してHugoにテーマを追加してみます。

■PC環境

・Windows10、Administrator(管理者)アカウント

・パッケージ管理ソフトウェア「Chocolatey」インストール済。インストールに関してはこちらをご確認ください。

・Chocolateyを使用しGit、インストール済

■新しいアプリケーションを作成する

Windows10のデスクトップ画面に、「ここに入力して検索」と表示されている検索ボックスで「powershell.exe」と検索し、 Windows PowerShellを表示後、アプリケーションを作成します。

cd demo

その後、上記のコマンドを入力し、Enterキーを押して作成したアプリケーション「demo」に移動します。

git init

Enterキーを押した後に、上記のコマンドでリポジトリを新規に作成します。作成するためにEnterキーを押します。

Initialized empty Git repository in C:/Windows/System32/demo/.git/

Enterキーを押すと、上記のメッセージが表示され、空のGitリポジトリを初期化されます。

git submodule add https://github.com/kakawait/hugo-tranquilpeak-theme.git themes/hugo-tranquilpeak-theme

初期化後、上記のコマンドを入力し、テーマを追加します。今回は「Tranquilpeak」というテーマを利用します。追加するために、Enterキーを押します。

Cloning into ‘C:/Windows/System32/demo/themes/hugo-tranquilpeak-theme’…
remote: Enumerating objects: 5181, done.
Rremote: Total 5181 (delta 0), reused 0 (delta 0), pack-reused 5181 MiB/s
Receiving objects: 100% (5181/5181), 17.18 MiB | 3.43 MiB/s, done.
Resolving deltas: 100% (2832/2832), done.
warning: LF will be replaced by CRLF in .gitmodules.
The file will have its original line endings in your working directory

Enterキーを押すと、テーマの追加が完了となります。

コメント

タイトルとURLをコピーしました