0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Hexo】WordPressを使わずほぼ無料で収益化可能なブログを構築する(Part3 Hexoのテーマを変更)

Posted at

概要

前回、Hexoを使用して試しに記事を投稿してみました。

今回はHexoのテーマを変更しデザインを変更していきたいと思います。

それではさっそく「Lets'go」

構築(4.記事を書く)

4.1.テーマを選ぶ

今回は「cards」というテーマを使用します。

4.2.テーマをインストール

コマンド
git clone https://github.com/ChrAlpha/hexo-theme-cards.git themes/cards

image.png

4.2._config.ymlを変更

_config.yml
theme: cards

image.png

4.3.確認

コマンド
hexo server

image.png

赤線のURLにアクセスすると反映できていることが確認できる
image.png

4.4.自分のサイトに反映

コマンド
hexo clean
hexo deploy

image.png
~中略
image.png

サイトにアクセスし、反映できていることを確認
image.png

4.5.テーマの内容を変更する

※日本語訳しました。

コマンド

# ---------------------------------------------------------------
# ナビゲーションバー/カバー構成
# ---------------------------------------------------------------

# トップナビゲーションバーの設定
navbar: 

  # 左側の名前が表示されます
  sitename: テストサイト
  
  # 右のサイトナビゲーションリンク
  menu: 
    - name: 表紙
      url: /
    - name: タグ
      url: /tags/
    - name: アーカイブ
      url: /archives/
    - name: フレンドリーリンク
      url: /friends/
    - name: ページ
      url: /page/

  # ナビゲーションバーは常に画面の上部に表示されます
  # 画面幅が1080 px以上の場合にのみ有効
  sticky: false

# カバーカバー設定
cover: 

  # 上部カバーに表示されるサイト名
  sitename: テスト!!

  # アバターの構成が空でない場合、アバターを使用してサイトネームが推奨されます
  avatar: 
  
  # SiteName/Avatarの下の文の紹介
  description: 僕のサイトです。

image.png

4.6.自分のサイトに反映

コマンド
hexo clean
hexo deploy

自分のサイトを確認
image.png

締め

_config.ymlを見ると文字の色やフッターなど色々変更できそうです。
次回はいよいよホスト名を設定していこうと思います。
引き続きよろしくお願いします。

以上お疲れさまでした。

シリーズ

>Part1(サービスの選定~GithubPagesの設定まで)
https://qiita.com/shinpinoshi/items/96e6b0948c3478c961ce

>Part2(Hexoの設定~Hexoで生成したサイトの公開)
https://qiita.com/shinpinoshi/items/c20cf54925bd32f664ab

>Part4
作成中

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?