Reusable bits for all of my websites https://cdn.folliehiyuki.com
Go to file
Hoang Nguyen d631395b6e
Enable experimental flake support in CI
2024-03-16 00:00:00 +07:00
src Add more Content-Security-Policy values 2023-12-29 00:00:00 +07:00
vendor Update dependencies 2024-03-16 00:00:00 +07:00
.editorconfig Update dependencies 2023-12-23 00:00:00 +07:00
.gitattributes Init 2023-07-11 00:00:00 +07:00
.gitignore Use templ instead of Go template for HTML sources 2023-11-20 00:00:00 +07:00
.gitlab-ci.yml Enable experimental flake support in CI 2024-03-16 00:00:00 +07:00
.golangci.toml Bloat things up 2023-11-25 00:00:00 +07:00
LICENSE Use templ instead of Go template for HTML sources 2023-11-20 00:00:00 +07:00
README.md Update dependencies 2024-01-28 00:00:00 +07:00
flake.lock Update dependencies 2024-03-16 00:00:00 +07:00
flake.nix Update dependencies 2024-03-16 00:00:00 +07:00
go.mod Update dependencies 2024-03-16 00:00:00 +07:00
go.sum Update dependencies 2024-03-16 00:00:00 +07:00
main.go Separate minify task 2023-11-26 00:00:00 +07:00
pages.templ Update dependencies 2024-01-28 00:00:00 +07:00
update-src.sh Update dependencies 2023-12-23 00:00:00 +07:00

README.md

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).

NOTE: to generate the integrity checksum, run: openssl dgst -sha256 -binary <file_path> | openssl base64 -A

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.

Nicer way to have directory listing?

Yes, there are many better alternatives that exist like serve.

License

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