大约2年前,在GitHub上用Jekyll
搭建了自己的博客:https://zhang0peter.com/
。然后写了几篇博客后就没动过了。
然后2019年我开始在CSDN上写博客,GitHub上的博客更没动过了。
现在寒假期间想起了自己的GitHub博客,于是打算重新搭建。
先安装ruby
,windows的下载链接:RubyInstaller for Windows
然后用ruby
安装github-pages
:
> gem install github-pages
Installing ri documentation for github-pages-203
Done installing documentation for safe_yaml, rouge, forwardable-extended, pathutil, mercenary, liquid, kramdown, rb-fsevent, ffi, rb-inotify, listen, jekyll-watch, sass-listen, sass, jekyll-sass-converter, concurrent-ruby, i18n, http_parser.rb, eventmachine, em-websocket, colorator, public_suffix, addressable, jekyll, ruby-enum, commonmarker, jekyll-commonmark, jekyll-commonmark-ghpages, ethon, typhoeus, multipart-post, faraday, sawyer, octokit, dnsruby, github-pages-health-check, jekyll-redirect-from, jekyll-sitemap, jekyll-feed, jekyll-gist, jekyll-paginate, coffee-script-source, execjs, coffee-script, jekyll-coffeescript, jekyll-seo-tag, jekyll-github-metadata, jekyll-avatar, rubyzip, jekyll-remote-theme, gemoji, thread_safe, tzinfo, zeitwerk, activesupport, mini_portile2, nokogiri, html-pipeline, jemoji, jekyll-mentions, jekyll-relative-links, jekyll-optional-front-matter, jekyll-readme-index, jekyll-default-layout, jekyll-titles-from-headings, jekyll-swiss, minima, jekyll-theme-primer, jekyll-theme-architect, jekyll-theme-cayman, jekyll-theme-dinky, jekyll-theme-hacker, jekyll-theme-leap-day, jekyll-theme-merlot, jekyll-theme-midnight, jekyll-theme-minimal, jekyll-theme-modernist, jekyll-theme-slate, jekyll-theme-tactile, jekyll-theme-time-machine, unicode-display_width, terminal-table, github-pages after 43 seconds
83 gems installed
然后就可以进行配置了
官方文档:
关于 GitHub Pages 和 Jekyll - GitHub 帮助
GitHub Pages - Jekyll • 简单静态博客网站生成器
具体过程参考:barryclark/jekyll-now: Build a Jekyll blog in minutes, without touching the command line.
搭建一个免费的,无限流量的Blog----github Pages和Jekyll入门 - 阮一峰的网络日志
推荐的模板:
mzlogin/mzlogin.github.io: My Blog / Jekyll Themes / GitHub Pages 博客模板
这里说一个怎么更新库吧:
bundle install
bundle update