使用Pelican+Github搭建个人博客网站
Posted on 六 09 十月 2021 in Pelican
使用Pelican+Github搭建个人博客网站
-
官方文档
- https://docs.getpelican.com/en/latest/index.html
- 内部结构 https://docs.getpelican.com/en/stable/internals.html
-
参考
- Run your blog on GitHub Pages with Python -Create a blog with Pelican, a Python-based blogging platform that works well with GitHub.
- 使用 Pelican 和 GitPages 设置网站的分步指南
- 用pelican搞一个自己的blog
- How to Create Your Data Science Blog with Pelican and Jupyter Notebooks
- 用Pelican+Github搭建个人博客网站
- 善用强大的Makefile自动化脚本文件
- Favicon not recognized
-
主题
- https://github.com/alexandrevicenzi/Flex
- https://github.com/getpelican/pelican-themes/tree/master/bootstrap2-dark
-
安装
- pip install pelican
- pip install markdown
-
命令
- 快速创建工程
- pelican-quickstart
- 生成HTML
- pelican content
- 服务器预览
- make serve
- "pelican" -l "/Users/play/CODE/pelican_site/content" -o "/Users/play/CODE/pelican_site/output" -s "/Users/play/CODE/pelican_site/pelicanconf.py"
- make serve
- 监听修改内容 make devserver
- 发布?
- make publish
- 快速创建工程
(.py39) pro:pelican_site play$ pelican content
WARNING: Docutils has no localization for 'zh'. Using 'en' instead.
WARNING: Watched path does not exist: /Users/play/CODE/pelican_site/content/images
Done: Processed 2 articles, 0 drafts, 0 pages, 0 hidden pages and 0 draft pages in 0.57 seconds.
- 自动重新加载
(.py39) pro:demo_plugin1 play$ make devserver
"pelican" -lr "/Users/play/CODE/pelican_site/demo_plugin1/content" -o "/Users/play/CODE/pelican_site/demo_plugin1/output" -s "/Users/play/CODE/pelican_site/demo_plugin1/pelicanconf.py"
--- AutoReload Mode: Monitoring `content`, `theme` and `settings` for changes. ---
Docutils has no localization for 'zh'. Using 'en' instead.
Serving site at: http://127.0.0.1:8000 - Tap CTRL-C to stop
Watched path does not exist: /Users/play/CODE/pelican_site/demo_plugin1/content/images
-> Modified: settings, content, theme. re-generating...
Done: Processed 2 articles, 0 drafts, 0 pages, 0 hidden pages and 0 draft pages in 0.28 seconds.
#修改后
-> Modified: content. re-generating...
Done: Processed 2 articles, 0 drafts, 0 pages, 0 hidden pages and 0 draft pages in 0.20 seconds.
插件 plugins
- 文档
- https://docs.getpelican.com/en/latest/plugins.html
- https://github.com/getpelican/pelican-plugins
- https://docs.getpelican.com/en/stable/internals.html
- 参考
- 好文章 Building Plugins in Pelican Part I - Basics
- http://adamcot.com/posts/2018/02/building-pelican-plugins-ii/
- http://adamcot.com/posts/2018/02/building-pelican-plugins-iii/
- 好文章 Building Plugins in Pelican Part I - Basics