liboyue23 / rootsongjc-hugo

My blog's code

Home Page:https://jimmysong.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My blog's source code

Jimmy Song's blog source code

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

Usage

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/new.md

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

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: "https://res.cloudinary.com/jimmysong/image/upload/images/20170528033.jpg", 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:

hugo-alogolia
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.

Acknowledgements

About

My blog's code

https://jimmysong.io


Languages

Language:HTML 51.4%Language:CSS 39.1%Language:JavaScript 8.5%Language:Shell 1.0%