June 30, 2021 by Yi Lee
為Hugo文章分類、加上標籤
每篇文章的最開頭,需寫入以下程式碼,方能順利顯示在Hugo的網頁上
title: "這裡寫文章標題"
date: 2019-10-29T10:07:47+06:00
draft: false
# post thumb 文章的縮圖
image: "images/blog/post-3.jpg"
# meta description
description: "this is meta description"
# taxonomies
categories:
- "Go Language"
tags:
- "Photos"
# post type
type: "post"
預設屬性分別為:
- title:標題名
- date:日期
- draft:草稿,如果是 true 生成網站時,不包括此頁面
常用 Front Matter 屬性
其他 Hugo 支持的常用 Front Matter 屬性
- description:內容描述,主要用於 SEO 優化
- tags:標籤
- categories:分類
- keywords:關鍵字
- url:文章 url 名稱,預設使用檔案名稱
- weight:列表頁的文章排序,越小越靠前,無設定則依照時間排序