Initial project port from GitHub to sourcehut

This commit is contained in:
Bradley Taunt 2022-11-12 22:03:49 -05:00
commit a45c4e6be0
38 changed files with 374 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
Gemfile.lock
_site

10
404.html Normal file
View File

@ -0,0 +1,10 @@
---
permalink: /404.html
layout: default
---
<h2>404</h2>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
<hr>

32
Gemfile Normal file
View File

@ -0,0 +1,32 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.1.1"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
#group :jekyll_plugins do
# gem "jekyll-feed", "~> 0.12"
#end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", "~> 1.2"
gem "tzinfo-data"
end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "webrick", "~> 1.7"

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Bradley Taunt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

5
README.md Normal file
View File

@ -0,0 +1,5 @@
# 1kb.club
An exclusive members-only club for web pages weighing less than 1 kilobyte
Live collection: [https://1kb.club](https://1kb.club)

32
_config.yml Normal file
View File

@ -0,0 +1,32 @@
title: 1kB Club
description: An exclusive membership for web pages weighing less than 1 kilobyte.
baseurl: '' # the subpath of your site, e.g. /blog
url: https://1kb.club # the base hostname & protocol for your site, e.g. http://example.com
author:
name: Bradley Taunt
email: hello@tdarb.org
# Collections
collections:
site_listings:
output: false
u:
output: true
permalink: /blog/:title/
highlighter: none
compress_html:
clippings: all
endings: all
startings: [html, head, body]
exclude:
- generate.sh
- README.md
include:
- netlify.toml
- ~/

3
_includes/footer.html Normal file
View File

@ -0,0 +1,3 @@
<footer>
<p><small>Maintained with love for a performant web
</footer>

5
_includes/head.html Executable file
View File

@ -0,0 +1,5 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="data:,">
<title>1kB</title>
</head>

20
_includes/users.html Normal file
View File

@ -0,0 +1,20 @@
<p>Users (<a href="/u">Add User</a>)
<table>
<thead>
<tr>
<td>URL</td>
<td>Size in bytes</td>
</tr>
</thead>
<tbody>
{% for item in users %}
{% if item.size == 0 %}
{% else %}
<tr>
<td><a href="/u/{{ item.pageurl }}">~{{ item.pageurl }}</a></td>
<td><code>{{ item.size }}</code></td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>

10
_layouts/compress.html Normal file
View File

@ -0,0 +1,10 @@
---
# Jekyll layout that compresses HTML
# v3.1.0
# http://jch.penibelst.de/
# © 20142015 Anatol Broder
# MIT License
---
{% capture _LINE_FEED %}
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}

13
_layouts/default.html Executable file
View File

@ -0,0 +1,13 @@
---
layout: compress
---
<!DOCTYPE html>
<html lang="en">
{% include head.html %}
<style>table{min-width: 300px;}</style>
<body>
{{ content }}
</body>
</html>

13
_layouts/page.html Executable file
View File

@ -0,0 +1,13 @@
---
layout: compress
---
<!DOCTYPE html>
<html lang="en">
{% include head.html %}
<body>
{{ content }}
</body>
</html>

9
_layouts/post.html Normal file
View File

@ -0,0 +1,9 @@
---
layout: default
---
<p>{{ page.name }}
<p>{{ page.blurb }}
<p><a href="mailto:{{ page.email }}">{{ page.email }}</a>

View File

@ -0,0 +1,4 @@
---
pageurl: 10xdev.cc
size: 387
---

View File

@ -0,0 +1,4 @@
---
pageurl: 1k.ekallevig.com
size: 697
---

View File

@ -0,0 +1,4 @@
---
pageurl: 1k.lom.me
size: 628
---

View File

@ -0,0 +1,4 @@
---
pageurl: 1kb.alexi.sh
size: 832
---

View File

@ -0,0 +1,4 @@
---
pageurl: 1kb.club/submit
size: 699
---

View File

@ -0,0 +1,4 @@
---
pageurl: 1kb.jorgeff.com
size: 872
---

View File

@ -0,0 +1,4 @@
---
pageurl: 1kb.lejtzen.dev
size: 979
---

View File

@ -0,0 +1,4 @@
---
pageurl: 1kb.lingdocs.com
size: 500
---

View File

@ -0,0 +1,4 @@
---
pageurl: 1kb.ng5p.com
size: 910
---

