1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-15 01:42:10 +00:00
Commit graph

99 commits

Author SHA1 Message Date
Rohan Kumar
cb26956bca
Internal: improve scripts
- I forgot to compress xhtml files. fix that.

- Stylistic change: remove unnecessary brace expansions
- Don't repeatedly append to a file; run commands in a different scope
  and write all at once.

Move Nu HTML validator filtering into a shell script:
- Return a bad exit code if validation errors are found after filtering
- Remove null-ish values from the JSON output; the final output *should*
  be an empty string, since nothing should be reported.
2022-06-02 17:18:13 -07:00
Rohan Kumar
b4850ed89a
Use XML declaration on XHTML, other XHTML tweaks
- Remove XHTML content-type meta header from HTML documents, reverting
  back to the meta charset
- Give XHTML documents their own XHTML declaration
- Remove now-redundant meta charset from XHTML
- Since XHTML and HTML documents differ now, compress after running
  xhtmlize and make xhtmlize only act on uncompressed files.
- Validate XHTML using vnu
2022-05-31 17:16:44 -07:00
Rohan Kumar
90aeb2d23a
Create both index.html and index.xhtml files
Combines well with content-negotiation based on the "Accept" header.
2022-05-30 16:09:40 -07:00
Rohan Kumar
1aed7a66d4
Switch to XHTML5 markup
The site now has polygot markup and can handle both XHTML5 and HTML5
parsing rules. My staging site will be XHTML but my main site will be
HTML5, just in case of parse errors.

If other tools (e.g. LightHouse) end up supporting XHTML5, I'll consider
switching the content-type to XHTML.
2022-05-30 17:39:45 -07:00
Rohan Kumar
c84c8d4214
BREAKING: Prettify URLs, add Atom feeds
Adding a bunch of server configs to do the re-directs too.
2022-05-26 18:57:49 -07:00
Rohan Kumar
a9039e1bde
Adjust image transcript approach
- Use section instead of nested article
- Adjust stylesheets to match above markup changes
- Mention upcoming aria-details
2022-05-12 17:33:12 -07:00
Rohan Kumar
3f7e32e70f
Build system: allow parallel builds
Make it possible to build the tilde, staging, production, and onion
sites in parallel. Lint the staging site before deploying it.

Also make these bmake-compatible so I can use bmake instead of gmake.
2022-05-11 10:09:58 -07:00
Rohan Kumar
7a3aee1539
Streamline lint configuration
- Add lint using local installation of the Nu HTML Validator and some
  jq-based filtering of false positives
- Move linter configs to directory, to de-clutter the repo
2022-05-11 10:01:22 -07:00
Rohan Kumar
978b4b2b1a
Improve tap target + font size for WCAG AAA
Increased font size to decrease chars-per-line (SC 1.4.8) and increase
tap target size.

Pad the nav links more and add some extra space between them to meet SC
2.5.5.
2022-05-03 17:05:47 -07:00
Rohan Kumar
eb8ca07b9f
Goldmark 1.4.12, switch to good unminified output
- Goldmark 1.4.12 switches footnotes from a <section> to a <div>; update
  regexes and stylesheet to account for this.
- Goldmark 1.4.12 allows multiple footnotes with the same reference; use
  that.
- Clean up templates for unminified output. Also delete an unused class.
- Switch to unminified output by default.
2022-04-25 08:49:13 -07:00
Rohan Kumar
c609681824
Oops, that wasn't a typo. 2022-04-23 20:27:35 -07:00
Rohan Kumar
4214a351ba
Fix stylelint 2022-04-13 18:22:07 -07:00
Rohan Kumar
e455703209
Remove "last deployed" date
Visitors can see that on post update dates; I can see that in
builds.sr.ht.

