/var/log/messages

Mar 27, 2020 - 1 minute read - Comments - misc

hugo の移行

ようやっと移行できました。何をしたのだったか、をメモ。

とりあえず

以下のエントリを、だったのですが記録がダウトで困りました。

diff な記述がアレでして themes/Hugo-Octopress が root になってる的書き方でした。

  • themes/Hugo-Octopress/layouts/partials/pagination.html の修正
  • themes/Hugo-Octopress/layouts/partials/post_footer.html の修正
  • themes/Hugo-Octopress/layouts/partials/sidebar.html の修正

でした。あと、hugo のバージョンが上がって markdown の中に html 記述しちゃ駄目になったとのことで config.yaml に以下を追加しています。

markup:
  goldmark:
    renderer:
      unsafe: true

追記

github.io が更新できず、だったのですが、github 側のリポジトリを初期化したらイケました。

さらに追記

コマンドも控えとこ。

  • ポストの作成
$ hugo new post/yyyy-mm-dd-slug-string.md
  • ローカル動作確認
$ hugo server --theme=Hugo-Octopress
  • github に投入するスクリプト以下です
#!/bin/bash

echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"

# Build the project.
# hugo # if using a theme, replace with `hugo -t <YOURTHEME>`
hugo -t Hugo-Octopress # if using a theme, replace with `hugo -t <YOURTHEME>`

# Go To Public folder
cd public
# Add changes to git.
git add .

# Commit changes.
msg="rebuilding site `date`"
if [ $# -eq 1 ]
  then msg="$1"
fi
git commit -m "$msg"

# Push source and build repos.
git push origin master

# Come Back up to the Project Root
cd ..

まだ設定が微妙なようです。別途確認の方向。

隅のカタチ 最近の囲碁ネタ

comments powered by Disqus