Commit Graph

168 Commits

Author SHA1 Message Date
Alan Orth d554b6bead
layouts/_default/single.html: Only get imageConfig on local images
Don't try to get image information when the image isn't local. We
generally expect that images are in the local filesystem's static
directory, but if the user has specified a remote image—ie, with
an http:// or https:// prefix—then we shouldn't try imageConfig.
2017-03-24 16:31:50 +02:00
Alan Orth 3b3598960c
Revert "Revert "layouts: Add imageConfig to set height and width""
This reverts commit 5e1b0f40ab.
2017-03-24 16:02:44 +02:00
Alan Orth 5e1b0f40ab Revert "layouts: Add imageConfig to set height and width"
This reverts commit bf9bca9656.

If the user specifies a non-local image then the build generates
an error. See #56. We need to have a way to only get imageInfo for
local images...
2017-03-24 11:07:20 +02:00
Caleb Cushing 2e6a27300e add previous and next relations (#55)
* add previous and next relations

https://www.w3.org/TR/html5/links.html#link-type-next

* undo rel's on disabled buttons
2017-03-24 10:59:41 +02:00
mathew 6d027091d4 Add caching of last N posts in sidebar to improve performance 2017-03-11 16:20:50 -06:00
Alan Orth 04ff763688
Revert to using Hugo's own OpenGraph template
I had overridden Hugo's OpenGraph template to improve it, but those
changes have been upstreamed in Hugo 0.19. We can use theirs now.

See: https://github.com/spf13/hugo/pull/3073
2017-02-21 16:14:13 +02:00
Alan Orth 18863075c5
Revert to Hugo's own Twitter Cards partial
I had overridden it in the theme to improve the metadata generated
by it. Hugo has accepted the changes upstream so we can use theirs
now.

See: https://github.com/spf13/hugo/pull/2984
2017-02-21 15:03:17 +02:00
Alan Orth bf9bca9656
layouts: Add imageConfig to set height and width
Hugo 0.18 introduced the imageConfig function which allows you to
access the height and width of images, which makes bots consuming
the structured data happy.
2017-02-21 08:24:01 +02:00
Alan Orth 4d7a544dac
layouts: Quote some parameters in JSON LD
Current Hugo 0.19-DEV doesn't quote these anymore, so we need to
add quotes manually. I'm not sure if this is a design decision or
not on Hugo's part.
2017-02-21 08:17:19 +02:00
Alan Orth 40864e252e
layouts/partials/twitter_cards.html: Remove twitter:domain
This apparently used to exist but is no longer mentioned on the doc
page for Twitter Cards markup.

See: https://dev.twitter.com/cards/markup
2017-01-23 14:52:27 +02:00
Alan Orth a709b3b6a2
Import Hugo's Twitter cards partial from tpl/template_embedded.go
I want to see if I can improve the metadata here.
2017-01-23 14:51:44 +02:00
Alan Orth 527bc0d824
layouts/partials/opengraph.html: Fix date for nodes
.Site.LastChange is the date of the last modification on the entire
site, not necessarily on the node we're currently showing, such as
a taxonomy list.
2017-01-22 16:31:38 +02:00
Alan Orth 64d8bdab83
layouts/partials/opengraph.html: Work on OpenGraph tags
Better use of dates for ALL nodes/pages. I wrote extensive comments
as a note for when I eventually submit this upstream to Hugo.
2017-01-22 15:48:21 +02:00
Alan Orth d6cc7839ef
layouts/_default/list.html: Use .Date for modification time on nodes
I'm not sure if it really matters to bots who will parse this (it's
much more important on content pages of course), but using .Date on
nodes like the homepage and taxonomy terms pages will set the date
to be that of the latest post in that range—to me this does indeed
seem to be "time when the object was last updated"[0].

