Hexoブログ開発-V7.1.1からV7.8.0へのアップグレード

I.概要

古いバージョンはブログが多すぎてコンパイル時間が長すぎて、ファイルが多すぎるためにコンパイル中にJavaScript heap out of memory問題発生する可能性があるため、今回は最新の安定バージョン(V7.8.0)にアップグレードします。

  • コールテーマ

  • npmのインストールは、最新の検出ツールに依存します

  • プロジェクトの下の_config.ymlを変更します(v7.1.1と比較して)

  • themes / nextの下のテーマを変更します

<!-もっと->

2つのコールテーマ

  • hexo-theme-next Webサイトを開いて、手順ガイドを表示します

  • ブログディレクトリを開き、gitcloneコマンドを実行しますgit clone https://github.com/theme-next/hexo-theme-next themes/next

     

3つのインストールnpmは、最新の検出ツールに依存します

  • 依存ツールをインストールする

    npm install -g npm-check-updates
  • 最新バージョンを見る

    ncu 

     

  • ncu -uを実行してアップグレードしてから、既存のノードモジュールを削除し、npm installを実行して新しい依存関係をインストールします(hexo-rendererでマークされたバージョン3.0.0のバグのため、2.0.0を使用します)

    ncu -u

     

4つはプロジェクトの下の_config.ymlを変更します(v7.1.1と比較して)

4.1 permalink_defaults

#add v7.8.0
permalink_defaults:
pretty_urls:
  trailing_index: true 
  trailing_html: true 

4.2 external_link

#add v7.8.0
external_link: 
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: ''

4.3ハイライト、prismjs

# add v7.8.0
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace: '' 
  wrap: true
  hljs: false
prismjs:  
  enable: false
  preprocess: true
  line_number: true
  tab_replace: ''

4.4 meta_generator

meta_generator: true  

4.5updated_option

updated_option: 'mtime' 

4.6v7.1.1からv7.8.0にアップグレードした後のデフォルトの効果

 

 

5つはthemes / nextの下のテーマを変更します

5.1 _config.yml

5.1.1フッターを変更する

footer:
  since: 2017 
  icon:
    name: heart 
    animated: false
    color: "#ff0000"
  copyright: pgzxc   
  powered: false

5.1.2beianを変更する

beian: 
    enable: true
    icp: 京ICP备xxx
    gongan_id:
    gongan_num:
    gongan_icon_url:

5.1.3スキーム

scheme: Gemini

5.1.4メニュー

menu: 
  home: / || fa fa-home
  archives: /archives/ || fa fa-archive
  categories: /categories/ || fa fa-th
  tags: /tags/ || fa fa-tags
  comments: /comments/ || fa fa-comments 
menu_settings:
  icons: true
  badges: true #modify 2020-08-12

5.1.5アバター

avatar: 
  url: /images/avatar.jpg
  rounded: true
  rotated: false

5.1.6ソーシャル

social:
  GitHub: https://github.com/PGzxc || fab fa-github
  CSDN: http://blog.csdn.net/calvin_zhou || fab fa-book
  微博: http://weibo.com/5582039920 || fab fa-weibo
  简书: http://www.jianshu.com/u/c5cdcb4dc52b || fab fa-heartbeat
social_icons:
  enable: true
  icons_only: false
  transition: false

5.1.7リンク

links_settings:
  icon: fa fa-link
  title: 友情链接
  # Available values: block | inline
  layout: inline
​
links:
  鸿洋: https://wanandroid.com/

5.1.8コメント

livere_uid: MTAyMC8zMjQ1OC85Msxxx

5.1.9leancloud_visitors

leancloud_visitors: 
  enable: false
  app_id: xoStNXjq2xNoDRjTltoOztdq-gzGzoHsz
  app_key: 6g89MPFNvTH2YHnKMAK1n1V8

5.1.10 busuanzi_count

busuanzi_count:
  enable: true
  total_visitors: true
  total_visitors_icon: fa fa-user
  total_views: true
  total_views_icon: fa fa-eye
  post_views: true
  post_views_icon: fa fa-eye

5.1.11 local_search

local_search: 
  enable: true
  trigger: auto
  top_n_per_article: 1
  unescape: false
  preload: false

5.2言語/zh-CN.yml

menu:  
  home: 首页
  archives: 归档
  categories: 分类
  tags: 标签
  about: 关于
  search: 搜索
  comments: 留言板 #add 2020-08-12
  schedule: 日程表
  sitemap: 站点地图
  commonweal: 公益 404

おすすめ

転載: blog.csdn.net/Calvin_zhou/article/details/107967989