Skip to content

Commit f65e439

Browse files
committed
add full-width YAML option
1 parent 909190a commit f65e439

File tree

9 files changed

+16
-18
lines changed

9 files changed

+16
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ One of the major changes in this version is that a lot of time was spent on reth
88
- **BREAKING CHANGE** Removed undocumented YAML options `meta-title` and `meta-description`
99
- Added `share-title` YAML option to give control over the search engine/social media title
1010
- Added `head-extra` YAML option which is similar to `footer-extra` but is used to include custom HTML code in a page's `<head>` tag
11+
- Added `full-width` YAML option to allow having full-width pages
1112
- Added automatic navbar color detection (#702)
12-
- Added better SEO and social media sharing by adding a `share-title` YAML option and utilizing the `description` option
13-
- Changed navbar and footer background colour to be slightly darker, for better contrast with white page background
13+
- Changed navbar and footer background colour to be slightly darker, for better contrast with the default white page background
1414
- Changed the behaviour of `site-css` to include site-wide CSS file **before** page-specific files
1515
- Renamed internal css/js files from "main" to "beautifuljekyll" to make it easier for users to troubleshoot
1616

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ Parameter | Description
172172
footer-extra | If you want to include extra information in the footer (below the social media icons), create an HTML file in the `_includes/` folder (for example `_includes/myinfo.html`) and set `footer-extra` to the name of the file (for example `footer-extra: myinfo.html`)
173173
head-extra | Works in a similar way to `footer-extra`, but used if you have any HTML code that needs to be included in the `<head>` tag of the page.
174174
language | HTML language code to be set on the page's &lt;html&gt; element.
175+
full-width | By default, page content is constrained to a standard width. Use `full-width: true` to allow the content to span the entire width of the window.
175176
js | List of local JavaScript files to include in the page (eg. `/assets/js/mypage.js`)
176177
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.<br/>`href: "//code.jquery.com/jquery-3.1.1.min.js"`<br/>`sri: "sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="`
177178
css | List of local CSS files to include in the page

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# --- Required options --- #
22

33
# Name of website
4-
title: My website
4+
title: My Website
55

66
# Your name to show in the footer
77
author: Some Person

_includes/head.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
44

5-
{%- capture title -%}
5+
{% capture title %}
66
{%- if page.share-title -%}
77
{{ page.share-title }}
88
{%- elsif page.title -%}
99
{{ page.title }}
1010
{%- else -%}
1111
{{ site.title }}
1212
{%- endif -%}
13-
{%- endcapture -%}
13+
{% endcapture %}
1414

15-
{%- capture description -%}
15+
{% capture description %}
1616
{%- if page.share-description -%}
1717
{{ page.share-description }}
1818
{%- elsif page.subtitle -%}
1919
{{ page.subtitle }}
2020
{%- else -%}
21-
{% assign excerpt_length = site.excerpt_length | default: 50 %}
22-
{{ page.content | strip_html | xml_escape | truncatewords: excerpt_length }}
21+
{%- assign excerpt_length = site.excerpt_length | default: 50 -%}
22+
{{ page.content | strip_html | xml_escape | truncatewords: excerpt_length | strip }}
2323
{%- endif -%}
24-
{%- endcapture -%}
24+
{% endcapture %}
2525

2626
<title>{{ title }}</title>
2727

@@ -134,9 +134,7 @@
134134
<meta name="twitter:image" content="{{ img | absolute_url }}">
135135
{% endif %}
136136

137-
{% if site.matomo %}
138137
{% include matomo.html %}
139-
{% endif %}
140138

141139
{% if page.comments and site.staticman.repository and site.staticman.branch %}
142140
<link rel="stylesheet" href="{{ "/assets/css/staticman.css" | relative_url }}">

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
<div class="intro-header"></div>
66

7-
<div role="main" class="container-md">
7+
<div role="main" class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}">
88
{{ content }}
99
</div>

_layouts/minimal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<body>
2222

23-
<div role="main" class="container-md main-content">
23+
<div role="main" class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %} main-content">
2424
{{ content }}
2525
</div>
2626

_layouts/page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
{% include header.html type="page" %}
66

7-
<div class="container-md" role="main">
7+
<div class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}" role="main">
88
<div class="row">
9-
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
9+
<div class="{% if page.full-width %} col {% else %} col-xl-8 offset-xl-2 col-lg-10 offset-lg-1 {% endif %}">
1010
{{ content }}
1111
{% include comments.html %}
1212
</div>

_layouts/post.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
{% include header.html type="post" %}
66

7-
<div class="container-md">
7+
<div class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}">
88
<div class="row">
9-
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
9+
<div class="{% if page.full-width %} col {% else %} col-xl-8 offset-xl-2 col-lg-10 offset-lg-1 {% endif %}">
1010

1111
{% if page.gh-repo %}
1212
{% assign gh_split = page.gh-repo | split:'/' %}

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
title: My website
44
subtitle: This is where I will tell my friends way too much about me
55
---
6-

0 commit comments

Comments
 (0)