featherweight 0.5.2 → 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: f74c7dff08e726e3b1501a2bba0ac4f2be6473ae4a3c551868f77433b0660171
4
- data.tar.gz: 602d895b80e20b5a7d122985e8147384353ef9c52b37c982f73cb114e61a6373
3
+ metadata.gz: 3eea45f44ac811dade1063f72adf7f843360bd7ac7b29f780b84dc8162cbbacc
4
+ data.tar.gz: 9defd546784bc1a9cec7cd44d0212ec4d47f30e3df88a84e781b2368d0e0f7aa
5
5
  SHA512:
6
- metadata.gz: a08f48e3ced8c8e6c189540b1e518cec419caac09803d8bc3604acfe6c72599873164a695092b8cb59b475898f40a58cbf89516e6aa65693e559123e225f4a7a
7
- data.tar.gz: cdecc86e8beecb5aabc03e87ce2f37cfd8d8bc7479a454e8107df843ab739e1caa3886efcc1e0a479bf76a34afa48721304a38d5372b1a389fa78ad22d61f19a
6
+ metadata.gz: e32bd724f3163e2d939742c805f357d0229d39a41aa73e2068b9ab54deca09d91c690a928f2233d08f9bf78b31e7603e3bb1125f4b2d6ee9f97d3efc6d65c9ae
7
+ data.tar.gz: 6e2d6c7d4d04e7e7a07a6e2547a3f45350c8c17d64030ce24c76cfceb2f32b8b3926e84b17792a5c07348516e5c7ed5bb667d15a2d0cf297efbb446ace745ad2
data/README.md CHANGED
@@ -4,18 +4,9 @@
4
4
 
5
5
  [ruby-gems]: https://rubygems.org/gems/featherweight
6
6
 
7
-
8
- #### Replacing X with Y
9
-
10
- |X|Y|
11
- |:--:|:--:|
12
- |Blog search|`ctrl+f`|
13
- |Post styling|[Reader view](https://support.mozilla.org/en-US/kb/firefox-reader-view-clutter-free-web-pages)|
14
- |Sharing links|_Copy/paste the URL_|
15
-
16
7
  #### Building on GitHub
17
8
 
18
- 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/).
19
10
 
20
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/)).
21
12
 
@@ -28,6 +19,8 @@ Create a blank `.md` file in `_pages/`, and add:
28
19
  ---
29
20
  layout: post
30
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
31
24
  ---
32
25
  ```
33
26
 
@@ -39,12 +32,32 @@ When naming blog post files, use the `YYYY-MM-DD-title.md` convention, or else y
39
32
 
40
33
  |||
41
34
  |:--:|:--:|
42
- | _Config_ | Update site URL, personal links, CV experience using `_config.yml`. |
43
- | _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. |
44
- | _About me_ | Customise the About Me section of the homepage by editing `_pages/about.md`. |
45
- | _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. |
46
37
  | _RSS_ | The RSS feed can be found at <https://yourgithubusername.github.io/feed>. |
47
38
  | _Sitemap_ | The sitemap can be found at <https://yourgithubusername.github.io/sitemap>. |
48
39
  | _Quickstart_ | Test your website locally by following the [Jekyll quickstart guide](https://jekyllrb.com/docs/). |
49
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`. |
50
- | _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,21 +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>{{ site.name }}</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="font-family:sans-serif;max-width:18cm;padding:8mm 16mm;text-align:justify;text-justify:inter-word;">
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 }}
13
+
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,14 +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;">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>
11
+
9
12
  {{ content }}
10
13
 
11
14
  {% if site.compression.footer %}
12
- <hr>
13
- <p style="font-family:monospace;">{% for link in site.personals %}{{ link.name }}: <a href="{{ link.url }}">{{ link.url }}</a><br>{% endfor %}
14
- {% 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.2
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