From 4a19f20383ebc0beafb58927e80a1dfe9f2fff3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Ska=C5=82acki?= Date: Wed, 22 Apr 2020 23:58:01 +0200 Subject: [PATCH] Allow configuring lang attribute on tag (#608) Add a page/site configuration variable named "language", which can be set either in _config.yml or in a front matter in order to customize value of "lang" attribute on element. Previously, it was hardcoded to "en". --- CHANGELOG.md | 2 ++ README.md | 1 + _layouts/base.html | 2 +- _layouts/minimal.html | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0f30e5..ad17797 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ This file lists all non-trivial changes to Beautiful Jekyll. I often make small changes to documentation, to the demo site, or to the general look-and-feel. These changes will not be listed here. Any other minor changes will also not be listed here. +**2020-04-22** Add support for configuring lang attribute on <html> tag (#608) (thanks @skalee) + **2020-04-18** Add ability to disable round logo (thanks @gpotter2) **2020-04-01** Add support for Utterances comments (#596) (thanks @colynn) diff --git a/README.md b/README.md index df26dc4..23d1a9e 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,7 @@ image | If you want to add a personalized image to your blog post that wil share-img | If you want to specify an image to use when sharing the page on Facebook or Twitter, then provide the image's full URL here. social-share | If you don't want to show buttons to share a blog post on social media, use `social-share: false` (this feature is turned on by default). use-site-title | If you want to use the site title rather than page title as HTML document title (ie. browser tab title), use `use-site-title: true`. When set, the document title will take the format `Site Title - Site Description` (eg. `My website - A virtual proof that name is awesome!`). By default, it will use `Page Title` if it exists, or `Site Title` otherwise. +language | A HTML language code to be set on <html> element (see [W3Schools website](https://www.w3schools.com/tags/ref_language_codes.asp) for more on this topic). Also, language can be set site-wide in `_config.yml`. layout | What type of page this is (default is `post` for blog posts and `page` for other pages. You can use `minimal` if you don't want a header and footer) js | List of local JavaScript files to include in the page (eg. `/js/mypage.js`) ext-js | List of external JavaScript files to include in the page (eg. `//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore-min.js`). External JavaScript files that support [Subresource Integrity (SRI)](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) can be specified using the `href` and `sri` parameters eg.
`href: "//code.jquery.com/jquery-3.1.1.min.js"`
`sri: "sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="` diff --git a/_layouts/base.html b/_layouts/base.html index 02750e7..03695a9 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -15,7 +15,7 @@ common-js: --- - + {% include head.html %} diff --git a/_layouts/minimal.html b/_layouts/minimal.html index a2311c3..cdd90bd 100644 --- a/_layouts/minimal.html +++ b/_layouts/minimal.html @@ -8,7 +8,7 @@ common-js: --- - + {% include head.html %}