featherweight 0.6.3 → 0.7.1

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: 02eab7559d2074de0d418252c25515222d99f2ac89e67685fbf8552574aa1b9c
4
- data.tar.gz: b3a8fbdbdd0b42a8bfd0fc2f3ddb6b94fe9802e2801c4277030fef1f8995b002
3
+ metadata.gz: 72e752af413cd51d17d5b499aea959a8b7093faae93d90980db27f08a646bcc6
4
+ data.tar.gz: fae349f4b865c0ec8ed87fe4838d7fe52549b3a77aa641f9cf7b808c92a81a85
5
5
  SHA512:
6
- metadata.gz: eb46b51974da06fe718ed51e42d615f11c8ce7fbdca1894d8c87c1c17e29f92cf4202cb16672fc0ddaa488b761ad6175d430c7141908f30c3fa08d0b94a937ac
7
- data.tar.gz: '028ac88d61bae7aae3ed83eb8ce3059f165341e4688e3654873c128f3a254f586cd1c9e7d30cbf95062c8e6e12676c2803e0eceb1d448def46c85b37cafed75c'
6
+ metadata.gz: 410495017c6757cfd51c62e01447cb89e56fd501436c86f85790f8cc46ffca32a49861423847729f8bfcf9afc633d744b41fd55c7622ead2249747475613d6b8
7
+ data.tar.gz: 0bd3f847b29a500f55d02952a12489476e160fa880600c0e81726b2b460ba03ca5992115945684ff52c0fba506e7b85a05c25990ddcd438f4767b67c2c2ddbd8
data/README.md CHANGED
@@ -32,8 +32,9 @@ When naming blog post files, use the `YYYY-MM-DD-title.md` convention, or else y
32
32
 
33
33
  |||
34
34
  |:--:|:--:|
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. |
35
+ | _Config_ | Update site URL and othe default options using `_config.yml`. |
36
+ | _Homepage_ | Customise your homepage by editing the `index.md` file. |
37
+ | _Social media_ | Update your contact links for your homepage and post footer (optional) by editing `_includes_/contact.md` |
37
38
  | _RSS_ | The RSS feed can be found at <https://yourgithubusername.github.io/feed>. |
38
39
  | _Sitemap_ | The sitemap can be found at <https://yourgithubusername.github.io/sitemap>. |
