blog/site-update: more words
This commit is contained in:
parent
471588c0e0
commit
5b89af9c20
|
@ -109,6 +109,78 @@ program into the templates. Here I use that to take a list of users from the
|
||||||
incredibly hacky Patreon API client I wrote for this website and iterate over
|
incredibly hacky Patreon API client I wrote for this website and iterate over
|
||||||
it, making a list of every patron by name.
|
it, making a list of every patron by name.
|
||||||
|
|
||||||
|
## Build Process
|
||||||
|
|
||||||
|
As a nice side effect of this rewrite, my website is now completely built using
|
||||||
|
[Nix](https://nixos.org/). This allows the website to be built reproducibly, as
|
||||||
|
well as a full development environment setup for free for anyone that checks out
|
||||||
|
the repo and runs `nix-shell`. Check out
|
||||||
|
[naersk](https://github.com/nmattia/naersk) for the secret sauce that enables my
|
||||||
|
docker image build. See [this blogpost](/blog/drone-kubernetes-cd-2020-07-10)
|
||||||
|
for more information about this build process (though my site uses GitHub
|
||||||
|
Actions instead of Drone).
|
||||||
|
|
||||||
|
## `jsonfeed` Go package
|
||||||
|
|
||||||
|
I used to have a [JSONFeed](https://www.jsonfeed.org/) package publicly visible
|
||||||
|
at the go import path `christine.website/jsonfeed`. As far as I know I'm the
|
||||||
|
only person who ended up using it; but in case there are any private repos that
|
||||||
|
I don't know about depending on it, I have made the jsonfeed package available
|
||||||
|
at its old location as well as its source code
|
||||||
|
[here](https://tulpa.dev/Xe/jsonfeed). You may have to update your `go.mod` file
|
||||||
|
to import `christine.website/jsonfeed` instead of `christine.website`. If
|
||||||
|
something ends up going wrong as a result of this, please [file a GitHub issue
|
||||||
|
here](https://github.com/Xe/site/issues/new) and I can attempt to assist
|
||||||
|
further.
|
||||||
|
|
||||||
|
## `go_vanity` crate
|
||||||
|
|
||||||
|
I have written a small go vanity import crate and exposed it in my Git repo. If
|
||||||
|
you want to use it, add it to your `Cargo.toml` like this:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
go_vanity = { git = "https://github.com/Xe/site", branch = "master" }
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then use it from any warp application by calling `go_vanity::github` or
|
||||||
|
`go_vanity::gitea` like this:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
let go_vanity_jsonfeed = warp::path("jsonfeed")
|
||||||
|
.and(warp::any().map(move || "christine.website/jsonfeed"))
|
||||||
|
.and(warp::any().map(move || "https://tulpa.dev/Xe/jsonfeed"))
|
||||||
|
.and_then(go_vanity::gitea);
|
||||||
|
```
|
||||||
|
|
||||||
|
I plan to add full documentation to this crate soon as well as release it
|
||||||
|
properly on crates.io.
|
||||||
|
|
||||||
|
## `patreon` crate
|
||||||
|
|
||||||
|
I have also written a small [Patreon](https://www.patreon.com/) API client and
|
||||||
|
made it available in my Git repo. If you want to use it, add it to your
|
||||||
|
`Cargo.toml` like this:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
patreon = { git = "https://github.com/Xe/site", branch = "master" }
|
||||||
|
```
|
||||||
|
|
||||||
|
This client is _incredibly limited_ and only supports the minimum parts of the
|
||||||
|
Patreon API that are required for my website to function. Patreon has also
|
||||||
|
apparently started to phase out support for its API anyways, so I don't know how
|
||||||
|
long this will be useful.
|
||||||
|
|
||||||
|
But this is there should you need it!
|
||||||
|
|
||||||
|
## Dhall Kubernetes Manifest
|
||||||
|
|
||||||
|
I also took the time to port the kubernetes manifest to
|
||||||
|
[Dhall](https://dhall-lang.org/). This allows me to have a type-safe kubernetes
|
||||||
|
manifest that will correctly have all of the secrets injected for me from the
|
||||||
|
environment of the deploy script.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
These are the biggest giants that my website now sits on. The code for this
|
These are the biggest giants that my website now sits on. The code for this
|
||||||
|
|
Loading…
Reference in New Issue