惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
GbyAI
GbyAI
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 叶小钗
A
About on SuperTechFans
M
MIT News - Artificial intelligence
宝玉的分享
宝玉的分享
雷峰网
雷峰网
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Martin Fowler
Martin Fowler
Google DeepMind News
Google DeepMind News
博客园 - Franky
B
Blog RSS Feed
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research

jdhao's digital space

Conversion between base64 and OpenCV or PIL Image 腾讯云对象存储博客图床开启 CDN 加速(不需要购买额外域名) Search and Replace in Multiple Files in Vim/Neovim Change Table Column Width in LaTeX Image or Table Side by Side in LaTeX LaTeX 并排显示图像或表格 Firenvim: Neovim inside Your Browser Content inside HTML tags missing in Latest Hugo? Creating Markdown Front Matter with Ultisnips Labelme JSON 标注格式转 voc XML 格式 Nifty Nvim Techniques That Make My Life Easier -- Series 6 macOS 下如何为视频制作字幕 Running Command Asynchronously inside Neovim Resolving Merge Conflict after Git Stash Pop Pylint: command not found? A Hands-on Experience with Neovim's Built-in LSP Support How to Convert PDF to Images with Imagemagick 互联网上常用缩略语集锦 File Backup in Neovim Converting PDF Pages to Images with Poppler Nifty Nvim Techniques That Make My Life Easier -- Series 5 Neovim Configuration for System-wide Use How to sort a list of tuple or list in Python -- lambda or itemgetter? Building A Vim Statusline from Scratch 人类第一颗原子弹爆炸始末 Distributed Training in PyTorch with Horovod Learning Expect Programming Essential Knowledge about SSH Nifty LaTeX Techniques -- Series 1 更改 Adsense 邮寄地址,重新寄送 PIN
How I Manage My Personal Blog
2021-11-28 · via jdhao's digital space

In this post-web2.0 age, people seem to blog less and less, and blogs seem to be dying slowly. People are separated in different Apps where the content is not searchable by search engines.

However, I still prefer to write using a blog. In this post, I want to share how I manage my blog.

Why I blog?#

I run this blog site because I enjoy sharing knowledges or techniques I have learned. A lot of these knowledges are from blog posts of others, GitHub or Stack Overflow. Since I get these knowledges for free, I have a strong motivation to make what I have learned free for others. In a bigger sense, free exchange and access of ideas and knowledge makes the world a better place. This is also what FOSS is about.

Although some of the blog posts may only be helpful to myself, but who knows, I hope they will be helpful to someone else in some day.

What I write?#

I usually share what I have learned during my work or my spare time. I write anything I am interested.

Occasionally, I also write about what I am reading, what I thought, etc.

When I write#

I often save some notes about a topic or an idea in my free time. Later, when I have time, I will expand the notes to a full blog post. This way, I do not need to worry what to write. I always have something to share when I want to.

Tools I use for writing#

All my blog posts are written in Markdown format with the help of the greatest editor neovim1. I use neovim because it is a highly configurable editor that no other editors can compete with.

I use snippet plugins to make writing posts quicker. For previewing, I use markdown-preview.nvim, which is the best previewer for Neovim. I have shared how I write and preview Markdown efficiently in this post.

I rarely insert images into my blog post since image links tend to break easily. So I try to explain things without using images as much as I can. If I need to use images in a post, I store the image in a cloud service and use the generated image links.

Static blog generator#

I generate my blog using a static blog generator. Back in 2017 when I started this blog, I use Hexo. In Oct. 2018, I switched to Hugo for its high performance.

For comment system, I used Disqus for a long time. Recently, I have switched to use utterances, which is a lightweight comment system based on GitHub issues. You get all the power of GitHub issues for your blog comment.

Blog site hosting#

For blog hosting, I am using the good-old GitHub pages service. I have not purchased a personal domain for my blog because I think that is irrelevant. It is the content of the blog that matters most. People often get a fancy domain for their blog, and they get tired and stop writing anything.

Post backup#

In case that the post sources get lost, I have been backing up my posts periodically. Since all the blog posts are written in Markdown, I created a private GitHub repo to store the Markdown source files. I have created a backup script post_backup.sh under the Hugo blog site root to ease the operation:

#!/bin/bash
msg="backup `date`"
if [ $# -eq 1 ]
  then msg="$1"
fi

echo -e "\033[0;32mBackup posts to GitHub...\033[0m"

cd content/post
# here we start to add and commit the blog to github
git add .
git commit -m "$msg"

# push source to github
git push

echo -e "\033[0;32mBackup done...\033[0m"

# come back to blog root
cd ../..

Then I can run ./post_backup.sh to back up all my post sources.