39
40
  | _Quickstart_ | Test your website locally by following the [Jekyll quickstart guide](https://jekyllrb.com/docs/). |
@@ -50,14 +51,17 @@ Many of these are entirely optional settings. If you're looking to create a trul
50
51
  |:--:|:--:|
51
52
  | _SEO_ | Enabling search engine optimisations will add metadata for search engines and sharing on social media. |
52
53
  | _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. |
54
+ | _Load time_ | Show off your page load times in the page footer. (Requires JS) |
55
+ | _Page size_ | Report the webpage size in bytes, also displayed in the page footer. (Requires JS) |
56
+ | _Social media footer_ | Display social media links below blog posts. |
57
+ | _Blog list_ | Toggle the display of your blog list on the homepage. |
58
+ | _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. Customise CSS by editing `_includes/main.css`. |
59
+ | _Favicons_ | Generate icons for your site using [https://realfavicongenerator.net/](https://realfavicongenerator.net/), or disable favicons using `_config.yml` to use a low-byte-count alternative. Change file names or theme colours using `_config.yml`. |
59
60
 
60
61
  #### Dev
61
62
  1. Clone this repository: `git clone https://github.com/Cutwell/featherweight.git`
62
63
  2. Download the project dependencies: `bundle install`
63
- 3. Run a local Jekyll server: `bundle exec jekyll serve`
64
+ 3. Run a local Jekyll server: `bundle exec jekyll serve`
65
+
66
+ #### Credit
67
+ feather by GREY Perspective from <a href="https://thenounproject.com/browse/icons/term/feather/" target="_blank" title="feather Icons">Noun Project</a>
@@ -0,0 +1,5 @@
1
+ * GitHub: [https://github.com/Cutwell/featherweight][1]
2
+ * Creator: [https://github.com/Cutwell][2]
3
+
4
+ [1]: https://github.com/Cutwell/featherweight
5
+ [2]: https://github.com/Cutwell
@@ -14,26 +14,22 @@
14
14
  <title>{{ site.name }}</title>
15
15
  {% endif %}
16
16
 
17
+ <!-- generate for your own icon using https://realfavicongenerator.net/ -->
17
18
  {% if site.compression.favicon %}
18
- <link rel="icon" type="image/png" sizes="32x32" href="{{ site.url }}/{{ site.favicon }}">
19
+ <link rel="apple-touch-icon" sizes="180x180" href="{{ site.apple-touch-icon | prepend: site.url }}">
20
+ <link rel="icon" type="image/png" sizes="32x32" href="{{ site.icon-32x32 | prepend: site.url }}">
21
+ <link rel="icon" type="image/png" sizes="16x16" href="{{ site.icon-64x64 | prepend: site.url }}">
22
+ <link rel="manifest" href="{{ site.manifest | prepend: site.url }}">
23
+ <link rel="mask-icon" href="{{ site.mask-icon.href | prepend: site.url }}" color="{{ site.mask-icon.color }}">
24
+ <meta name="msapplication-TileColor" content="{{ site.msapplication-TileColor }}">
25
+ <meta name="theme-color" content="{{ site.theme-color }}">
19
26
  {% else %}
20
27
  <link rel="icon" href="data:,">
21
28
  {% endif %}
22
29
 
23
- {% if site.compression.icon %}
24
- <link rel="shortcut icon" type="image/png" href="{{ site.compression.icon }}">
25
- <link rel="shortcut icon" sizes="192x192" href="{{ site.compression.icon }}">
26
- <link rel="apple-touch-icon" href="{{ site.compression.icon }}">
27
- {% endif %}
28
-
29
30
  <!-- include seo if enabled -->
30
31
  {% if site.compression.seo %}
31
32
  {% include seo.html %}
32
33
  {% endif %}
33
34
 
34
- <!-- include image styling if enabled and page is post -->
35
- {% if site.compression.css and page.layout == "post" %}
36
- <style>img{max-width:100%;height:auto}</style>
37
- {% endif %}
38
-
39
35
  </head>
@@ -0,0 +1,18 @@
1
+ body {
2
+ max-width: 80ch;
3
+ padding: 3em 1em;
4
+ margin: auto;
5
+ line-height: 1.6;
6
+ font-size: 1.25em;
7
+ font-family: Helvetica;
8
+ }
9
+
10
+ .d {
11
+ font-size: medium;
12
+ color: grey;
13
+ }
14
+
15
+ img {
16
+ max-width: 100%;
17
+ height: auto
18
+ }
data/_includes/seo.html CHANGED
@@ -4,8 +4,16 @@
4
4
 
5
5
  <meta name="description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
6
6
 
7
- <link rel="alternate" type="application/rss+xml" title="{{ site.name }}" href="{{ "/feed.xml" | prepend: site.url }}">
8
- <link rel="sitemap" type="application/xml" title="Sitemap" href="{{ "/sitemap.xml" | prepend: site.url }}" />
7
+ <!-- CSP
8
+ JS: only allow scripts from the same domain and inline scripts
9
+ CSS: only allow styles from the same domain and inline styles
10
+ IMG / MEDIA: allow from any domain
11
+ -->
12
+ <meta http-equiv='Content-Security-Policy' content="default-src 'self' ; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' *; media-src 'self' *;">
13
+
14
+ <!-- sitemap and rss feed -->
15
+ <link rel="alternate" type="application/rss+xml" title="{{ site.name }}" href="{{ '/feed.xml' | prepend: site.url }}">
16
+ <link rel="sitemap" type="application/xml" title="Sitemap" href="{{ '/sitemap.xml' | prepend: site.url }}" />
9
17
  <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.url }}">
10
18
 
11
19
  <!-- Google site verification -->
@@ -6,12 +6,34 @@ layout: compress
6
6
 
7
7
  <!-- include page css if enabled -->
8
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">
9
+ <style>{% include main.css %}</style>
10
10
  {% endif %}
11
11
 
12
12
  {{ content }}
13
13
 
14
+ <!-- add linebreak for homepage styling, but not for posts -->
15
+ {% if page.layout != 'post' %}
16
+ <br>
17
+ {% endif %}
18
+
14
19
  <!-- add page load time if enabled -->
15
20
  {% 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>
21
+ <i id="lt" class="d"></i><br>
22
+ {% endif %}
23
+
24
+ <!-- report page size in bytes -->
25
+ {% if site.compression.page-size %}
26
+ <i id="ps" class="d"></i>
27
+ {% endif %}
28
+
29
+ <!-- load script tag if JS is needed -->
30
+ {% if site.compression.page-size or site.compression.load-time %}
31
+ <script>
32
+ {% if site.compression.page-size %}
33
+ document.getElementById("ps").innerHTML="Size: "+document.documentElement.outerHTML.length+" bytes";
34
+ {% endif %}
35
+ {% if site.compression.load-time %}
36
+ window.onload=function(){document.getElementById("lt").innerHTML="Load time: "+(window.performance.timing.domContentLoadedEventEnd-window.performance.timing.navigationStart)+"ms"};
17
37
  {% endif %}
38
+ </script>
39
+ {% endif %}
data/_layouts/post.html CHANGED
@@ -7,11 +7,14 @@ layout: default
7
7
 
8
8
  <h1>{{ page.title }}</h1>
9
9
  <i>Written on {{ page.date | date: "%B %e, %Y" }}</i>
10
- <br><i>{% include reading-time.html %}</i>
10
+ <br><i class="d">{% include reading-time.html %}</i>
11
11
 
12
12
  {{ content }}
13
13
 
14
- {% if site.compression.footer %}
14
+ {% if site.compression.footer or site.compression.load-time or site.compression-page-size %}
15
15
  <br><hr>
16
- <p>{% for link in site.social-urls %}{{ link.name }}: <a href="{{ link.url }}">{{ link.url}}</a><br>{% endfor %}</p>
16
+ {% endif %}
17
+ {% if site.compression.footer %}
18
+ {% capture contact %}{% include contact.md %}{% endcapture %}
19
+ {{ contact | markdownify }}
17
20
  {% 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.6.3
4
+ version: 0.7.1
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-10-31 00:00:00.000000000 Z
11
+ date: 2022-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -123,7 +123,9 @@ extra_rdoc_files: []
123
123
  files:
124
124
  - LICENSE
125
125
  - README.md
126
+ - _includes/contact.md
126
127
  - _includes/header.html
128
+ - _includes/main.css
127
129
  - _includes/reading-time.html
128
130
  - _includes/seo.html
129
131
  - _layouts/compress.html