[0] https://developers.facebook.com/docs/reference/opengraph/object-type/website/
2017-01-22 14:58:13 +02:00
Alan Orth 868b5b3c13 layouts/partials/opengraph.html: Adjust .Params.audio block
Bring it back on the same line as the above, to make it more like
the Hugo template that we stole it from.

See: tpl/template_embedded.go
2017-01-22 14:01:28 +02:00
Alan Orth 64541ef84e layouts/partials/opengraph.html: Improve date handling
Both the Facebook and OpenGraph documentation specify the usage of
article:published_time and article:modified_time tags for articles.
For websites, however, the Facebook documentation recommends the
og:updated_time tag instead.

See: https://developers.facebook.com/docs/reference/opengraph/object-type/article
See: http://ogp.me
See: https://developers.facebook.com/docs/reference/opengraph/object-type/website
2017-01-22 14:01:28 +02:00
Alan Orth 2e04a8ce26 Import opengraph partial from Hugo
Hugo's current handling of dates in the opengraph partial needs
nome work to be more correct—for example: the usage of published
and updated times. This comes verbatim from the Hugo source tree.

See: tpl/template_embedded.go
2017-01-22 14:01:28 +02:00
Alan Orth 5fadea283d
layouts/partials/sharing-icons.html: Icons are no longer configurable 2017-01-21 19:26:40 +02:00
Alan Orth 2459ad9567
layouts/_default/single.html: Simplify sharing icon logic
Allowing users to select specific icons they want to show makes the
configuration and logic a bit tricky. A user brought up the case of
disabling sharing icons on certain pages/posts, and it was actaully
not possible without adding lots of extra logic, not to mention the
pain of having to test all possible configurations.

Instead, it is much simpler to just allow sharing icons to be either
on or off as desired in the site config or page/post frontmatter:

  sharingicons = false

Otherwise, sharing icons default to being enabled, as this is most
in line with what would be expected on a "blog".
2017-01-21 19:16:57 +02:00
Alan Orth 8ab05ae625
Add Schema.org implementation based on JSON-LD
This replaces the metadata that Hugo's own schema.html template had
been providing, but does so in JSON-LD notation rather than via the
use of <meta> tags (this is Google's currently recommended form of
specifying this markup). There are a few exceptions where I did not
follow the conventions used in Hugo's template, for example the use
of up to six images from a post's frontmatter, because Google's tool
only recognizes one image, as well as different logic for a post's
publish and modified dates (using enableGitInfo = true).

Using this new markup, Google's Structured Data Testing Tool is now
able to understand site metadata much better (before it was reading
none).

The implementation here is a mix of the elements and types from the
official Schema.org types—for example, Blog and BlogPosting—as well
as from Google's search documentation. Note that Google's docs are
geared towards AMP, where some metadata is required, while for non-
AMP pages the metadata is just recommended.

We will have to re-evaluate this in the future, for example to add
height and width information to image metadata.

See: https://schema.org/Blog
See: https://schema.org/BlogPosting
See: https://developers.google.com/search/docs/data-types/data-type-selector
See: https://search.google.com/structured-data/testing-tool
2017-01-20 15:58:30 +02:00
Alan Orth 4b768d9da4
layouts/partials/sidebar.html: Use .Site.RegularPages instead of .Site.Pages
As of Hugo 0.18 .Site.Pages now returns all pages, including pages,
home, taxonomies, etc, and you are expected to filter them by their
"kind". There is a new variable .Site.RegularPages which returns a
range of "regular" pages like in pre-0.18 Hugo.

In this instance we are limiting the range to pages with the type
"post", so our current behavior works, but I'd rather be consistent
with other ranges we're using, like on the homepage and taxonomy
list pages.

