mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Compare commits
5 commits
734fc16df4
...
29371ed1f8
Author | SHA1 | Date | |
---|---|---|---|
|
29371ed1f8 | ||
|
bc6577e241 | ||
|
811c887755 | ||
|
062c348d4e | ||
|
be86ab3ac7 |
9 changed files with 145 additions and 43 deletions
6
Makefile
6
Makefile
|
@ -119,9 +119,9 @@ deploy-onion:
|
||||||
# we only deploy html to the staging site
|
# we only deploy html to the staging site
|
||||||
.PHONY: deploy-staging
|
.PHONY: deploy-staging
|
||||||
deploy-staging:
|
deploy-staging:
|
||||||
@$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging .prepare-deploy
|
@$(MAKE) DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging .prepare-deploy
|
||||||
@$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging compress
|
@$(MAKE) DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging compress
|
||||||
@$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging deploy-html
|
@$(MAKE) DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging deploy-html
|
||||||
|
|
||||||
.PHONY: lint-and-deploy-staging
|
.PHONY: lint-and-deploy-staging
|
||||||
lint-and-deploy-staging:
|
lint-and-deploy-staging:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
title: "{{ replace .Name "-" " " | title }}"
|
title: "{{ .Name | humanize }}"
|
||||||
date: {{ .Date }}
|
date: {{ .Date }}
|
||||||
draft: true
|
draft: true
|
||||||
---
|
---
|
||||||
|
|
10
archetypes/reply.md
Normal file
10
archetypes/reply.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
title: "{{ .Name | humanize }}"
|
||||||
|
date: {{ .Date }}
|
||||||
|
replyURI: ""
|
||||||
|
replyTitle: ""
|
||||||
|
replyType: ""
|
||||||
|
replyAuthor: ""
|
||||||
|
replyAuthorURI: ""
|
||||||
|
---
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* CSS that adds the bare minimum for a simple layout.
|
/* CSS that adds the bare minimum for a simple, accessible,
|
||||||
|
* touch-friendly layout.
|
||||||
* Nothing here exists purely for aesthetics; everything addresses a
|
* Nothing here exists purely for aesthetics; everything addresses a
|
||||||
* specific a11y, compatibility, or critical
|
* specific a11y, compatibility, or critical
|
||||||
* usability need.
|
* usability need.
|
||||||
|
@ -13,7 +14,7 @@
|
||||||
* don't actually use those for styling.
|
* don't actually use those for styling.
|
||||||
*
|
*
|
||||||
* To keep myself from caring about minute details, I limited myself to
|
* To keep myself from caring about minute details, I limited myself to
|
||||||
* only defining spacing in increments of .125em. Pixels are 1px or
|
* only defining spacing in increments of .25em. Pixels are 1px or
|
||||||
* multiples of 3px. This also improves compression. No more "finding
|
* multiples of 3px. This also improves compression. No more "finding
|
||||||
* the perfect value".
|
* the perfect value".
|
||||||
*
|
*
|
||||||
|
@ -81,18 +82,6 @@ html {
|
||||||
max-width: 35em;
|
max-width: 35em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compensate for misalignment and wasted space caused by padding
|
|
||||||
* and margin adjustments in nav children made to meet SC 2.5.5 */
|
|
||||||
footer > nav,
|
|
||||||
header > nav,
|
|
||||||
dt > a,
|
|
||||||
h2 + a {
|
|
||||||
margin-left: -.25em;
|
|
||||||
}
|
|
||||||
header > nav {
|
|
||||||
margin-bottom: -.75em;
|
|
||||||
}
|
|
||||||
|
|
||||||
summary {
|
summary {
|
||||||
/* The tappable region of a <summary> extends across the page.
|
/* The tappable region of a <summary> extends across the page.
|
||||||
* we need to tell users that the full space is interactive.
|
* we need to tell users that the full space is interactive.
|
||||||
|
@ -111,35 +100,79 @@ html {
|
||||||
margin: .5em 0;
|
margin: .5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make superscripts a bit easier to tap. */
|
||||||
|
sup > a {
|
||||||
|
margin-left: .25em;
|
||||||
|
padding-bottom: .25em;
|
||||||
|
}
|
||||||
|
|
||||||
/* SC 2.5.5, Google a11y: Increase tap target size a bit
|
/* SC 2.5.5, Google a11y: Increase tap target size a bit
|
||||||
* - Summary is a tappable button
|
* - Summary is a tappable button
|
||||||
* - standalone links in lists are usually parts of collections of
|
* - standalone links in lists are usually parts of collections of
|
||||||
* links that should be easy to fat-finger
|
* links that should be easy to fat-finger
|
||||||
* - links that directly follow h2 without being contained in a
|
* - links that directly follow h2 without being contained in a
|
||||||
* paragraph are section permalinks. */
|
* paragraph are section permalinks. */
|
||||||
dt,
|
|
||||||
|
input,
|
||||||
dt > a,
|
dt > a,
|
||||||
summary,
|
summary,
|
||||||
h2 + a,
|
h2 + a,
|
||||||
li > a,
|
li > a {
|
||||||
nav li,
|
padding: .75em .25em;
|
||||||
li details li,
|
}
|
||||||
input {
|
/* Compensate for misalignment and wasted space caused by padding
|
||||||
padding: .875em .25em;
|
* and margin adjustments in nav children made to meet SC 2.5.5
|
||||||
|
* Also prevent overlapping outlines on focus */
|
||||||
|
|
||||||
|
/* We've increased the padding for dt > a, but dt without a link
|
||||||
|
* should take up as much space. */
|
||||||
|
dt {
|
||||||
|
margin: .75em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make superscripts a bit easier to tap. */
|
dt > a {
|
||||||
sup > a {
|
margin: -.75em 0 -.75em -.25em;
|
||||||
padding-bottom: .25em;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li ol {
|
header > nav {
|
||||||
/* Don't duplicate bottom space: the last list item in the nested
|
|
||||||
* list and the list item that is the entire nested list will both
|
|
||||||
* have bottom padding */
|
|
||||||
margin-bottom: -1em;
|
margin-bottom: -1em;
|
||||||
/* Prevent nested lists from overlapping */
|
}
|
||||||
padding-top: 1em;
|
|
||||||
|
h2 + a {
|
||||||
|
margin: -.75em -.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer > nav,
|
||||||
|
header > nav,
|
||||||
|
/* List items with direct hyperlink children should only have one hyperlink. */
|
||||||
|
li > a,
|
||||||
|
h2 + a,
|
||||||
|
nav ol a {
|
||||||
|
margin-left: -.25em;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav li,
|
||||||
|
ol li > a {
|
||||||
|
margin: .25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div[itemprop="comment"] dd > a {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: -.25em;
|
||||||
|
padding: .75em .25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Increase backlink tap target size */
|
||||||
|
a[role="doc-backlink"] {
|
||||||
|
padding: 0 1.75em 1.5em .25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make room for those big backlink buttons so they don't overlap
|
||||||
|
* with links on the following endnote */
|
||||||
|
section[role="doc-endnotes"] li {
|
||||||
|
margin-bottom: 1.75em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +184,7 @@ dd,
|
||||||
ol,
|
ol,
|
||||||
ul {
|
ul {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-left: 1.625em;
|
padding-left: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol ol,
|
ol ol,
|
||||||
|
@ -176,7 +209,7 @@ nav ul {
|
||||||
* pixels between tap targets. */
|
* pixels between tap targets. */
|
||||||
nav ul li {
|
nav ul li {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: .375em;
|
margin-right: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* narrow screens: reduce margin for blockquotes a lot, using
|
/* narrow screens: reduce margin for blockquotes a lot, using
|
||||||
|
@ -220,8 +253,8 @@ kbd {
|
||||||
|
|
||||||
/* <ins> should not be mistaken for hyperlinks. */
|
/* <ins> should not be mistaken for hyperlinks. */
|
||||||
ins {
|
ins {
|
||||||
text-decoration: none;
|
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* narrow screens: remove unused figure margins
|
/* narrow screens: remove unused figure margins
|
||||||
|
@ -292,7 +325,7 @@ pre {
|
||||||
border: 1px solid #999;
|
border: 1px solid #999;
|
||||||
|
|
||||||
/* borders shouldn't touch text */
|
/* borders shouldn't touch text */
|
||||||
padding: 0 0.125em;
|
padding: 0 .25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* center standalone images; same justification as
|
/* center standalone images; same justification as
|
||||||
|
|
|
@ -88,11 +88,11 @@ These engines pass most of the tests listed in the "methodology" section. All of
|
||||||
=> https://www.alexandria.org/ Alexandria
|
=> https://www.alexandria.org/ Alexandria
|
||||||
=> https://github.com/alexandria-org/alexandria Alexandria engine source code
|
=> https://github.com/alexandria-org/alexandria Alexandria engine source code
|
||||||
|
|
||||||
* Fairsearch: an ambitious engine from Ahrefs, an SEO/backlink-finder company, that "shares ad profit with creators and protects your privacy". Most engines show results that include keywords from or related to the query; Fairsearch also shows results linked by pages containing the query. In other words, not all results contain relevant keywords. This makes it excellent for less precise searches and discovery of "related sites", especially with its index of *hundreds of billions of pages.* It's far worse at finding very specific information or recent events for now, but it will probably improve: while this version is live, it's not officially launched yet. When it officially launches, *it will be under a different name*. I expect Fairsearch to graduate from this section as result relevancy improves.
|
* Yep: an ambitious engine from Ahrefs, an SEO/backlink-finder company, that "shares ad profit with creators and protects your privacy". Most engines show results that include keywords from or related to the query; Yep also shows results linked by pages containing the query. In other words, not all results contain relevant keywords. This makes it excellent for less precise searches and discovery of "related sites", especially with its index of *hundreds of billions of pages.* It's far worse at finding very specific information or recent events for now, but it will probably improve.
|
||||||
|
|
||||||
=> https://fairsearch.com/ Fairsearch
|
=> https://yep.com/ Yep
|
||||||
|
|
||||||
FairSearch supports Open Graph and some JSON-LD at the moment. A look through the source code for Alexandria and Gigablast didn't seem to reveal the use of any structured data
|
Yep supports Open Graph and some JSON-LD at the moment. A look through the source code for Alexandria and Gigablast didn't seem to reveal the use of any structured data
|
||||||
|
|
||||||
|
|
||||||
### Smaller indexes, hit-and-miss
|
### Smaller indexes, hit-and-miss
|
||||||
|
|
|
@ -108,9 +108,9 @@ These engines pass most of the tests listed in the "methodology" section. All of
|
||||||
|
|
||||||
- [Alexandria](https://www.alexandria.org/): A pretty new "non-profit, ad free" engine, with [freely-licensed code](https://github.com/alexandria-org/alexandria). Surprisingly good at finding recent pages. Its index is built from the Common Crawl; it isn't as big as Gigablast or Right Dao but its ranking is great.
|
- [Alexandria](https://www.alexandria.org/): A pretty new "non-profit, ad free" engine, with [freely-licensed code](https://github.com/alexandria-org/alexandria). Surprisingly good at finding recent pages. Its index is built from the Common Crawl; it isn't as big as Gigablast or Right Dao but its ranking is great.
|
||||||
|
|
||||||
- [Fairsearch](https://fairsearch.com/): an ambitious engine from Ahrefs, an SEO/backlink-finder company, that "shares ad profit with creators and protects your privacy". Most engines show results that include keywords from or related to the query; Fairsearch also shows results linked by pages containing the query. In other words, not all results contain relevant keywords. This makes it excellent for less precise searches and discovery of "related sites", especially with its index of _hundreds of billions of pages._ It's far worse at finding very specific information or recent events for now, but it will probably improve: while this version is live, it's not officially launched yet. When it officially launches, **it will be under a different name**. I expect Fairsearch to graduate from this section as result relevancy improves.
|
- [Yep](https://yep.com/): an ambitious engine from Ahrefs, an SEO/backlink-finder company, that "shares ad profit with creators and protects your privacy". Most engines show results that include keywords from or related to the query; Yep also shows results linked by pages containing the query. In other words, not all results contain relevant keywords. This makes it excellent for less precise searches and discovery of "related sites", especially with its index of _hundreds of billions of pages._ It's far worse at finding very specific information or recent events for now, but it will probably improve.
|
||||||
|
|
||||||
FairSearch supports Open Graph and some JSON-LD at the moment. A look through the source code for Alexandria and Gigablast didn't seem to reveal the use of any structured data.
|
Yep supports Open Graph and some JSON-LD at the moment. A look through the source code for Alexandria and Gigablast didn't seem to reveal the use of any structured data.
|
||||||
|
|
||||||
### Smaller indexes, hit-and-<wbr />miss {#smaller-indexes-hit-and-miss}
|
### Smaller indexes, hit-and-<wbr />miss {#smaller-indexes-hit-and-miss}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
(btw this is all made of <span> cuz it is supposed to be inline)
|
(btw this is all made of <span> cuz it is supposed to be inline)
|
||||||
--><span itemprop="author copyrightHolder" itemscope="" itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard">
|
--><span itemprop="author copyrightHolder" itemscope="" itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard">
|
||||||
<a itemprop="url" href="https://seirdy.one/" rel="author me home cc:attributionURL" class="u-url u-uid url" property="cc:attributionName">
|
<a itemprop="url" href="https://seirdy.one/" rel="author me home cc:attributionURL" class="u-url u-uid url" property="cc:attributionName">
|
||||||
{{ partial "indieweb-icon.html" -}}
|
{{ partial "indieweb-icon.html" }}
|
||||||
<span itemprop="name" class="p-name fn n">
|
<span itemprop="name" class="p-name fn n">
|
||||||
<span itemprop="givenName" class="p-given-name given-name">Rohan</span> <span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>
|
<span itemprop="givenName" class="p-given-name given-name">Rohan</span> <span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>
|
||||||
</span>
|
</span>
|
||||||
|
|
58
scripts/bin/hugo-new-note
Executable file
58
scripts/bin/hugo-new-note
Executable file
|
@ -0,0 +1,58 @@
|
||||||
|
#!/usr/bin/env dash
|
||||||
|
|
||||||
|
set -e -u
|
||||||
|
|
||||||
|
# the name of this program
|
||||||
|
progname="$(basename "${0}")"
|
||||||
|
|
||||||
|
help_text="Usage: ${progname} [OPTION...] FILENAME
|
||||||
|
|
||||||
|
Compose a new note
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h Print this help and exit
|
||||||
|
-r Whether this note should be a reply
|
||||||
|
"
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
printf '%s' "${help_text}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# when the user passess bad args, send a msg to stderr and exit
|
||||||
|
# usage: bad_option <option> <reason>
|
||||||
|
bad_option() {
|
||||||
|
echo "${progname}: option ${1}: ${2}" >&2
|
||||||
|
usage >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
reply='0'
|
||||||
|
|
||||||
|
while getopts "hr" flags; do
|
||||||
|
case ${flags} in
|
||||||
|
h)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
r)
|
||||||
|
reply='1'
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
bad_option "${flags}" 'invalid option'
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
filename="notes/$1.md"
|
||||||
|
|
||||||
|
if [ "$reply" = '1' ]; then
|
||||||
|
hugo new --kind reply "$filename"
|
||||||
|
else
|
||||||
|
hugo new "$filename"
|
||||||
|
fi
|
||||||
|
|
||||||
|
"${EDITOR-nvim}" "content/$filename"
|
||||||
|
|
||||||
|
# vi:ft=sh
|
|
@ -32,6 +32,7 @@ sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - -o "$tmp_file"
|
||||||
| sd '<pre(?: tabindex="0")?>\n\t*<code ' '<pre tabindex="0"><code ' \
|
| sd '<pre(?: tabindex="0")?>\n\t*<code ' '<pre tabindex="0"><code ' \
|
||||||
| sd '(?:\n)?</code>\n(?:[\t\s]*)?</pre>' '</code></pre>' \
|
| sd '(?:\n)?</code>\n(?:[\t\s]*)?</pre>' '</code></pre>' \
|
||||||
| sd '</span>.span itemprop="familyName"' '</span> <span itemprop="familyName"' \
|
| sd '</span>.span itemprop="familyName"' '</span> <span itemprop="familyName"' \
|
||||||
|
| sd '(<img itemprop="image" class="u-photo photo"[^>]*/>)<span' '$1 <span' \
|
||||||
| sd '([a-z])<(data|time)' '$1 <$2'
|
| sd '([a-z])<(data|time)' '$1 <$2'
|
||||||
} >>"$xhtml_file"
|
} >>"$xhtml_file"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue