cdn/README.md

1.5 KiB

FollieHiyuki's CDN

This is a small website, acting like a centralized source for all of my web assets. Most of them are vendored fonts and small CSS files.

The website is deployed to Cloudflare Pages and is available at https://cdn.folliehiyuki.com.

FAQ

Why not <link href="url-to-original-source">?

I like being in control of my own stuff. Also, it's because my websites have a strict Content-Security-Policy header value (see _headers file for an example).

Why not using Chrome or Nginx directory listing?

I like some theming and little directory/file icons. Also, CloudFlare Pages (where I deploy this project to) isn't a VM hosting platform but a FaaS provider.

Why not using tree(1)?

$ find ./out/ -mindepth 1 -type d -print -exec sh -c 'tree "$0" \
	-a \
	-i \
	-F \
	-H "." \
	-I "index.html" \
	-T "$0" \
	-L 1 \
	-o "$0/index.html" \
	--noreport \
	--dirsfirst \
	--charset utf-8 \
	--ignore-case' {} \;

Meh?

Also, tree injects its metadata, CSS and copyright notice into the index.html file. Yes, I can yank them out with something like htmlq, but I also want to insert my own styling and stuff.

Why not using minify's library but its CLI?

Using the CLI is much easier. And, I don't want a dedicated Go module for this small project with external dependencies.

License

All the vendored files use to their original licenses. Other are licensed under MIT.