View File

@ -0,0 +1,4 @@
---
pageurl: blmayer.dev
size: 715
---

View File

@ -0,0 +1,4 @@
---
pageurl: cv.tdarb.org
size: 920
---

4
_site_listings/hi.gy.md Normal file
View File

@ -0,0 +1,4 @@
---
pageurl: hi.gy
size: 622
---

View File

@ -0,0 +1,4 @@
---
pageurl: kb.vicjicama.com
size: 828
---

View File

@ -0,0 +1,4 @@
---
pageurl: korayer.de
size: 1014
---

View File

@ -0,0 +1,4 @@
---
pageurl: pussthecat.org/1
size: 565
---

View File

@ -0,0 +1,4 @@
---
pageurl: richardthames.com
size: 894
---

4
_site_listings/t0.vc.md Normal file
View File

@ -0,0 +1,4 @@
---
pageurl: t0.vc
size: 659
---

View File

@ -0,0 +1,4 @@
---
pageurl: zenofpython.org
size: 1022
---

View File

@ -0,0 +1,4 @@
---
pageurl: zrice.net
size: 854
---

8
_u/10xdev.md Normal file
View File

@ -0,0 +1,8 @@
---
layout: post
name: Marvin 10xdev
blurb: I'm a web3 developer.
pageurl: 10xdev
email: marvin.10xdev@proton.me
size: 490
---

28
_u/index.md Normal file
View File

@ -0,0 +1,28 @@
---
layout: default
size: 0
permalink: /u/index.html
---
[&larr; Go home](/)
Get your own `user` 1kB Club sub-folder domain!
1. Fork the 1kB repo
2. Add a new file under `_u`
3. Setup the file settings based on the template below
4. Save the file as `yourname.md`
5. [Open a PR here](https://github.com/bradleytaunt/1kb.club/pulls)
Use the template below when creating your site file (size in bytes):
```
---
layout: post
name: Bradley Taunt
blurb: I'm a UX designer from Canada.
pageurl: tdarb
email: hello@tdarb.org
size: 646
---
```

8
_u/tdarb.md Normal file
View File

@ -0,0 +1,8 @@
---
layout: post
name: Bradley Taunt
blurb: I'm a UX designer from Canada.
pageurl: tdarb
email: hello@tdarb.org
size: 482
---

26
atom.xml Normal file
View File

@ -0,0 +1,26 @@
---
layout: null
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title }}</title>
<link href="{{ site.url }}{{ site.baseurl }}/atom.xml" rel="self"/>
<link href="{{ site.url }}{{ site.baseurl }}/"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url }}</id>
<author>
<name>{{ site.author.name }}</name>
<email>{{ site.author.email }}</email>
</author>
{% for item in site.site_listings %}
<entry>
<title>{{ item.pageurl }} - {{ item.size }} kb</title>
<link href="https://{{ item.pageurl }}"/>
<id>https://{{ item.pageurl }}</id>
</entry>
{% endfor %}
</feed>

33
index.html Normal file
View File

@ -0,0 +1,33 @@
---
layout: default
title: A collection of websites weighing in less than 1kB
summary: Listing all websites under 1kB in total size
---
<p>1kB Club is a list of web pages weighing less than 1 kilobyte (1,024 bytes).
<p>---
{% assign websites = site.site_listings | sort: 'size' %}
{% assign users = site.u | sort: 'size' %}
<p>Members (<a href="/submit">Submit</a>)
<table>
<thead>
<tr>
<td>URL</td>
<td>Size in bytes</td>
</tr>
</thead>
<tbody>
{% for item in websites %}
<tr>
<td><a href="https://{{ item.pageurl }}">{{ item.pageurl }}</a></td>
<td><code>{{ item.size }}</code></td>
</tr>
{% endfor %}
</tbody>
</table>
<p>---
{% include users.html %}

20
submit.md Normal file
View File

@ -0,0 +1,20 @@
---
title: Submit
layout: page
---
[&larr; Go home](/)
Submit to the 1kB Club
1. Put your website through [GTmetrix](https://gtmetrix.com)
2. [Open a PR here](https://github.com/bradleytaunt/1kb.club/pulls)
Use the template below when creating your site file (size in bytes):
```
---
pageurl: domain.com
size: 300
---
```