Commit Graph

297 Commits

Author SHA1 Message Date
Alan Orth ae207b8ba9
Use 1280x720 screenshot again
I don't know how to make this screenshot look nice on GitHub and
Hugo's theme showcase–it always looks blurry!
2017-02-01 08:45:13 +02:00
Alan Orth 4852f14f42
screenshot.png: Try screenshot with 640x360 resolution 2017-01-31 20:27:03 +02:00
Alan Orth 81859bdc5d
README.md: Replace screenshot with less blurry one 2017-01-31 20:04:06 +02:00
Alan Orth 9a6b546e86
Update screenshot
Instead of taking the screenshot of the whole window, I used the
screenshot function in Firefox's responsive design mode to specify
the exact dimensions I wanted.
2017-01-31 15:49:50 +02:00
Alan Orth 3bde18f456 Merge pull request #47 from ardianta/master
Add Indonesian language
2017-01-25 09:32:59 +02:00
Ardianta Pargo 74b5090312 Add Indonesian language 2017-01-25 11:55:58 +08:00
Alan Orth 04e5bc56de
README.md: Remove npm packages badge
The image seems to be broken any time I look at it on the GitHub
repository page despite being fine if you click it and view the
original on david-dm.org.
2017-01-24 12:39:59 +02:00
Alan Orth 70a35f3030
README.md: Add note about enableGitInfo 2017-01-23 15:10:53 +02:00
Alan Orth d22b29567a
exampleSite/config.toml: Add comments to twitter option 2017-01-23 14:58:29 +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 d42c67b731
README.md: Add devDependencies badge
From David, which watches your dependencies and generates a badge
to show their status.

See: https://david-dm.org/
2017-01-22 13:59:02 +02:00
Alan Orth 6758d9b26c
README.md: Add note about disabling sharing icons 2017-01-22 13:53:18 +02:00
Alan Orth 9418abfdea
exampleSite/config.toml: Adjust sharing icon setting 2017-01-21 19:28:38 +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 683755f95d
Add tooling to generate SRI hashes for assets
Subresource integrity allows user agents to verify that a fetched
resource has been delivered without unexpected manipulation[0]. I
put theme assets in a json configuration file and save the hashes
to a TOML file that Hugo loads via its theme data mechanism[1].

[0] https://www.w3.org/TR/SRI/
[1] https://gohugo.io/extras/datafiles/
2017-01-11 10:32:43 +02:00
Alan Orth c2d9b1ad74
i18n/bg.yaml: Add translation for "links" 2017-01-09 17:25:13 +02:00
Alan Orth e4bcfee4e0 static/css/style.css: Regenerate 2017-01-09 16:54:20 +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 7d85c9a740 source/scss/style.scss: Import local overrides last
It seems this is actually the preferred way to do it, but something
in the Bootstrap v4 Alpha 6 release—perhaps the upgraded version of
Normalize.css with that release—caused our styles to be overridden
and now I realize that it should have never been working before!
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 e9d05dd97d source/scss/style.scss: Remove unused variables
Flexbox is enabled in Bootstrap v4 Aplha 6 by default and has no
fallback so these variables are unnecessary.
2017-01-09 16:54:20 +02:00
Alan Orth 859ce04e0c source/scss/bootstrap.scss: Update against v4 alpha 6
See: node_modules/bootstrap/scss/bootstrap.scss
2017-01-09 16:54:20 +02:00
Alan Orth 9ef73ed070 package.json: Bump Bootstrap v4 to alpha 6 2017-01-09 16:54:20 +02:00
Alan Orth 0c264bb421
README.md: Add GitHub flavored Markdown to code block 2017-01-09 13:25:54 +02:00
Alan Orth c6d2538fd2
static/css/style.css: Regenerate 2017-01-09 12:07:48 +02:00
Alan Orth efe4f34651
package.json: Update cleancss invocation
The Bootstrap project uses --skip-advanced, so we should too. This
increases the size of style.css by ~4KiB but should be safer.

See: https://github.com/twbs/bootstrap/blob/v4-dev/package.json
2017-01-09 12:06:36 +02:00
Alan Orth 55248b6492
README.md: Change wording about config.toml to "recommended"
The theme really needs some config options in order to look decent,
so I will change the wording here from "optional" to "recommended".

Hopefully some users actually read this rather sparse readme, as
there have been several GitHub issues opened due to misconfigured
sites.
2017-01-09 00:32:37 +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 bcbc28b32b
static/css/style.css: Regenerate 2017-01-08 18:27:46 +02:00
Alan Orth a637d26d78
package.json: Update node-sass invocation
Since we're using cleancss there is no need to compress or optimize
anything in the node-sass step. Also, the Bootstrap project itself
is using the expanded output style as well so we should too.
2017-01-08 18:25:56 +02:00
Alan Orth 58b466e692
static/css/style.css: Regenerate 2017-01-08 17:59:19 +02:00
Alan Orth 89cb2d2b49
package.json: Remove cssnano
Now using clean-css.
2017-01-08 17:59:01 +02:00
Alan Orth aedf9f16db
package.json: Use clean-css to minify
The Bootstrap project itself uses this, so I think we should just
use it as well. As an added bonus we actually even save 2KiB from
the size of the generated style.css.
2017-01-08 17:57:36 +02:00
Alan Orth c85e8278b7
source/scss/style.scss: No file extensions in @import
sass-lint says you shouldn't use file extensions in @import.
2017-01-08 15:54:34 +02:00
Alan Orth 1c1d7ee169
static/css/style.css: Regenerate 2017-01-07 21:47:40 +02:00
Alan Orth 528f75fb0f
source/scss/font-awesome.scss: Add fa-rss-square 2017-01-07 21:46:59 +02:00
Alan Orth 62f650a1eb
package.json: Peg Bootstrap v4 Alpha 5
Alpha v6 just came out and breaks everything, so let's just peg the
exact version we want for now.
2017-01-07 21:43:41 +02:00