This results in not having to upload every page on a trivial change. Add
the "-c" rsync flag to take advantage of that. Doing so should also
result in longer-lived cached copies, with etags and last-modified
headers.
2022-04-04 19:00:07 -07:00
Rohan Kumar
bbe85b76e9
Makefile: reduce ect compression, skip cache 2022-03-28 14:56:49 -07:00
Rohan Kumar
2bf7359303
Optimize head size
- apple-touch-icon not needed, will be fetched from doc root
- re-order <head> elements to optimize for compression algorithm size
  savings. shaved off like 15 bytes. this was a good use of my time.
2022-02-28 16:00:05 -08:00
Rohan Kumar
2fefe939db
Fix: drop static-webmentions 2021-12-13 15:34:37 -08:00
Rohan Kumar
d6363e2948
Fix makefiles 2021-07-19 02:58:39 -07:00
Rohan Kumar
c844256b8d
Makefile: compress missed assets 2021-07-08 14:55:49 -07:00
Rohan Kumar
0c048abd35
Chore: fix rsync, config.toml 2021-06-26 19:36:37 -07:00
Rohan Kumar
f4a07c96a8
CI: deploy onion site 2021-06-16 12:19:27 -07:00
Rohan Kumar
f61bbfe3d2
Update assets with precompressed versions
No need to re-compress the same file every CI job.
2021-06-13 17:25:59 -07:00
Rohan Kumar
72b20bf6e0
Switch from Zopfli to Efficient Compression Tool
ECT is more efficient than Zopfli given the same amount of time. It uses
Zopfli under the hood.

- Switch from binaries.tar.br to binaries.tar.gz
- Bring in the statically-linked ect/brotli binaries from
  binaries.tar.gz
2021-06-02 20:01:40 -07:00
Rohan Kumar
a81e185b7d
CI/Makefile: reduce zopfli compression even more
70 iterations seems to be the point at which we hit diminishing returns.
The combined size difference of all *.gz files with 70 iterations and
1000 iterations is 65 bytes.
2021-03-17 15:06:08 -07:00
Rohan Kumar
76efbb8479
CI: speed up static gzip+zopfli compression
Compress RSS feeds with fewer iterations since their files are larger.
2021-02-24 13:15:49 -08:00
Rohan Kumar
edfcb63c0f
Don't send webmentions to archive.is 2021-02-23 01:53:30 -08:00
Rohan Kumar
cd7e3c234c
Makefile: include custom flags in serve cmd 2021-01-27 13:35:39 -08:00
Rohan Kumar
c2404ce552
Exclude more URL patterns from static-webmention 2021-01-20 11:35:09 -08:00
Rohan Kumar
388da5ea96
Makefile: fix CSS path 2021-01-17 20:13:38 -08:00
Rohan Kumar
beef2c1b81
Don't send webmentions to Wikipedia 2021-01-17 17:18:31 -08:00
Rohan Kumar
166e05692a
Makefile: allow setting custom Hugo flags 2021-01-12 15:28:59 -08:00
Rohan Kumar
28bd5b16f9
CI: deploy to staging before test
I can't believe I forgot to deploy before testing.
2021-01-10 22:12:04 -08:00
Rohan Kumar
4d7625227b
IndieWeb: gather WebWentions with static-webmention
Update the Makefile to download the old version of the site, run
static-webmentions, and collect the WebMentions to send in a json file
saved as a build artifact.

Don't send these automatically; just save them for now. Until I work out
a solution to save sent WebMentions and avoid sending duplicates, I'll
keep the sending of WebMentions manual.

For some reason this caused webhint's axe/aria test to error out with a
"Protocol error" so I disabled it. Axe tests are covered by Lighthouse
anyway.
2021-01-09 21:48:34 -08:00
Rohan Kumar
c7bc26ed00
Compress svg files ahead of time
Previously forgot to include .svg files in the Makefile when generating
precompressed files for "gzip_static" and "brotli_static"

This commit includes them.
2021-01-04 12:45:45 -08:00
Rohan Kumar
0c64c5867b
Use brotli_static with max brotli compression
Compress with brotli ahead of time in CI, just like we do with zopfli
for gzip_static

Update hintrc to check for brotli compression.

