spf13 / hyde

Port of Mdo's excellent theme to Hugo
Other
556 stars 579 forks source link

Is it possible to hide the date? #80

Closed joaogui1 closed 2 years ago

joaogui1 commented 4 years ago

I've got some pages where the date doesn't matter (I don't even remember when I last updated them), is it possible to hide the dates?

iroQuai commented 2 years ago

Create a html layout for pages without dates and save in folder "layouts". Choose that layout in the metadata of the page

edit: create file ...\layouts_default\nodatepage.html copy the stuff below into the file and save the file

{{ define "main" -}}
<section>
  <h2>{{ .Title }}</h2>
  {{ .Content }}
</section>
{{- end }}

Next, create a new static page named "apagewithoutdates" Open ...\content\apagewithoutdates.md add a line to the frontmatter: layout: nodatepage save and test!