Use the post's author from frontmatter, or else use the author from
the site's config. You MUST have one of these set or else you will
get an error during site generation. I think it's better to force
the user to define an author tag rather than only printing it if
it is defined because it is a good practice to help bots understand
content.
Use the post's meta description if it exists, otherwise use the
one from the site's config. Set them using the "description" key
in frontmatter or site config.
Note: this means there is no way to NOT have a description. You
must have *at least* a site-wide description and *optionally* a
description for each page/post's front matter.
The W3C's HTML5 documentation says that header strength (h1–h6) is
only important per section, but their validator[0] recommends only
using one h1.
[0] https://validator.w3.org/
By default it shows the latest five posts, but you can set this
property in your config to override it:
[params.sidebar]
num_recent_posts = 7
Still no way to disable it, as I don't understand golang's HTML
templating stuff yet. The Hugo docs are a bit confusing, but it
seems like conditionals are a bit tricky because both false and
0 return a boolean false... hmm.
See: https://gohugo.io/templates/go-templates/
Add something like the following to your config to enable the about
block in the sidebar:
[params.sidebar]
about = "*My site* is really cool. Adios!"
Can be formatted in Markdown.
I need to figure out how to generate a list of posts grouped by
month, ie "August 2016", as well as a list template to show the
posts for each month for when the user clicks the link.
The HTML5 aside tag is for content that is tangentially related to
the content around the aside tag, but is considered separate from
that content. Section tags are semantic HTML5 elements that inform
computers about content structure, as opposed to div tags which
can be used for structure OR style.
See: http://diveinto.html5doctor.com/semantics.html
Headers are a semantic element that help computers understand the
content. In general, header tags should follow rank order, but the
most important is that the first header inside a section will serve
as the title in a table of contents, etc, but since article sections
stand alone as independent documents, I like the idea of explicitly
starting with H1 tags.
See: http://diveinto.html5doctor.com/semantics.html
The HTML5 <article> tag represents a complete, or self-contained,
composition in a document. Headers are a semantic HTML5 element
that helps computers understand the content.
Partials are nice, but blocks are a better base construct. Right
now there is basically only layouts/_default/baseof.html that is
doing most of the work.
See: https://gohugo.io/templates/blocks
I think this should be an H1 since it's in a standalone article tag
but for some reason WordPress' latest themes use an H2, so I'll use
one too until I go read the W3C docs.
Set the following param in your config:
[params.sidebar]
num_recent_posts = 5
Alternatively, delete or comment out the variable to disable showing
of recents. I should probably allow setting it to "0" to disable.