Update lighthouse config to throttle CPU some more since brotli
decompression can be heavier.
2020-12-30 23:51:14 -08:00
Rohan Kumar
a900b814b7
Indieweb: add PGP key to h-entry 2020-12-29 10:05:07 -08:00
Rohan Kumar
1c5826e999
CI: Decrease zopfli iterations 2020-12-29 09:47:45 -08:00
Rohan Kumar
1a89830880
Compress more when deploying to prod
Use 50 zopfli zopfli iterations when compressing for staging, but a full
1200 when compressing for prod.
2020-12-26 20:43:48 -08:00
Rohan Kumar
e989ff01c4
CI: don't install packages globally
Install bins into ~/bin instead and use local npm packages
2020-12-23 18:22:03 -08:00
Rohan Kumar
51a6d4edde
CI: test with lighthouse, webhint in staging 2020-12-23 17:04:28 -08:00
Rohan Kumar
758460f258
Add date last updated (gitinfo)
Add the date last updated to articles, if articles have been updated
since initial publication. Incldue a link to the article changelog.
2020-12-21 16:39:23 -08:00
Rohan Kumar
6223768f04
Makefile: zopfli-compress the webmanifest as well 2020-12-18 18:32:55 -08:00
rohan kumar
347b2c189b
Greatly simplify CSS, dark theme fixes
- Changed: Make all color codes 3-char. Shave off a few bytes.
- Removed: all responsive layout besides the navigation links.
  Everything else should work well at all window sizes without making
  allowances for special cases.
- Removed: redundant CSS rules
- Added: centered images. Left-aligned images in a center-aligned column
  of text break flow.
- Added: dark mode link colors for visited/active. Active link colors
  give better a11y.
- Fix: don't show unnecessary scrollbar for <pre> blocks

Also put more comments in the source to explain why each rule is
important.

All this shrunk the CSS from 1065 bytes to 882 bytes (17% reduction)
2020-12-17 21:27:11 -08:00
rohan kumar
e8f31f9f08
Adjust text width/responsiveness
- Text width was too wide on wide screens; reduce it.
- Make the nav-links' responsive layout for narrow viewports trigger at
  a narrower window size. It used to trigger at 600px, but I made it
  trigger at 32rem instead since the nav links aren't too wide. This
  also handles cases where users' default sans-serif fonts are very
  wide: rem measures by character width instead of pixels.
- Make the narrow-optimized multiline-navlinks the default, and make
  widescreens a special case detected with a CSS media query.
  Previously, widescreens were the default; however, this meant that
  browsers that didn't support media queries (like dillo and netsurf)
  couldn't switch to the multi-line navigation at narrow widths. This is
  a good example of progressive enhancement; modern browsers will get
  the same behavior as before, but the lowest common denominator will
  see a better experience.
- Don't further reduce the max-width for narrow screens; narrow screens
  are already narrow. We now have one less CSS rule.
2020-12-17 11:23:37 -08:00
rohan kumar
6ac7e6d3a8
Make: skip gzip-static, add check-links to test
- Don't compress build assets unless we're building for deployment
- Inclue link-checking in "make test"
2020-12-16 19:01:58 -08:00
rohan kumar
337e34739f
Move link-checking and browserslist out of hintrc
- Use lychee for link-checking
- Move browserslist to own file
2020-12-14 22:12:52 -08:00
rohan kumar
8edc6bedb6
CI: Fix: forgot to update rsync flags
- Add --delete flag
- replace "public/" with "$(OUT_DIR)"
2020-12-12 22:07:00 -08:00
rohan kumar
0d227c238c
Fix the makefile yet again 2020-12-12 21:16:40 -08:00
rohan kumar
e521afe26f
CI: fix: missing dep + no chown/chgrp 2020-12-12 21:13:25 -08:00
rohan kumar
40ea94c33b
CI: use Makefile to lint, build, and deploy
Switch from the deploy.sh shell script to a more configurable Makefile.
2020-12-12 21:04:01 -08:00