featherweight 0.5.3 → 0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +28 -6
- data/_layouts/default.html +9 -15
- data/_layouts/post.html +8 -6
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eea45f44ac811dade1063f72adf7f843360bd7ac7b29f780b84dc8162cbbacc
|
4
|
+
data.tar.gz: 9defd546784bc1a9cec7cd44d0212ec4d47f30e3df88a84e781b2368d0e0f7aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e32bd724f3163e2d939742c805f357d0229d39a41aa73e2068b9ab54deca09d91c690a928f2233d08f9bf78b31e7603e3bb1125f4b2d6ee9f97d3efc6d65c9ae
|
7
|
+
data.tar.gz: 6e2d6c7d4d04e7e7a07a6e2547a3f45350c8c17d64030ce24c76cfceb2f32b8b3926e84b17792a5c07348516e5c7ed5bb667d15a2d0cf297efbb446ace745ad2
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
#### Building on GitHub
|
8
8
|
|
9
|
-
If you're using this site on GitHub pages, the built-in build action won't run gems outside of the [supported plugins list](https://pages.github.com/versions/)
|
9
|
+
If you're using this site on GitHub pages, the built-in build action won't run gems outside of the [supported plugins list](https://pages.github.com/versions/).
|
10
10
|
|
11
11
|
To enable these gems, use the `build_and_deploy.yml` action under `.github/workflows` to automatically build your site on pushes, which circumvents this restriction while still hosting using GitHub pages (as advised by [Jekyll](https://jekyllrb.com/docs/continuous-integration/github-actions/)).
|
12
12
|
|
@@ -19,6 +19,8 @@ Create a blank `.md` file in `_pages/`, and add:
|
|
19
19
|
---
|
20
20
|
layout: post
|
21
21
|
title: My blog post.
|
22
|
+
description: A description of the post, used for metadata.
|
23
|
+
image: (optional) an image to display when linking to the post on e.g.: Twitter or Facebook
|
22
24
|
---
|
23
25
|
```
|
24
26
|
|
@@ -30,12 +32,32 @@ When naming blog post files, use the `YYYY-MM-DD-title.md` convention, or else y
|
|
30
32
|
|
31
33
|
|||
|
32
34
|
|:--:|:--:|
|
33
|
-
| _Config_ | Update site URL,
|
34
|
-
|
|
35
|
-
| _About me_ | Customise the About Me section of the homepage by editing `_pages/about.md`. |
|
36
|
-
| _Change font_ | Customise fonts for text + footer by editing `_layouts/default.html` and `_layouts/post.html` inline CSS. |
|
35
|
+
| _Config_ | Update site URL, social links, and CV experience using `_config.yml`. |
|
36
|
+
| _About me_ | Customise the About Me section of the homepage by editing `_pages/about.md`. This is rendered as markdown at build time. |
|
37
37
|
| _RSS_ | The RSS feed can be found at <https://yourgithubusername.github.io/feed>. |
|
38
38
|
| _Sitemap_ | The sitemap can be found at <https://yourgithubusername.github.io/sitemap>. |
|
39
39
|
| _Quickstart_ | Test your website locally by following the [Jekyll quickstart guide](https://jekyllrb.com/docs/). |
|
40
40
|
| _gzip compression_ | Files are compressed using [Zopfli](https://github.com/philnash/jekyll-zopfli) compression. GitHub GZip's files automatically before serving, but we can use more aggressive pre-compression to achieve better compression, and avoid server overhead to compress on-the-fly. Support seems to vary between browsers, and some will fallback to `.html`. |
|
41
|
-
| _Brotli compression_ | We also compress files using Google's [Brotli](https://en.wikipedia.org/wiki/Brotli) algorithm. We serve `.gz` and `.html` as fallback, although `.br` [has good support](https://caniuse.com/brotli) |
|
41
|
+
| _Brotli compression_ | We also compress files using Google's [Brotli](https://en.wikipedia.org/wiki/Brotli) algorithm. We serve `.gz` and `.html` as fallback, although `.br` [has good support](https://caniuse.com/brotli). |
|
42
|
+
| _Page reflow protection_ | To prevent page-reflow whilst lazy-loading images, we set image height and width using the `_plugins/jekyll-anti-image-reflow.rb` plugin. Note it will not override existing styling to loading, width or height attributes. |
|
43
|
+
|
44
|
+
#### Cosmetics
|
45
|
+
`Featherweight` allows you to enable numerous cosmetic upgrades for your site. Toggle these options in the `compression` settings in `_config.yml`. These cosmetics all add to the total page weight, but can significantly improve the UX.
|
46
|
+
|
47
|
+
Many of these are entirely optional settings. If you're looking to create a truly minimal webpage, read the comments inside `_config.yml`.
|
48
|
+
|
49
|
+
|||
|
50
|
+
|:--:|:--:|
|
51
|
+
| _SEO_ | Enabling search engine optimisations will add metadata for search engines and sharing on social media. |
|
52
|
+
| _Reading time_ | To display an estimated reading time for blog posts. |
|
53
|
+
| _Change font_ | Customise fonts for text + footer by editing `_layouts/default.html` and `_layouts/post.html` inline CSS. |
|
54
|
+
| _Load time_ | Show off your page load times at the foot of the homepage/blog posts. |
|
55
|
+
| _Blog post footer_ | Display social media links below blog posts. |
|
56
|
+
| _social-urls_, _resume_, _blogs_ | Toggle the display of each of these subsections on your homepage. |
|
57
|
+
| _CSS_ | Add some basic styling, based on [58 bytes of CSS to look great nearly everywhere](https://gist.github.com/JoeyBurzynski/617fb6201335779f8424ad9528b72c41). Also add some basic image styling to blog posts, working in combination with `anti-image-reflow` to fit images to the blog width without causing jank. |
|
58
|
+
| _favicon_, _icon_ | Both options require image urls. The favicon is the website icon, whilst the icon is used if the site is made into a webapp, or a shortcut on iOS devices, etc. `Favicon` accepts .ico, `icon` accepts .png of size 192x192. |
|
59
|
+
|
60
|
+
#### Dev
|
61
|
+
1. Clone this repository: `git clone https://github.com/Cutwell/featherweight.git`
|
62
|
+
2. Download the project dependencies: `bundle install`
|
63
|
+
3. Run a local Jekyll server: `bundle exec jekyll serve`
|
data/_layouts/default.html
CHANGED
@@ -1,23 +1,17 @@
|
|
1
1
|
---
|
2
2
|
layout: compress
|
3
3
|
---
|
4
|
-
|
4
|
+
<!-- include header.html -->
|
5
|
+
{% include header.html %}
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
<
|
9
|
-
<link rel="alternate" type="application/rss+xml" title="{{ site.name }}" href="{{ site.url }}/feed.xml" />
|
10
|
-
|
11
|
-
{% if site.compression.favicon %}
|
12
|
-
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.url }}/{{ site.favicon }}">
|
13
|
-
{% else %}
|
14
|
-
<link rel="icon" href="data:,">
|
15
|
-
{% endif %}
|
16
|
-
|
17
|
-
{% if site.compression.styling %}
|
18
|
-
<body style="max-width:80ch;padding:3em 1em;margin:auto;line-height:1.6;font-size:1.25em;font-family:sans-serif;">
|
7
|
+
<!-- include page css if enabled -->
|
8
|
+
{% if site.compression.css %}
|
9
|
+
<body style="max-width:80ch;padding:3em 1em;margin:auto;line-height:1.6;font-size:1.25em;font-family:sans-serif">
|
19
10
|
{% endif %}
|
20
11
|
|
21
12
|
{{ content }}
|
22
13
|
|
23
|
-
|
14
|
+
<!-- add page load time if enabled -->
|
15
|
+
{% if site.compression.load-time %}
|
16
|
+
<br><i>Page loaded in: <script>window.onload = function () {document.getElementById("loadTime").innerHTML = window.performance.timing.domContentLoadedEventEnd-window.performance.timing.navigationStart;}</script><span id="loadTime"></span>ms</i>
|
17
|
+
{% endif %}
|
data/_layouts/post.html
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
---
|
2
2
|
layout: default
|
3
3
|
---
|
4
|
-
{% if site.compression.
|
5
|
-
<a
|
4
|
+
{% if site.compression.home-link %}
|
5
|
+
<a style="position:absolute;top:0;left:0;margin:1em;color:inherit;font-size:1em;" href="{{ site.url }}">{% if site.home-link-text %}{{ site.home-link-text }}{% else %}Return Home{% endif %}</a>
|
6
6
|
{% endif %}
|
7
7
|
|
8
|
-
<
|
8
|
+
<h1>{{ page.title }}</h1>
|
9
|
+
<i>Written on {{ page.date | date: "%B %e, %Y" }}</i>
|
10
|
+
<br><i>{% include reading-time.html %}</i>
|
9
11
|
|
10
12
|
{{ content }}
|
11
13
|
|
12
14
|
{% if site.compression.footer %}
|
13
|
-
<hr>
|
14
|
-
<p
|
15
|
-
{% endif %}
|
15
|
+
<br><hr>
|
16
|
+
<p>{% for link in site.social-urls %}{{ link.name }}: <a href="{{ link.url }}">{{ link.url}}</a><br>{% endfor %}</p>
|
17
|
+
{% endif %}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: featherweight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -86,20 +86,6 @@ dependencies:
|
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '4.0'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: jekyll-loading-lazy
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - "~>"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: 0.1.1
|
96
|
-
type: :runtime
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - "~>"
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 0.1.1
|
103
89
|
- !ruby/object:Gem::Dependency
|
104
90
|
name: jekyll-zopfli
|
105
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
145
|
- !ruby/object:Gem::Version
|
160
146
|
version: '0'
|
161
147
|
requirements: []
|
162
|
-
rubygems_version: 3.3.
|
148
|
+
rubygems_version: 3.3.24
|
163
149
|
signing_key:
|
164
150
|
specification_version: 4
|
165
151
|
summary: "`Featherweight` is an ultra-lightweight Jekyll theme, aiming to minimise
|