gokarna-theme / gokarna-hugo

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

Display content/_index.md if it exists #119

Closed jamesericdavidson closed 2 years ago

jamesericdavidson commented 2 years ago

Improvement for #109. Test if content/_index.md exists, instead of configuring enableFrontMatter.

I thought the condition for displaying content on the home page could be made more convenient for people switching themes, or who want to add native Hugo front matter without theme configuration.

netlify[bot] commented 2 years ago

Deploy Preview for gokarna-hugo ready!

Name Link
Latest commit c99b6dbc37f951c199c970a541b2dc416ca6021b
Latest deploy log https://app.netlify.com/sites/gokarna-hugo/deploys/62fbc6391df4cb000884c265
Deploy Preview https://deploy-preview-119--gokarna-hugo.netlify.app/posts/theme-documentation-basics
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 settings.

yashmehrotra commented 2 years ago

@jamesericdavidson The hugo build command is breaking, might want to make sure it works on your local first

jamesericdavidson commented 2 years ago

I think this is related to the fileExists function. Works on a local server, but GitLab CI/CD and GitHub build checks aren't happy. I'll have a look!

Regards, James Davidson

-------- Original Message -------- On 16 Aug 2022, 06:04, Yash Mehrotra wrote:

@.***(https://github.com/jamesericdavidson) The hugo build command is breaking, might want to make sure it works on your local first

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

jamesericdavidson commented 2 years ago

@yashmehrotra I committed a bad version of the file, but it's now fixed.

Additionally evaluating that content/_index.md isn't empty before creating an <hr> and empty <section>.

yashmehrotra commented 2 years ago

Thanks, merging

jamesericdavidson commented 2 years ago

Thanks for merging