From 56d50e4e6bdc4ddc9729a04909c02bc8fea93cb1 Mon Sep 17 00:00:00 2001 From: Max Kapur <48514405+maxkapur@users.noreply.github.com> Date: Sun, 20 Oct 2024 14:03:53 -0400 Subject: [PATCH 1/2] Fix sass warnings about deprecated color and math functions (#3) Replace deprecated Sass color functions like `lighten()` with `color.adjust()` equivalents. This doesn't suppress all the warnings because some of them come from the vendored minima files. --- _sass/minima.scss | 5 +++-- _sass/minima/_base.scss | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/_sass/minima.scss b/_sass/minima.scss index e182b5f..772ef0f 100644 --- a/_sass/minima.scss +++ b/_sass/minima.scss @@ -1,3 +1,4 @@ +@use "sass:color"; @charset "utf-8"; @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap'); @@ -38,12 +39,12 @@ $spacing-unit: 30px; $text-color: #111; $background-color: #ffffeb; -$highlight-color: lighten($background-color, 2%); +$highlight-color: color.adjust($background-color, $lightness: 2%); $brand-color: #008000; $grey-color: #778899; $green-color-light: #b7ccb7; -$grey-color-dark: darken($grey-color, 25%); +$grey-color-dark: color.adjust($grey-color, $lightness: -25%); $table-text-align: left; diff --git a/_sass/minima/_base.scss b/_sass/minima/_base.scss index 621d89c..1074928 100644 --- a/_sass/minima/_base.scss +++ b/_sass/minima/_base.scss @@ -1,3 +1,4 @@ +@use "sass:color"; @use 'sass:math'; /** @@ -168,7 +169,7 @@ a { @include subtle-underline; &:visited { - color: desaturate($brand-color, 50%); + color: color.adjust($brand-color, $saturation: -50%); } &:hover { @@ -340,7 +341,7 @@ table { } th { - background-color: lighten($green-color-light, 10%); + background-color: color.adjust($green-color-light, $lightness: 10%); font-weight: $base-font-strong-weight; border-bottom-width: 2px; } From ec18275654ad97eeb246fd89078d856e1a16072f Mon Sep 17 00:00:00 2001 From: Max Kapur <48514405+maxkapur@users.noreply.github.com> Date: Sun, 20 Oct 2024 14:29:33 -0400 Subject: [PATCH 2/2] Workstation configuration script (#4) Add a workstation configuration script that pulls in all the Ruby dependencies needed to build the site locally. For now, this is Ubuntu-specific, and the purpose is just to ease my local workflow. Eventually, the goal is to replace the current stack of third-party GitHub actions with a self-contained Bash script for greater portability. But there's more work to be done since the version of `rbenv` that comes with Ubuntu <= 24.04 (the newest version available as a GitHub action runner) doesn't support Ruby 3.2.2. https://github.com/maxkapur/maxkapur.github.io/pull/1 --- README.md | 39 ++++++++++++++++++++++++++------------- configure.sh | 18 ++++++++++++++++++ 2 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 configure.sh diff --git a/README.md b/README.md index 374c584..05cfef5 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,26 @@ -# Illusion Slopes - -This repository holds my personal blog, Illusion Slopes, which can be viewed at -[maxkapur.com](https://maxkapur.com). - -It also used to host several one-off essays, but these have have now been moved -to separate repos, namely -[cyborgs-and-ciphers](https://github.com/maxkapur/cyborgs-and-ciphers), -[esl-data](https://github.com/maxkapur/esl-data), and -[how-do-we](https://github.com/maxkapur/how-do-we). - -My blog is on a CC BY-SA 4.0 license. Comments and suggestions are welcome via -[email](mailto:max@maxkapur.com) or GitHub pull request. +# Illusion Slopes + +This repository holds my personal blog, Illusion Slopes, which can be viewed at +[maxkapur.com](https://maxkapur.com). + +It also used to host several one-off essays, but these have have now been moved +to separate repos, namely +[cyborgs-and-ciphers](https://github.com/maxkapur/cyborgs-and-ciphers), +[esl-data](https://github.com/maxkapur/esl-data), and +[how-do-we](https://github.com/maxkapur/how-do-we). + +My blog is on a CC BY-SA 4.0 license. Comments and suggestions are welcome via +[email](mailto:max@maxkapur.com) or GitHub pull request. + +## Workstation setup + +On Ubuntu, `source configure.sh` installs all dependencies and sets up `rbenv` +for local site development. You can then preview the site with the following +command: + +```bash +bundle exec jekyll serve +``` + +(If you restart the shell, you’ll need to `source configure.sh` again, or add +`eval "$(rbenv init -)"` to `.bashrc`.) diff --git a/configure.sh b/configure.sh new file mode 100644 index 0000000..aa510e6 --- /dev/null +++ b/configure.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env sh + +# Configure a workstation to build/develop the static site. Tested on latest +# Ubuntu release. + +set -x +if command -v git > /dev/null +then + sudo apt update -y + sudo apt upgrade -y + sudo apt install -y rbenv ruby-build +else + warn "OS is not Debian-based; skipped installing rbenv and ruby-build" +fi +eval "$(rbenv init -)" +rbenv install --skip-existing +bundle install +# bundle exec jekyll serve