brew install rbenv ruby-build
Add this to ~/.zshrc
if you are using zsh:
eval "$(rbenv init - zsh)"
rbenv install 3.1.3
rbenv local 3.1.3
Check if you have got the desired version:
ruby -v
It should output something like this:
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
If you see an older version like this:
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]
Check previous steps.
gem install bundler jekyll
bundle config set --local path 'vendor/bundle'
bundle install
If you encounter any issues with any Gems, try deleting the Gemfile.lock and running the command again.
exclude: - .ruby-gemset - .ruby-version - Gemfile - Gemfile.lock - Makefile - README.md - vendor/
You will also need to add the following lines into .gitignore
:
vendor/ .bundle/
bundle exec jekyll serve --watch
I hope you are enjoying the ride. However, if you found the process complex and difficult, you are not alone. That is also part of the reason I started working on Planetable.xyz, a static site generator with a graphical interface and a built-in IPFS node. With the Planet app, you don't need any command line knowledge to start blogging and self-hosting on your Mac. You don't even need an account or cloud because Planet has a built-in IPFS node that can help you publish your blog directly to the Internet as an InterPlanetary Name. You can later link that InterPlanetary Name (IPNS) to your Ethereum Name (.eth name). Since both IPFS and ENS are not controlled by any single entity, you can publish your blog in a fully decentralized way.
这篇教程写得不错。这里收藏一下。
[模版问题] - 似乎在 __config.yml 这个文件里可以直接用在 Github 上的主题。比如输入 remote_theme: aspirethemes/type 就可以用到 “Type” 这个主题。
这里提问一个问题。
[例子]
最近切换留言板,顺便优化了下主题,有喜欢的可以用一下
特色:简洁纯净,主题资源请求<20KB,秒开页面,支持自适应,支持全文检索,插件可配置
]]>
发现在 vscode 的设置里有两项叫 Markdown preview:Breaks 和 Markdown-preview-enhanced:Break On Single New Loine
打开了之后 vscode 预览界面中的确换行了
但是实际生成的 blog 中还是没有换行
要每一行自己加一个<br>
或者两个空格也太麻烦了呀
请问这到底要更改什么设置才能解决呢(T▽T)
]]>简介:一款为极简主义者打造的极简主题。
]]>两个方案:
其实很简单, 一开始以为无法对 Post 进行操作, 后来发现可以从 post 的 header 里面进行参数设置
layout: post title: 《 10101 》 EP0 :我太受欢迎了该怎么办 category : Comic tags : [Comic, 10101] stickie: true
然后 liquid 进行判断
{* for post in site.posts *} {* if post.stickie != true *} {* continue *} {* endif *} <div>置顶文章细节</div> {* endfor *} {* for post in site.posts *} {* if post.stickie == true *} {* continue *} {* endif *} <div>普通文章细节</div> {* endfor *}
当然这个可以进行多种扩展, 比如只输出特定类别的文章等等,这里就是个只输出带有 comic 这个 tag 的 post
{% for post in site.posts %} {% assign isComic = 0 %} {% for tag in post.tags %} {% if tag == comic %} {% assign isComic = 1 %} {% endif %} {% endfor %} {% if isComic == 0 %} {% continue %} {% endif %} {% endfor %}
我太懒了没去研究 o( ̄▽ ̄)o
用 JQuery.sort()给 DOM 排序再渲染一下即可
这个排序还要额外对时间进行比较 //果然懒一点是没错的 o( ̄▽ ̄)o
Repo Link: JekyllTheme-ProjectGaia
See demo page here: Demo Page
]]>测试了下
文件数量小(15 篇)的时候 生成很快 2s .. 每篇文章也就 50kb 文件数量大 ( 650 篇) .. 生成花了 46 分钟啊 每篇文章有... 5.6MB 啊
这算 Bug 么..... 还是我代码写的太烂了....
]]>fork 了minimal-mistakes 3.0
按照 manual https://jekyllrb.com/docs/posts/ 在 _posts 目录下新加了 2016-05-09-git-manual.md 文件后 push 。 预览效果如上怎么跟纯文本一样而不是预期的 markdown 解析格式呢。
]]>话说有招儿吗。
我已经从 hexo 滚回 jekyll 一次了。。。
]]>Almace Scaffolding (aka. AMSF) 是我自己长期维护的一套框架,基于 Jekyll ,上手速度一般,但习惯后我觉得还是比较好用的,基本特征如下:
AMSF 框架自带一款默认主题 Curtana,有以下特征:
后来吐槽了下静态内容,感觉没有 DB 还是不得劲,吐槽了一下。 不过实践出真知,所以我就用 Jekyll 搭建了一个试试。
顺便记录了自己搭建过程和写博客的流程: http://pizida.com/technology/2016/03/03/use-jekyll-create-blog-on-github/
]]>因为 push 以前我会在本地启动,看下格式啥的。这个命令: jekyll serve ,但是悲剧的是:博客首页的内容总是空的,不知道什么情况。。有了解 jekyll 的吗?
求给个 debug 的方法
]]>color : #123456
\
转义无效,放_config.yml
里还出错… ]]>省去了很多的安装麻烦。这东东设计标准还挺简洁。
➜ jnuc093.github.io git:(master) ✗ gem install github-pages
此步骤安装时候有点慢大概10分钟。
Emoji 啥玩意还没用到。域名还没有单独绑定。
]]>