1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-06-29 09:33:45 +02:00
Commit Graph

20 Commits

Author SHA1 Message Date
Camille Roux
5581929151
Use RegularPages instead of Pages in list.html 2018-08-09 15:06:28 +02:00
ba0aca3e2b
layouts/_default/list.html: Use pagination partial
Now that we're using the same pagination code on lists and taxonomy
pages we should reuse the code by putting it in a partial.
2018-04-19 18:20:35 +03:00
1655b876a8
Use .Site.Params.mainSections instead of hard coding "post" type
Hugo 0.32 or so added the quasi-magical .Site.Params.mainSections slice
that returns a range over the section that has the most number of pages.

This way we don't need to hard code the "post" type, and instead simply
use the pages that the user has created. Hugo's quickstart, for example,
recommends users create "posts", which currently doesn't work with this
theme!

Closes #89
2018-03-09 17:50:03 +02:00
Mike Lococo
2e5eef29a6 Add option to control post truncation. 2017-04-04 12:45:11 +03:00
e2ccfe8bf3
Clean up empty whitespace in JSON-LD
Use secret formatting feature of Go templates, adding - to blocks
to clear whitespace around the tags.
2017-03-24 16:49:26 +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
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
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
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
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
2abe8b1cd3
layouts/_default/list.html: Only show pagination if necessary 2016-10-18 22:53:14 -04:00
36a8a28d4c
layouts/_default/list.html: Remove debug code from pagination 2016-10-05 17:28:08 +03:00
a8d694d08c
Add pagination logic + i18n strings for en 2016-10-05 17:21:53 +03:00
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
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
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
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
412cc18cf9
Start using Go 1.6's blocks
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
2016-09-01 17:37:27 +03:00
2bb1d6ecc0
First commit with initial theme
Some file are empty (created by `hugo new theme`), but I've left
them for reference later.
2016-08-28 16:22:32 +03:00