gokarna-theme / gokarna-hugo

A minimal opinionated theme for Hugo
https://gokarna-hugo.netlify.app
GNU General Public License v3.0
357 stars 139 forks source link

feat(archetypes): add default front matter #241

Closed jamesericdavidson closed 2 weeks ago

jamesericdavidson commented 3 weeks ago

Implement some basic Hugo front matter, and custom Gokarna front matter, to make life more convenient for hugo new users.

Following Hugo's lookup order:

N.B. Archetypes follow the YAML syntax already laid out in the docs.

Composition and behaviour

To do


Example output

hugo new "posts/My First Post.md" && hugo new "Here Be Dragons.md"

cat content/posts/My\ First\ Post.md content/Here\ Be\ Dragons.md 

---
date: 2024-10-01
# description: ""
# image: ""
lastmod: 2024-10-01
showTableOfContents: false
# tags: ["",]
title: "My First Post"
type: "post"
---

---
date: 2024-10-01
# image: ""
lastmod: 2024-10-01
showTableOfContents: false
title: "Here Be Dragons"
type: "page"
---

Screenshots

image

image

netlify[bot] commented 3 weeks ago

Deploy Preview for gokarna-hugo ready!

Name Link
Latest commit e09e1d51dee40a8ce6a80ecabae7994d75d3b9db
Latest deploy log https://app.netlify.com/sites/gokarna-hugo/deploys/66fbe810d2609400092aea46
Deploy Preview https://deploy-preview-241--gokarna-hugo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

jamesericdavidson commented 3 weeks ago

The docs are a tad lengthy, but otherwise this is ready for review. Cheers.

P.S. I omitted --kind as it shouldn't be relevant for most users - the lookup order already handles that job.

526avijitgupta commented 2 weeks ago

I don't have access to my laptop until Monday, I'll review later. Thanks @jamesericdavidson for the PR!

@yashmehrotra could you please review. Feel free to merge if it looks good to you :)

yashmehrotra commented 2 weeks ago

Thanks a lot @jamesericdavidson

Merging this