1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-11-16 09:17:03 +01:00
Commit Graph

68 Commits

Author SHA1 Message Date
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
5b0405e69c
README.md: Add note about example config.toml 2016-09-14 16:03:58 +03:00
c10bcc8b68
README.md: Update TODOs 2016-09-14 16:02:07 +03:00
d62ecc6f1e
Add exampleSite with config showing theme's options 2016-09-14 16:00:42 +03:00
baa2cb3329
Update screenshot 2016-09-14 15:57:13 +03:00
2b25241f3c
style: Don't highlight links when they are in headers
This uses some SASS magic instead of the previous single rule
because I need it for both the blog title as well as each post's
title link. Yay, SASS?!
2016-09-14 15:14:13 +03:00
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
6d2693465c
README.md: Update TODOs 2016-09-14 14:39:41 +03:00
e9cf00ca7f
README.md: Update TODOs 2016-09-14 14:23:49 +03:00
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
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
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
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
5ab29ec867
README.md: Update TODOs 2016-09-14 12:31:37 +03:00
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
e2e01a38f0
Don't style clickable header text like other links 2016-09-14 12:25:23 +03:00
c94335a193
Make site header text clickable (to home)
This is a pretty standard convention in blogs.
2016-09-14 12:24:38 +03:00
e48381d974
README.md: Update TODOs 2016-09-14 08:15:29 +03:00
775b8bf0bd
static/css/style.css: Regenerate style after new node-sass 2016-09-13 18:08:29 +03:00
7b92a2889c
package.json: Only god knows why npm reformatted this 2016-09-13 18:07:35 +03:00
1229ecbcc4
package.json: Update to latest node-sass 2016-09-13 18:07:19 +03:00
894d22d912
static/css/style.css: Regenerate for Bootstrap v4 alpha 4 2016-09-13 17:55:48 +03:00
162a7fa342
package.json: Update to Bootstrap v4.0.0-alpha.4 2016-09-13 17:54:43 +03:00
ccbbc6226b
README.md: Update TODO 2016-09-13 16:59:21 +03:00
19c3c2e2e7
README.md: Add some TODOs 2016-09-13 16:55:55 +03:00
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
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
3a08993bcb
package.json: Node version doesn't matter 2016-09-08 13:56:10 +03:00
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
ba25b91d94
Allow site description to be Markdown 2016-09-07 16:47:59 +03:00
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
f05d762f58
Regenerate style 2016-09-07 14:03:34 +03:00
5bb47cc220
source/scss/main.scss: Add styling for images in blog posts
Taken from Hugo vienna theme: https://github.com/keichi/vienna
2016-09-07 14:02:18 +03:00
a68bac5ebf
package.json: Fix trailing comma 2016-09-07 14:01:39 +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
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
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
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
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
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
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
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
3042101003
Use H2 for blog post heading
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.
2016-08-30 22:45:30 +03:00
e4cd676f3a
Reorganize summary and single post layouts
Now shows blog posts on their target page.
2016-08-30 12:45:13 +03:00
0e54dba17a
layouts/post/summary.html: Rework author name display
Use author name from frontmatter if it exists, otherwise use the
author from the site config.
2016-08-30 12:31:32 +03:00
8a0716d236
Use site author for post attribution 2016-08-30 12:07:43 +03:00
4c68cf71b0
Move summary layout to posts
The only content type we have is posts, so the summary type should
be there.
2016-08-30 11:39:03 +03:00
4043f1b1f4
Use site title in header, not context's title
Depending on the context the ".Title" could be the post or page's
title, but here we actually want the site's title.
2016-08-30 00:39:48 +03:00
d0fa547c10
Add basic single template for post type 2016-08-30 00:39:13 +03:00