1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-07-01 18:43:44 +02:00
Commit Graph

271 Commits

Author SHA1 Message Date
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
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
c2d9b1ad74
i18n/bg.yaml: Add translation for "links" 2017-01-09 17:25:13 +02:00
e4bcfee4e0 static/css/style.css: Regenerate 2017-01-09 16:54:20 +02:00
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
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
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
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
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
9ef73ed070 package.json: Bump Bootstrap v4 to alpha 6 2017-01-09 16:54:20 +02:00
0c264bb421
README.md: Add GitHub flavored Markdown to code block 2017-01-09 13:25:54 +02:00
c6d2538fd2
static/css/style.css: Regenerate 2017-01-09 12:07:48 +02:00
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
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
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
bcbc28b32b
static/css/style.css: Regenerate 2017-01-08 18:27:46 +02:00
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
58b466e692
static/css/style.css: Regenerate 2017-01-08 17:59:19 +02:00
89cb2d2b49
package.json: Remove cssnano
Now using clean-css.
2017-01-08 17:59:01 +02:00
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
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
1c1d7ee169
static/css/style.css: Regenerate 2017-01-07 21:47:40 +02:00
528f75fb0f
source/scss/font-awesome.scss: Add fa-rss-square 2017-01-07 21:46:59 +02:00
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
e9747dd2f6
static/css/style.css: Regenerate 2017-01-07 21:43:11 +02:00
8236d92ac8
source/scss/font-awesome.scss: Add fa-rss 2017-01-07 21:39:13 +02:00
26459d378a
static/css/style.css: Regenerate style 2017-01-07 11:32:22 +02:00
25e5232a98
source/scss/main.scss: Add top margin to Disqus
When both sharing and Disqus blocks are present, the Disqus block
needs a top margin. Otherwise, if sharing is hidden, then the hr
following the blog post's article tag already provides enough of
a bottom margin.
2017-01-07 11:28:25 +02:00
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
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
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
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
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
61f08c0941
Regenerate cookieconsent assets 2017-01-04 13:17:38 +02:00
d91a73137f
package.json: Update cookieconsent to 3.0.4 2017-01-04 13:13:52 +02:00
567fa9d3dc
theme.toml: Update minimum Hugo version to 0.18 2016-12-25 17:59:27 +02:00
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
08a93fc71e
README.md: Add note about disabling comments on a post 2016-12-24 17:21:26 +02:00
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
03c2adb74c Merge pull request #29 from fte378/update_german
update for german translation
2016-12-11 21:01:34 +02:00
Frank Tegtmeyer
47d257e007 update for german translation 2016-12-11 19:04:55 +01:00
ff9dfdc266 Merge pull request #27 from gauthierl/i18n_fr
add french translation
2016-12-09 17:39:52 +02:00
6e753267d6 Merge pull request #28 from gauthierl/links
links in sidebar is not tranlatable
2016-12-09 17:38:03 +02:00
Mathieu GAUTHIER-LAFAYE
65b9847333 links in sidebar is now tranlatable 2016-12-09 16:35:13 +01:00
3d25006a4e Merge pull request #25 from gauthierl/back_to_top_link
the "Back on top" link is not translatable.
2016-12-09 17:03:05 +02:00
Mathieu GAUTHIER-LAFAYE
469e909920 fr: translate "links" 2016-12-09 15:48:41 +01:00
Mathieu GAUTHIER-LAFAYE
0324570af4 fr: translate "backInTop" 2016-12-09 15:43:14 +01:00
Mathieu GAUTHIER-LAFAYE
89f87e050b the "Back on top" link is now translatable. 2016-12-09 15:37:53 +01:00
Mathieu GAUTHIER-LAFAYE
4092b129bd add french translation 2016-12-09 15:32:44 +01:00
5c4f7a3cb5 Merge pull request #24 from fike/master
Added portuguese translation file
2016-11-30 19:29:42 +02:00