See: https://github.com/spf13/hugo/releases/tag/v0.18
2017-01-19 15:08:55 +02:00
Alan Orth b1f07d1bbc
layouts/partials/head-meta.html: Trim whitespace around tags
It's the right thing to do.
2017-01-19 14:57:03 +02:00
Alan Orth 113eac717b
layouts/partials/head-meta.html: Use `with` insted of `if`
This is a more Hugo-like construct.
2017-01-19 14:54:49 +02:00
Alan Orth 0e381ab120
Start using SRI hashes for CSS/JS assets
Uses Hugo's site data mechanism to load pre-generated asset hashes.
2017-01-11 10:42:49 +02:00
Alan Orth a6a384cc82 Update margin around sharing icons for Bootstrap v4 Alpha 6
As of Alpha 6 there is no longer .nav-inline, so we need to add our
own class and apply our own margin.
2017-01-09 16:54:20 +02:00
Alan Orth a3bd024e29 layouts/partials/head-meta.html: Remove IE meta tags
Bootstrap v4 Alpha 6 removes support for IE 8 and 9 and these tags
are no longer necessary.

See: https://github.com/twbs/bootstrap/pull/21483
2017-01-09 16:54:20 +02:00
Alan Orth c9c5771782
layouts/partials/sidebar.html: Check before using sidebar params
If the user's config doesn't have [params.sidebar] defined they get
errors when trying to build the site. It's better if we just check
that this config block is defined before trying to use it, and then
add something to the docs telling people that the site looks really
bad without this defined.
2017-01-09 00:14:11 +02:00
Alan Orth 325c5977c1
layouts/partials/sharing-icons.html: Adjust sharing block
Now the sharing block is siblings with the Disqus block and needs
to share its header.
2017-01-07 11:23:54 +02:00
Alan Orth 1f6cc0cf42
layouts/_default/single.html: Adjust Disqus logic
Bring the Disqus comments inside the <article> tag. The article has
a sizeable bottom margin seprating it from the blog footer, and if
Disqus comments are active they appear after this margin, and this
looks ugly.

Semantically, I think the comments should actually be inside the
article tag anyways (since they are directly related), as well as
further wrapped in article tags, but we don't control the code that
Disqus injects so we'll have to make do with this.

See: https://www.w3.org/TR/html5/sections.html#the-article-element
2017-01-07 11:22:45 +02:00
Alan Orth af39372a24
layouts/_default/baseof.html: Revert to simple "read more" link
Prepending the site's URL to relative links was a hack but at the
time I couldn't understand why href="#" didn't take us to the top
of the page. It turns out that this was because of the <base> tag
that I have now removed.
2017-01-05 15:23:09 +02:00
Alan Orth fa0df752a1
layouts/_default/baseof.html: Remove base tag
It was screwing up relative links like the ones in footnotes. I'm
not sure why I added it in the first place, actually, as the docs
specifically say "specifies the base URL to use for all relative
URLs contained within a document".

See: https://developer.mozilla.org/en/docs/Web/HTML/Element/base
2017-01-05 15:20:29 +02:00
Alan Orth ffb8487c13
layouts/_default/baseof.html: Remove second RSS link
link tags with rel="feed" don't seem to be valid. They are flagged
by the w3c validator and modern documentation only mentions the use
of rel="alternate", which we are already using.

See: https://validator.w3.org
See: https://developer.mozilla.org/en-US/docs/Web/RSS/Getting_Started/Syndicating
2017-01-05 14:34:10 +02:00
Alan Orth 8616dd8c10
layouts/_default/baseof.html: Use .Site.RegularPages instead of .Site.Pages
Hugo 0.18 changes the pages returned by .Site.Pages, so we need to
use .Site.RegularPages in order to test the type.

