From aadc8f4fce5008a55a7ebb6d4992dc5633431ce5 Mon Sep 17 00:00:00 2001 From: Andre Jiroh Halili Date: Thu, 24 Nov 2022 11:03:06 +0800 Subject: signalboost: add entry for ~ajhalili2006 (#567) * signalboost: add entry for ~ajhalili2006 Also in this commit: * Add linkedin and cover_letter (per https://github.com/Xe/site/pull/550#discussion_r1019824691) anmong other things, including adding fediverse and website fields * Update the signalboost.rs HTML template to reflect these changes to Person.dhall types * Fix compilation In the future it would be nice if you ran the test suite. You can get to a development environment with `nix develop` or by installing direnv and running `direnv allow`. Alternatively you can do a full build with `nix build`. Updating the dhall type isn't enough to make the rust code automagically be updated too. You need to also update the corresponding rust type. Dhall prefers camelCase identifiers for items. The formatting for dhall was wrong. Running `dhall format $FILE` will make dhall format the file correctly for you. Signed-off-by: Xe --- dhall/signalboost.dhall | 8 ++++++++ dhall/types/Person.dhall | 14 +++++++++++++- src/signalboost.rs | 7 +++++-- templates/signalboost.rs.html | 12 ++++++++++++ 4 files changed, 38 insertions(+), 3 deletions(-) diff --git a/dhall/signalboost.dhall b/dhall/signalboost.dhall index e47080d..b24c5aa 100644 --- a/dhall/signalboost.dhall +++ b/dhall/signalboost.dhall @@ -249,4 +249,12 @@ in [ Person::{ , gitLink = Some "https://github.com/henri" , twitter = Some "https://twitter.com/henri_shustak" } + , Person::{ + , name = "Andrei Jiroh Halili" + , tags = [ "backend", "bash", "nodejs", "deno", "alpinelinux", "linux" ] + , gitLink = Some "https://github.com/ajhalili2006" + , twitter = Some "https://twitter.com/Kuys_Potpot" + , fediverse = Some "https://tilde.zone/@ajhalili2006" + , website = Some "https://ajhalili2006.bio.link" + } ] diff --git a/dhall/types/Person.dhall b/dhall/types/Person.dhall index b1628eb..cee28f1 100644 --- a/dhall/types/Person.dhall +++ b/dhall/types/Person.dhall @@ -3,7 +3,19 @@ , tags : List Text , gitLink : Optional Text , twitter : Optional Text + , linkedin : Optional Text + , fediverse : Optional Text + , coverLetter : Optional Text + , website : Optional Text } , default = - { name = "", tags = [] : List Text, gitLink = None Text, twitter = None Text } + { name = "" + , tags = [] : List Text + , gitLink = None Text + , twitter = None Text + , linkedin = None Text + , fediverse = None Text + , coverLetter = None Text + , website = None Text + } } diff --git a/src/signalboost.rs b/src/signalboost.rs index 3d1b534..6adfc8f 100644 --- a/src/signalboost.rs +++ b/src/signalboost.rs @@ -4,11 +4,14 @@ use serde::Deserialize; pub struct Person { pub name: String, pub tags: Vec, - #[serde(rename = "gitLink")] pub git_link: Option, - pub twitter: Option, + pub linkedin: Option, + pub fediverse: Option, + #[serde(rename = "coverLetter")] + pub cover_letter: Option, + pub website: Option, } #[cfg(test)] diff --git a/templates/signalboost.rs.html b/templates/signalboost.rs.html index 91fa6a3..982cd9d 100644 --- a/templates/signalboost.rs.html +++ b/templates/signalboost.rs.html @@ -27,6 +27,18 @@ @if person.twitter.is_some() { Twitter } + @if person.linkedin.is_some() { + LinkedIn + } + @if person.fediverse.is_some() { + Fediverse + } + @if person.cover_letter.is_some() { + Cover letter + } + @if person.website.is_some() { + Website + } } -- cgit v1.2.3