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

Features: Add option to show more informations (such as projects) on homepage instead of only posts #161

Closed Resist4263 closed 1 year ago

Resist4263 commented 1 year ago

Hello, I hope that this theme can add option to show more information, such projects, talks on homepage, instead of only posts. The current homepage is a little empty and don't show visitors more key infromation.

yashmehrotra commented 1 year ago

@Resist4263 You can add any content to the homepage in markdown by adding a content/_index.md file

Resist4263 commented 1 year ago

@yashmehrotra But the content in _index.md will display in center.

yashmehrotra commented 1 year ago

How would you want it to be displayed then?

Resist4263 commented 1 year ago

I hope it could be left-justified and can support html.

yashmehrotra commented 1 year ago

You can write HTML in markdown. _index.md should look like

---
---
<div style="width:0px;">Left Justified</div>

Note: The empty --- frontmatter is important

Also, add this in config.toml

[markup.goldmark.renderer]
  unsafe = true # Allow HTML in md files

Ref:

Resist4263 commented 1 year ago

Thanks a lot, that works for me!