liangjunmo's blog

My first post

一直想搞个博客写写东西,之前倒腾了 WordPress、Typecho、Hexo、Hugo,每次都是在主题和配置上浪费时间,最后发现一篇文章也没写出来。这次用 Jekyll + GitHub Pages 重新搞了一个,主题用的是 GitHub Pages 默认的 primer,没有太多的配置但是够用,希望这次专注于内容本身写点有用的东西。

Jekyll + GitHub Pages 部署

Jekyll 官方文档:https://jekyllrb.com/docs/

GitHub Pages 官方文档:https://docs.github.com/zh/pages/quickstart

GitHub Pages 在部署的时候默认会使用 Jekyll 生成静态文件,所以我的博客的 repository 中只有源代码,源代码中的文件及目录遵循 Jekyll 的 pagesposts 规范。

因为想要在本地预览,所以加了一个 Gemfile,按照 GitHub Pages 文档上的要求做了修改,运行 bundle exec jekyll serve 后就会在 _site 目录生成静态文件并启动 HTTP 服务。

常用内容样式

文本:正常,斜体加粗删除代码

无序列表:

有序列表:

  1. First item
  2. Second item
  3. Third item
    1. Indented item
    2. Indented item
  4. Fourth item

引用:

这是一段引用。

代码块:

package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

发布时间:2024-04-14
更新时间:2024-04-14
作者:liangjunmo
版权:禁止任何形式的转载