See: https://github.com/spf13/hugo/releases/tag/v0.18
See: https://gohugo.io/templates/variables#site-variables
2016-12-25 17:56:24 +02:00
Alan Orth 61201274fb
layouts/_default/single.html: Allow disabling of comments
To disable comments for a single page, set "comments = false" in
its frontmatter.
2016-12-24 17:18:03 +02:00
Mathieu GAUTHIER-LAFAYE 65b9847333 links in sidebar is now tranlatable 2016-12-09 16:35:13 +01:00
Mathieu GAUTHIER-LAFAYE 89f87e050b the "Back on top" link is now translatable. 2016-12-09 15:37:53 +01:00
DeedleFake d0c9781d74 Add Permalink as prefix to back to top link href. (#22) 2016-11-29 17:07:28 +02:00
Alan Orth b52fac69b1
layouts: retab after addition of modelines
Done in vim using `gg=G` and then `:retab`.
2016-11-24 14:39:39 +02:00
DeedleFake 663f3db2a0 Add Vim Modeline Comments to Files (#18)
* Add Vim modeline comments to all relevent template files.

* Add Vim modeline comments to a few other files.

* Move modeline comments inside the template definitions in list and single.

For some odd reason, putting them outside breaks the page generation.

* Use template comments for modeline comments in templates.

* Fix form 2 modelines.
2016-11-24 14:33:56 +02:00
DeedleFake b83b1683a7 Add ability to insert custom code into the global <head>. (#17)
* Add ability to insert custom code into the global <head>.
* Fix indentation.
2016-11-22 21:11:50 +02:00
Alan Orth abfc8ad15c
Make "→" in "Read more" part of the i18n strings
Eventually I'd like to support right-to-left languages like Arabic
and we'd need the arrow to point the other way for that.
2016-11-20 12:14:46 +02:00
Rassie Smit aa7bd11522 Add custom navbar support
- default behaviour is backward compatible: all non-post pages
- optionally enable custom navbar using hugo menu functionality
2016-11-17 10:04:14 +00:00
Bjørn Erik Pedersen a6ebe0a0b3 Rename RSSlink to RSSLink
The former will be deprecated and eventually removed from Hugo.

Note: Currently both of them exist in Hugo, which is the reason for the cleanup.
2016-11-17 09:12:17 +01:00
Alan Orth a66be324cc
Add plumbing for cookie consent
Set the cookie_consent_info_url parameter in your site's config to
display a message about cookie usage to your users. See the config
in `exampleSite/config.toml` for more info.
2016-11-13 14:13:17 +02:00
Alan Orth 1f14455b12
layouts/_default/baseof.html: Don't indent go blocks
They get indented doubly in the generated HTML and look funny.
2016-11-09 15:42:39 +02:00
Alan Orth 929d2d976a
layouts/_default/baseof.html: Improve handling of RSS
We are explicitly using the site's RSS feed, but after reading the
Hugo RSS docs I think it's better if we use the contextual version
of the RSSlink. This will make the RSS plumbing show a feed for the
current category, tag, section, etc. The example code also adds a
bit of markup to help browsers find the content more easily.

See: https://gohugo.io/templates/rss/
2016-11-09 15:39:23 +02:00
Frank Tegtmeyer b81d5c54da Disqus integration for single nodes. 2016-11-01 15:25:44 +01:00
Alan Orth 9d4d062152
layouts/_default/baseof.html: Remove optional sidebar hiding
As it is right now, the sidebar gets hidden but the blog's main
content stays on the left. Gotta look at the CSS to make the
container responsive.
2016-10-18 23:06:19 -04:00
Alan Orth 2abe8b1cd3
layouts/_default/list.html: Only show pagination if necessary 2016-10-18 22:53:14 -04:00
Alan Orth cdcae6c8a4
layouts: Don't assume date_format is defined
User can override the date format with date_format, but we should
have a default in the case that the user hasn't defined it.
2016-10-17 23:39:41 -04:00
Alan Orth b637dd5eb1
layouts/partials/head-meta.html: Use Hugo's templates
Instead of writing my own logic for metadata and Twitter cards, I
should be using Hugo's own. This makes my theme code cleaner, but
means I have to adjust some of the configuration conventions that
I have been using. An added bonus is that my theme will work with
more sites now, as long as they are using Hugo's config conventions.
2016-10-14 23:07:39 -04:00
Alan Orth c49fa721ec
layouts/_default/baseof.html: Add support for Google Analytics
Sites only need to add their Google Analytics tracking ID to their
config:

  googleAnalytics = "UA-123-45"

This uses the async version of the Google Analytics code.
2016-10-14 22:10:01 -04:00
Alan Orth 6e84974d2a
layouts/_default/baseof.html: Add "back to top" link in footer 2016-10-09 13:45:38 +03:00
Alan Orth 142d330048
layouts/_default/baseof.html: Give credit to @mdo for theme 2016-10-09 13:38:49 +03:00
Alan Orth 77b2cf9955
layouts/_default/baseof.html: Allow configuration of footer text
Uses the "copyright" parameter from the site's config that is pretty
standard among Hugo themes. Content can contain Markdown.
2016-10-09 13:36:07 +03:00
Alan Orth 7194b5926d
layouts/partials/head-meta.html: Add site verification support
I had added Google Webmaster verify support but it got lost when I
was re-organizing the head meta stuff. I'm adding it back now plus
support for Bing and Yandex.
2016-10-08 16:57:10 +03:00
Alan Orth 577fdd75ce
layouts/_default/single.html: Markdownify page title
In a multilingual context a post's title could be "Title" in English
but «Title» in Bulgarian, and if we apply the Markdown filter to the
title tag, then the language's Black Friday configuration is used,
in this example it would be for the angled quotes.

We already do this everywhere else we can in the post's content, so
let's match it in the page title.
2016-10-06 15:05:44 +03:00
Alan Orth d6328c34df
Remove anchor titles
I had only added these for accessibility, but after some research
it seems that assistive technologies don't use these.
2016-10-06 14:21:30 +03:00
Alan Orth 3a6bed5be7
layouts: Use Markdown filter on titles
This makes it possible to have Black Friday config options like
quote style also affect post titles.
2016-10-06 14:17:59 +03:00
Alan Orth 36a8a28d4c
layouts/_default/list.html: Remove debug code from pagination 2016-10-05 17:28:08 +03:00
Alan Orth a8d694d08c
Add pagination logic + i18n strings for en 2016-10-05 17:21:53 +03:00
Alan Orth 70b4844c63
layouts/_default/list.html: Use paginator for page lists instead of custom stuff
Hugo's own pagination stuff works just as well and probably covers
even more corner cases. Also, this is one less config variable to
have to check because you can just use Paginate (Default: 10).
2016-10-05 15:45:38 +03:00
Alan Orth 98a8c2b234
layouts/_default/baseof.html: Use template variable for RSS link
This is the whole site's RSS feed, not just posts. I suppose this
is better for multilingual sites, and sites with many pages.
2016-10-05 15:31:30 +03:00
Alan Orth f873452e6c
layouts/_default/baseof.html: Use current language for html element's lang attribute
You know you gotta specify the page content's language if possible,
right?

https://www.w3.org/International/questions/qa-http-and-lang
2016-10-04 11:22:53 +03:00
Alan Orth 577e168da5
Use i18n to translate some strings
Hugo 0.17 allows for easy multi-lingual sites. Strings can be
translated either in the theme or in the site, and missing strings
will fall back to the default language.

See: https://github.com/spf13/hugo/blob/master/docs/content/content/multilingual.md
2016-10-03 22:58:22 +03:00
Alan Orth d99cf5df11
layouts/partials/meta-terms.html: use relLangURL for categories/tags
Fixes generation of links to language-specific tags.
2016-10-03 22:28:35 +03:00
Alan Orth 1a3ff61ef6
layouts/_default/single.html: Add basic support for multi-language content
Hugo 0.17 will allow you to write content and user interface strings
in multiple languages. Requires the user to amend their config a
bit though.

See: https://github.com/spf13/hugo/blob/master/docs/content/content/multilingual.md
2016-10-03 17:57:08 +03:00
Alan Orth 48a6a82dcc
layouts/_default/summary.html: Remove extraneous spaces 2016-09-27 23:22:46 +03:00
Alan Orth d16fe216a5
layouts: Remove link from author name in summary/posts
There is no author archive yet, so this link doesn't go anywhere!
2016-09-27 23:21:01 +03:00
Alan Orth 6a25f3eef1
layouts: Move all meta tags to head-meta.html partial 2016-09-26 09:26:00 +03:00
Alan Orth 71413f55b6
layouts: Rename metadata partial 2016-09-26 09:23:13 +03:00
Alan Orth 884713fc2a
layouts: Add theme support for categories and tags
Add categories/tags to front matter and they will be displayed on
summary and post pages, with links to taxonomy pages. Example:

  +++
  date = "2016-09-24T21:28:31+03:00"
  title = "Post title"
  categories = ["Nature"]
  tags = ["Wetland", "Oasis"]
  +++

For some reason if you add tags singularly, like:

  categories = "Nature"

you get index errors from Hugo. Not sure if I need to parse the
tags differently or just add more logic to test if the terms are
singular or not.
2016-09-26 08:32:46 +03:00
Alan Orth acde63b34f
layouts/_default/baseof.html: Make sidebar logic more robust
Check if the params.sidebar is defined before checking to see if
params.sidebar.hide is true or false. New sites might not have
their config set up properly, so this avoids an error in the case
that params.sidebar isn't defined yet.
2016-09-22 09:19:20 +03:00
Alan Orth d6d94ff087
Add robots.txt template
Advertises the XML sitemap and allows all user agents, but is only
enabled if the site sets this property in their config:

  enableRobotsTXT = true

See: https://gohugo.io/extras/robots-txt/
2016-09-21 22:37:39 +03:00
Alan Orth 9bb8294089
Add RSS feed for posts to base layout
Not sure who uses RSS anymore but Hugo automatically generates the
feed so we might as well advertise it.
2016-09-19 10:00:28 +03:00
Alan Orth 72d5c94cc5
Add basic sharing icons to the bottom of posts
By default they are on, but you can disable them by adding the
following configuration value:

  [params.sharingicons]
    hide = true

If this parameter is undefined (or "false") then the icons will be
shown. Furthermore, you can disable specific icons by setting their
value to "false", ie:

  [params.sharingicons]
    facebook = false

Any icons not named will be shown. Currently there a four icons
configureg: facebook, googleplus, linkedin, and twitter.
2016-09-18 17:11:08 +03:00
Alan Orth 731af8c564
layouts: Add basic support for OpenGraph and Twitter card metadata
Uses basic data like title, description, author, and date that we
are using with existing vanilla meta tags, but extends them to OG
and Twitter Card tags. See [0] and [1].

For the Twitter summary cards specifically, you can optionally add
attribution for your username by adding something like this to your
configuration:

  [params.social]
    twitter_username = "@mralanorth"

... and for posts with images, you can specify an "image" in the
post's front matter like so:

  image = "/2016/09/IMG_20160916_174409.jpg"

And then the theme will opt to use Twitter's "large" summary card.

[0] http://ogp.me/
[1] https://dev.twitter.com/cards/getting-started
2016-09-17 18:05:22 +03:00
Alan Orth 826bd2de54
layouts/partials/sidebar.html: Use "Type" instead of "Section"
Both work similarly here, but "Type" is more obvious to me.
2016-09-17 16:56:27 +03:00
Alan Orth 4427040041
layouts/_default/baseof.html: Enumerate non-post pages in header nav menu
Still need to figure out how to determine which page we're on so we
can set the "active" class accordingly (for Home we have the IsHome
variable the we can check).
2016-09-14 23:43:26 +03:00
Alan Orth d31626c5a3
layouts/_default/list.html: Check for page type instead of "section"
Both work effectively the same for my use case, but the "type" is
more obvious when looking at the code. See the documentation for
Hugo's page variables for more info[0].

[0] http://gohugo.io/templates/variables/#page-variables
2016-09-14 23:39:39 +03:00
Alan Orth 42c06c260c
layouts: Only list posts on front page and sidebar
We don't want to list other top-level pages like "About" here, they
will be enumerated in the header.
2016-09-14 16:35:04 +03:00
Alan Orth 2bb9509bbb
layouts/_default/baseof.html: Add "active" class to nav if page is home
Not sure how to do this for other pages yet, but I'll solve that
once I start enumerating pages into the nav.
2016-09-14 14:55:29 +03:00
Alan Orth e8ee0c68b7
layouts/_default/baseof.html: Smarter meta author tag
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.
2016-09-14 14:05:36 +03:00
Alan Orth c5bacecad6
layouts/_default/baseof.html: Smarter meta description
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.
2016-09-14 13:45:34 +03:00
Alan Orth cd3e327553
layouts: Use HTML5-compatible datetime format for posts
The W3C validator was complaining.

See: https://validator.w3.org
See: https://html.spec.whatwg.org/multipage/semantics.html#the-time-element
2016-09-14 13:12:27 +03:00
Alan Orth 8c4b423173
layouts/_default/summary.html: Fix W3C validation error
The validator[0] says:

  Element nobr not allowed as child of element a in this context.

... so I'll just remove it.

[0] https://validator.w3.org
2016-09-14 12:39:40 +03:00
Alan Orth d37e111ff4
Adjust header levels for post summary and page
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/
2016-09-14 12:28:15 +03:00
Alan Orth c94335a193
Make site header text clickable (to home)
This is a pretty standard convention in blogs.
2016-09-14 12:24:38 +03:00
Alan Orth 2bb33145db
Allow optional addition of Google Webmaster Tools verification string
Add to the site's configuration like so:

  [params]
  google_verify_meta = "BAi69DROASu2b2mkVNA_EyUsobfH7Mq8BmSg2Rn-Zp4"
2016-09-13 16:26:30 +03:00
Alan Orth 192d0bbee6
Allow configuration of optional sidebar links
Add something like the following to your config:

  [[menu.sidebar]]
    name = "Link 1"
    url = "https://link1.com"

  [[menu.sidebar]]
    name = "Link 2"
    url = "https://link2.com"

See the Hugo docs for more examples: https://gohugo.io/extras/menus/
2016-09-08 15:00:23 +03:00
Alan Orth d214834089
Allow configuration of recent posts on sidebar
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/
2016-09-07 23:54:55 +03:00
Alan Orth ba25b91d94
Allow site description to be Markdown 2016-09-07 16:47:59 +03:00
Alan Orth 15a41a86a2
Allow optional configuration of "About" block in sidebar
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.
2016-09-07 16:41:04 +03:00
Alan Orth f7b4f0a819
Allow configuration of how many posts to show on the homepage
You can set this property in your site's config to override:

  [params]
  num_recent_posts = 7

Defaults to five (5) if unset.
2016-09-03 20:21:40 +03:00
Alan Orth a942707278
Remove static archives from sidebar
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.
2016-09-03 19:15:09 +03:00
Alan Orth 47b200578e
Use HTML5 header tag for blog header
Makes it easier for computers to understand content by using tags
that have explicit meaning.

See: http://diveinto.html5doctor.com/semantics.html
2016-09-02 15:56:40 +03:00
Alan Orth 6059f6cbea
Use HTML5 aside and section tags for sidebar
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
2016-09-02 10:18:18 +03:00
Alan Orth 1f0799b9f1
Use H1 headers in <article> sections
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
2016-09-02 10:12:36 +03:00
Alan Orth 54ba5518d2
Use HTML5 <header> tags in articles
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.
2016-09-02 10:09:17 +03:00
Alan Orth 9b9226ca99
Use "|" for title separator instead of ndash
A survey of a handful of websites shows that this is a more common
separator of article and site title than the ndash.
2016-09-01 23:08:39 +03:00