HTML code of my blog -
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
public @ 6eccd57

My blog's source code

Jimmy Song's blog source code

Proudly powered by Hugo ❤️, Theme by Beautiful Jekyll adapted to Beautiful Hugo


Let me show you how to add and debug a new post and push it to Github pages and building a new searching index.

1. Add a new post

Use this command to create a new post:

hugo add posts/

After the new post created, it is located at ./content/posts/

2. Post head matters

Classic example:

date: "2017-06-01T20:18:57+08:00"
draft: false
title: "微服务管理框架service mesh——istio安装笔记"
subtitle: "手把手教你安装Istio service mesh"
categories: "cloud-native"
tags: ["kubernetes","istio","service-mesh"]
description: "对文章的简要描述 SEO used for description"
bigimg: [{src: "", desc: "威海东部海湾 May 28,2017"}]
nocomment: true
postmeta: false

bigimg:an array, you can specify multiple images in map lists.

postmeta:whether show the post meta data below a post title/subtitle

nocomment: whether show the comment box

3. Preview and debug

Execute this command the build a preview:

hugo server

Visit http://localhost:1313 for the website preview.

4. Update algolia index

Execute this command to build a new algolia index at the project's base path:

grep -v '"content":' algolia.json>rootsongjc-hugo.json
rm -f algolia.json

As the new post created there should be a new record added to this file public/rootongjc-hugo.json.