About Creating a New Post With Hugo

Overview

這篇文章是怎麼產生的呢?

hugo new posts/about-creating-a-new-post-with-hugo.md

這篇文章所在的實體路徑為 ~/content/posts/about-creating-a-new-post-with-hugo.md

檔案內容

---
title: "About Creating a New Post With Hugo"
date: 2021-11-07T01:05:32+08:00
draft: true
---

檔案內容是怎麼來的?

archetypes\default.md

怎麼判斷要用這份的? link

  1. archetypes/posts.md
  2. archetypes/default.md
  3. themes/<theme>/archetypes/posts.md
  4. themes/<theme>/archetypes/default.md

怎麼在本機預覽這篇文章在 hugo 上會如何呈現呢?

hugo server -D

-D 代表可以在 hugo 上瀏覽 draft: true 的文章

重新載了 hugo blog source code 後,該如何還原 theme 呢?

在本機開發時, hugo server -D 起來後卻是白畫面QQ

看起來是沒做 theme 的還原

先前是透過 git submodule add https://github.com/chipzoller/hugo-clarity themes/hugo-clarity 這個方式來安裝 theme

安裝後,你可以查看 .gitmodules 這份檔案,裡頭會紀錄你載過的 submodule

還原、更新 submodule 的語法如下:

git submodule update
comments powered by Disqus