Skip to content

ningg/ningg.github.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,111 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

动手搭建自己的博客

我写了一篇博客GitHub上搭建个人网站, 需要的可以读一下。

1.ChangeLog

  • 2025年8月,修正 RSS 订阅信息,README 中,增加个人联系方式。
  • 2019年3月,进行网站域名备案。
  • 2019年2月,post 页面,增加 同类文章 模块。
  • 2014年5月,基于BeiYuu & Havee 的博客模版,改进出此博客
  • 2013年8月,基于BeiYuu 博客模版,在GitHub上建立个人网站
  • 2012年9月,在内网使用Wordpress搭建个人博客

2. 联系我

关注微信公众号(订阅号: ningg ),留言交个朋友:

微信搜索: 公众号 ningg or 微信扫码,联系我,不吃亏.


也可以,通过 weibo or mail 联系我:

3. 订阅我的博客

附录A. Mac 下, 搭建开发调试环境

A.0. 推荐启动方式

点击展开

优先使用仓库内置脚本:

cd ./ningg.github.com
./bin/dev

说明:

  • 默认启动地址:http://127.0.0.1:4000
  • 如果 4000 端口已经被旧的本地 Jekyll/Ruby 进程占用,脚本会自动清理后重新启动
  • 如果占用 4000 的不是 Jekyll/Ruby 进程,脚本会直接报错并停止,避免误杀其他服务

也可以通过环境变量覆盖地址:

JEKYLL_HOST=127.0.0.1 JEKYLL_PORT=4001 ./bin/dev

A.1. 搭建开发调试环境(旧版Mac)

点击展开

搭建开发环境, 参考 Blogging with Jekyll.

详细细节:

# 1.安装最新版 ruby
$ brew install ruby

# 2.安装 bundle 和 jekyll
$ gem install --user-install bundler

$ gem install --user-install jekyll

# 3. 退出 iterm 终端, 重新打开, 并安装 bundle
$ bundle install

Could not locate Gemfile

$ vim Gemfile
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

$ bundle install


# 4. 前往 jekyll blog 的目录下
$ cd /Users/guoning/ningg/github/ningg.github.com

# 5. 启动 jekyll 服务(推荐)
$ ./bin/dev

# 兜底方式:手动启动 jekyll 服务
$ bundle exec jekyll serve --host 127.0.0.1 --port 4000 --trace

# 下述方式, 只处理增量变更
$ bundle exec jekyll serve --incremental

# 6. 浏览器访问效果
http://127.0.0.1:4000

A.2. Mac 的 M2 芯片,搭建开发环境(新版Mac)

点击展开

基本思路:

  • 1.确定 terminal 处于 arm64 模式,而不是 Rosetta mode.
  • 2.切换为 zsh
  • 3.按照官网,从头安装 ruby 和 jekyll,官网参考
  • 4.提前删除项目下的 Gemfile.lock

将 terminal 调整为 arm64 模式:

// 1.查询当前模式
$ uname -m
x86_64

// 2.如果上面返回 x86_64 而不是 arm64,则,需要直接卸载 iterm/iterm2,然后重装
// 卸载可以在 finder 中搜索到应用,然后,移到废纸篓
// 重装可以使用 brew
brew install iterm2

About

Ning Guo's blog

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors