featherweight 0.3 → 0.5

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: 6af162296331685da8337bef5f973fa6b77ade155d1c5e1d8ee6879f7fd4759c
4
- data.tar.gz: c1375af8d1dc52d9f61d408d6d79b0c229a722d52847cbe599fc564f57833850
3
+ metadata.gz: d1ee599d774615cc8bafd940068fb3dbeef8822f2416c913710b47dd2575869c
4
+ data.tar.gz: efaa2e54d473b0fc0faeceba1b3b87b864f2b589df9a4ef3e0ea57eb8d303e5d
5
5
  SHA512:
6
- metadata.gz: 36b3c4e1358cf9a0a312c96512d20167319bb0611cc100ecc2155b08340bcfce2841f9b3dd7ad5fd51f59125e216eebb08681d91b7b135847e4fec2e3e403099
7
- data.tar.gz: '09356b970feec389f395f631fc1341b45502f1e00489c6ef174c24fd85597ff18a74d7e92432a35f29b6fdfa2a506d32b8cba2afcfed95c715705eb2150ef71b'
6
+ metadata.gz: efb4c4e5d0d72dcaf6d0e777c1fa324f80449052e76f6974acdca756a030c34aa923f88eee5a882f245c9cfbd292483925bc2a639241622933fe38531070c5bd
7
+ data.tar.gz: 88a200ae763a3ed09e5bf3003673b961e2488cb99b821d2cb9c177b9fb20c3f058c0ab1163ebba4cf9bb5d78d9e23d7448797f46ea756837e6acbc9f53006c6d
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [ruby-gems]: https://rubygems.org/gems/featherweight
6
6
 
7
7
 
8
- **Replacing X with Y**
8
+ #### Replacing X with Y
9
9
 
10
10
  |X|Y|
11
11
  |:--:|:--:|
@@ -13,26 +13,38 @@
13
13
  |Post styling|[Reader view](https://support.mozilla.org/en-US/kb/firefox-reader-view-clutter-free-web-pages)|
14
14
  |Sharing links|_Copy/paste the URL_|
15
15
 
16
- **Getting started**
16
+ #### Building on GitHub
17
17
 
18
- 1. Customise website ownership, update personal links, and detail CV experience using `_config.yml`.
19
- 2. Update `_pages/about.md` with an introduction.
20
- 3. Write some blogs, using `_posts/test.md` as a template.
21
- 4. You're ready to host your minimalist site!
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).
22
19
 
23
- **Building on GitHub**
20
+ 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/)).
24
21
 
25
- 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).
22
+ The workflow pushes the build to `gh-pages` branch by default, so make sure this exists and your page settings point towards it.
23
+
24
+ #### Writing blog posts
26
25
 
27
- 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 to GitHub pages (as advised by [Jekyll](https://jekyllrb.com/docs/continuous-integration/github-actions/)).
26
+ Create a blank `.md` file in `_pages/`, and add:
27
+ ```
28
+ ---
29
+ layout: post
30
+ title: My blog post.
31
+ ---
32
+ ```
28
33
 
29
- The workflow pushes the build to `gh-pages` branch by default, so make sure this exists and your pages settings points towards it.
34
+ Write your blog post in GitHub-flavoured-markdown below the metadata.
30
35
 
31
- **Notes**
36
+ When naming blog post files, use the `YYYY-MM-DD-title.md` convention, or else your post won't appear in the blog post list. Read the [Jekyll docs](https://jekyllrb.com/docs/posts/).
37
+
38
+ #### Cheatsheet
32
39
 
33
40
  |||
34
41
  |:--:|:--:|
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
46
  | _RSS_ | The RSS feed can be found at <https://yourgithubusername.github.io/feed>. |
36
47
  | _Sitemap_ | The sitemap can be found at <https://yourgithubusername.github.io/sitemap>. |
37
48
  | _Quickstart_ | Test your website locally by following the [Jekyll quickstart guide](https://jekyllrb.com/docs/). |
38
- | _Naming convention_ | When naming blog post files, use the `YYYY-MM-DD-title.md` convention, or else your post won't appear in the blog post list. Read the [Jekyll docs](https://jekyllrb.com/docs/posts/). |
49
+ | _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. |
50
+
@@ -8,10 +8,14 @@ layout: compress
8
8
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
9
9
  <link rel="alternate" type="application/rss+xml" title="{{ site.name }}" href="{{ site.url }}/feed.xml" />
10
10
 
11
- {% if site.favicon %}
11
+ {% if site.compression.favicon %}
12
12
  <link rel="icon" type="image/png" sizes="32x32" href="{{ site.url }}/{{ site.favicon }}">
13
13
  {% else %}
14
14
  <link rel="icon" href="data:,">
15
15
  {% endif %}
16
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;">
19
+ {% endif %}
20
+
17
21
  {{ content }}
data/_layouts/post.html CHANGED
@@ -1,5 +1,14 @@
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>
6
+ {% endif %}
7
+
4
8
  <b>{{ page.title }}</b><br><i> Written on {{ page.date | date: "%B %e, %Y" }} </i>
5
9
  {{ content }}
10
+
11
+ {% 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 %}
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.3'
4
+ version: '0.5'
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-22 00:00:00.000000000 Z
11
+ date: 2022-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -57,9 +57,6 @@ dependencies:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
59
  version: '1.4'
60
- - - ">"
61
- - !ruby/object:Gem::Version
62
- version: '1.4'
63
60
  type: :runtime
64
61
  prerelease: false
65
62
  version_requirements: !ruby/object:Gem::Requirement
@@ -67,9 +64,6 @@ dependencies:
67
64
  - - "~>"
68
65
  - !ruby/object:Gem::Version
69
66
  version: '1.4'
70
- - - ">"
71
- - !ruby/object:Gem::Version
72
- version: '1.4'
73
67
  - !ruby/object:Gem::Dependency
74
68
  name: kramdown
75
69
  requirement: !ruby/object:Gem::Requirement
@@ -77,9 +71,6 @@ dependencies:
77
71
  - - "~>"
78
72
  - !ruby/object:Gem::Version
79
73
  version: '2.4'
80
- - - ">"
81
- - !ruby/object:Gem::Version
82
- version: '2.4'
83
74
  type: :runtime
84
75
  prerelease: false
85
76
  version_requirements: !ruby/object:Gem::Requirement
@@ -87,9 +78,6 @@ dependencies:
87
78
  - - "~>"
88
79
  - !ruby/object:Gem::Version
89
80
  version: '2.4'
90
- - - ">"
91
- - !ruby/object:Gem::Version
92
- version: '2.4'
93
81
  - !ruby/object:Gem::Dependency
94
82
  name: liquid-c
95
83
  requirement: !ruby/object:Gem::Requirement
@@ -97,21 +85,43 @@ dependencies:
97
85
  - - "~>"
98
86
  - !ruby/object:Gem::Version
99
87
  version: '4.0'
100
- - - ">"
88
+ type: :runtime
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - "~>"
101
93
  - !ruby/object:Gem::Version
102
94
  version: '4.0'
95
+ - !ruby/object:Gem::Dependency
96
+ name: jekyll-loading-lazy
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: 0.1.1
103
102
  type: :runtime
104
103
  prerelease: false
105
104
  version_requirements: !ruby/object:Gem::Requirement
106
105
  requirements:
107
106
  - - "~>"
108
107
  - !ruby/object:Gem::Version
109
- version: '4.0'
110
- - - ">"
108
+ version: 0.1.1
109
+ - !ruby/object:Gem::Dependency
110
+ name: jekyll-zopfli
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
111
114
  - !ruby/object:Gem::Version
112
- version: '4.0'
115
+ version: 2.0.0
116
+ type: :runtime
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: 2.0.0
113
123
  - !ruby/object:Gem::Dependency
114
- name: jekyll-loading-lazy
124
+ name: kramdown-parser-gfm
115
125
  requirement: !ruby/object:Gem::Requirement
116
126
  requirements:
117
127
  - - ">="