featherweight 0.5.3 → 0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03c3d95079bb8b7b9680475eb861d0fff2edbbe6e7a17d0ae439ceebdb56dce5
4
- data.tar.gz: 342a697a6561651b786735e20385e386e9b7f7a8718b7225c552260e36e54309
3
+ metadata.gz: 3eea45f44ac811dade1063f72adf7f843360bd7ac7b29f780b84dc8162cbbacc
4
+ data.tar.gz: 9defd546784bc1a9cec7cd44d0212ec4d47f30e3df88a84e781b2368d0e0f7aa
5
5
  SHA512:
6
- metadata.gz: 7216a6585415c21bebe5a40d3858529ac49e6745ff83d938289caa3441c9835dbebe9b7cbbde0e6b92708b1633adff34c43c896b813c66ea49b2b779f5d4a1c8
7
- data.tar.gz: 33391869578680845b6d0ed652580f2c5c972c96b77570f5291d1040918f14db43b06c01b35dbf7a7238a3965bc114b3bcb3934cf4f173be4eb24bb3b9c1911e
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/), e.g.: the `jekyll-loading-lazy` gem (which adds `loading="lazy"` tags to `iframes` and `img` tags, enabling faster initial page loads).
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, personal links, CV experience using `_config.yml`. |
34
- | _Extra config_ | Customise your site (add minimal inline styling, homepage link and footer in blogposts, favicon) via the `compression` options in `_config.yml`. These options add additional bytes to your pages, but can improve UX. |
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`
@@ -1,23 +1,17 @@
1
1
  ---
2
2
  layout: compress
3
3
  ---
4
- <!DOCTYPE html>
4
+ <!-- include header.html -->
5
+ {% include header.html %}
5
6
 
6
- <title>{% if page.title %}{{ page.title }}{% else %}{{ site.name }}{% endif %}</title>
7
-
8
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
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
- </body>
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.menu %}
5
- <a href="{{ site.url }}" style="position:absolute;top:0;left:0;margin:1em;color:inherit;font-size:1em;">Return home</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
- <b>{{ page.title }}</b><br><i> Written on {{ page.date | date: "%B %e, %Y" }} </i>
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 style="font-family:monospace;">{% for link in site.personals %}{{ link.name }}: <a href="{{ link.url }}">{{ link.url }}</a><br>{% endfor %}</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.5.3
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-09-27 00:00:00.000000000 Z
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.7
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