用于写日志的 Jekyll 静态网站

2021-01-18 22:34:56 +08:00
 professordeng

在线 demo : https://professordeng.com/log/

github 源码 : https://github.com/professordeng/log

主题亮点 :

我一直认为个人日志网站要尽量简洁,最好是静态网站,就不用操心数据和服务器的维护了。

之后开始接触 Jekyll 静态网站,折腾过很多炫酷的设计,最后发现,用于写文章的在线网站还是越简洁越好。

一开始是用其他人的主题,后来发现排版和不同设备兼容性都不太好,索性自己设计主题,主题从复杂炫酷到简洁,当然,这里的简洁指的是风格和代码量简洁,必要的功能点都齐全。

1981 次点击
所在节点    程序员
21 条回复
professordeng
2021-01-18 22:37:59 +08:00
开代理后浏览 https://professordeng.com/log/2020/04/06/markdown.html 的效果会很好
professordeng
2021-01-18 23:02:11 +08:00
流程图效果还是蛮丰富的,具体查看 https://mermaid-js.github.io/mermaid/#/
professordeng
2021-01-18 23:10:14 +08:00
@professordeng 之前为了项目文档流程图,花了我 200 多块买了个 WPS 会员
hilow
2021-01-19 09:13:55 +08:00
赞一个,正好有类似需求
zhangysh1995
2021-01-19 12:48:40 +08:00
很简洁,收了
no1xsyzy
2021-01-19 13:00:26 +08:00
啊,原来是 journal,我还以为是 log (
pming1
2021-01-19 15:19:36 +08:00
@no1xsyzy 我也看成 log 了 (
nianyu
2021-01-19 16:02:30 +08:00
点赞
Pythoner666666
2021-01-19 16:39:27 +08:00
配合 github 食用更佳 https://qq446506536.github.io/
hilow
2021-01-23 16:18:36 +08:00
@professordeng
能帮忙说说怎么在本地预览吗?
git clone https://github.com/professordeng/log 之后 ,执行命令都提示少 Gemfile,这个文件是不是能从 _config.yml 生成呢?
```txt
$ bundle exec jekyll serve
Could not locate Gemfile or .bundle/ directory
$ bundle install
Could not locate Gemfile
```
professordeng
2021-01-25 09:31:09 +08:00
@hilow 我没有使用 Gemfile,所以你只需要执行 jekyll serve 即可,执行时如果报错,应该是缺少一些插件,按照报错信息进行安装即可
hilow
2021-01-25 13:53:55 +08:00
@professordeng
那你怎么安装的 jekyll 呢? win mac linux 哪个平台的安装方法都行。
另外 ruby gem bundle jekyll 分别是什么版本。
我这遇到点问题,感觉跟版本有关,想跟你对齐下版本和安装方法。
professordeng
2021-01-25 14:05:40 +08:00
@hilow 版本使用最新的 Jekyll 即可,这里有不同系统安装 jekyll 的方式 https://jekyllrb.com/docs/installation/
hilow
2021-01-25 17:57:36 +08:00
@professordeng
谢谢。
我就是按照官网安装的。但是无法识别 avator tag



我的版本如下所示


$ jekyll serve
Configuration file: /home/ww/src/tmp/log/_config.yml
Source: /home/ww/src/tmp/log
Destination: /home/ww/src/tmp/log/_site
Incremental build: disabled. Enable with --incremental
Generating...
Liquid Exception: Liquid syntax error (line 106): Unknown tag 'avatar' in /home/ww/src/tmp/log/_posts/2020-04-06-markdown.md
------------------------------------------------
Jekyll 4.2.0 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------

$ ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]

$ bundle -v
Bundler version 2.2.6

$ gem -v
2.7.6

$ jekyll -v
jekyll 4.2.0

$ gem list
addressable (2.7.0)
afm (0.2.2)
Ascii85 (1.0.2)
bigdecimal (default: 1.3.4)
blankslate (3.1.3)
bundler (2.2.6, 1.16.1)
classifier-reborn (2.2.0)
cmath (default: 1.0.0)
coderay (1.1.2)
coffee-script (2.4.1)
coffee-script-source (1.10.0)
colorator (1.1.0)
concurrent-ruby (1.1.8)
csv (default: 1.0.0)
date (default: 1.0.0)
dbm (default: 1.0.0)
did_you_mean (1.2.0)
em-websocket (0.5.2)
etc (default: 1.0.0)
eventmachine (1.2.7)
execjs (2.6.0)
fast-stemmer (1.0.2)
fcntl (default: 1.0.0)
ffi (1.9.10)
fiddle (default: 1.0.0)
fileutils (default: 1.0.2)
forwardable-extended (2.6.0)
gdbm (default: 2.0.0)
hashery (2.1.2)
http_parser.rb (0.6.0)
i18n (1.8.7)
io-console (default: 0.4.6)
ipaddr (default: 1.2.0)
jekyll (4.2.0)
jekyll-avatar (0.7.0)
jekyll-coffeescript (1.0.1)
jekyll-feed (0.3.1)
jekyll-gist (1.1.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (2.1.0, 1.5.2)
jekyll-watch (2.2.1, 1.3.0)
json (default: 2.1.0)
kramdown (2.3.0, 1.15.0)
kramdown-parser-gfm (1.1.0)
launchy (2.3.0)
liquid (4.0.0)
listen (3.1.5)
mercenary (0.4.0, 0.3.6)
mime-types (3.1)
mime-types-data (3.2015.1120)
minitest (5.10.3)
molinillo (0.6.4)
multi_json (1.12.1)
net-http-persistent (2.9.4)
net-telnet (0.1.1)
oj (3.4.0)
openssl (default: 2.1.1)
parslet (1.8.2)
pathutil (0.16.2)
pdf-core (0.6.1)
pdf-reader (1.4.0)
pg (0.19.0)
posix-spawn (0.3.13)
power_assert (0.2.7)
prawn (2.1.0)
prawn-table (0.2.2)
psych (default: 3.0.2)
public_suffix (4.0.6)
pygments.rb (1.2.0)
rake (12.3.1)
rb-inotify (0.9.7)
rdiscount (2.1.8)
rdoc (default: 6.0.1)
redcarpet (3.4.0)
rexml (3.2.4)
rouge (3.26.0, 2.2.1)
ruby-rc4 (0.1.5)
safe_yaml (1.0.4)
sass (3.4.23)
sassc (2.4.0)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
sequel (5.6.0)
sequel_pg (1.6.16)
stringex (2.8.4)
stringio (default: 0.0.1)
strscan (default: 1.0.0)
terminal-table (2.0.0)
test-unit (3.2.5)
thor (0.19.4)
toml (0.2.0)
ttfunk (1.4.0)
unicode-display_width (1.7.0)
webrick (default: 1.4.2)
yajl-ruby (1.3.1)
zlib (default: 1.0.0)
hilow
2021-01-25 17:59:04 +08:00
@professordeng
大佬执行这几个命令我看下就行


ruby -v
bundle -v
gem -v
jekyll -v
gem list
professordeng
2021-01-25 21:33:07 +08:00
bundle -v
Bundler version 2.1.4
professordeng
2021-01-25 21:33:35 +08:00
ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
professordeng
2021-01-25 21:34:25 +08:00
gem -v
3.0.3
jekyll -v
jekyll 4.1.1
professordeng
2021-01-25 21:35:31 +08:00
@hilow gem list 太多了插件了
hilow
2021-01-26 23:51:27 +08:00
@professordeng 终于在 mac 上收拾好了。感谢

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/746095

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX