From 1ce8a8d95c369c80a4f344da2a77c479c6ba3bb6 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 16 Oct 2023 13:36:04 +1100 Subject: [PATCH 1/5] Simplified approach to curl|zsh safety --- local/bin/dots | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/local/bin/dots b/local/bin/dots index 27364b5..44aa561 100755 --- a/local/bin/dots +++ b/local/bin/dots @@ -1,6 +1,7 @@ #!/usr/bin/env zsh # WHAT IS THIS +{ # Wrap the entire program in a braced block so it won't run at all if you do curl | zsh and the connection drops. global_ignore=( '\.git.*' 'README\.md' @@ -10,7 +11,7 @@ global_ignore=( '\..*\.swp' ) -'bootstrap'() { +bootstrap() { echo 'Bootstrapping your dotfiles...' >&2 mkdir -p $DOTFILES touch $DOTFILES/.stow @@ -24,14 +25,14 @@ global_ignore=( link } -'clone'() { +clone() { echo "Requested packages: $argv" >&2 for package in $argv; do clone-one $package || return $? done } -'clone-one'() { +clone-one() { local url=$1 local package=${${url##*/}%.git} # Simple package names are fetched from the configured source prefix. @@ -46,7 +47,7 @@ global_ignore=( git clone $url $DOTFILES/$package } -'link'() { +link() { local -a packages packages=($argv) if (( $#packages == 0 )); then @@ -65,7 +66,7 @@ global_ignore=( $STOW -d $DOTFILES -t ~ --ignore=${^global_ignore} $packages } -'process-stow-no-folding'() { +process-stow-no-folding() { zmodload zsh/mapfile for file in ${(f)mapfile[$1]}; do file=~/$file @@ -75,7 +76,7 @@ global_ignore=( done } -'fetch'() { +fetch() { local -a packages packages=($argv) (( $#packages == 0 )) && packages=( $DOTFILES/*(N:t) ) @@ -85,7 +86,7 @@ global_ignore=( done } -'pull'() { +pull() { local -a packages packages=($argv) (( $#packages == 0 )) && packages=( $DOTFILES/*(N:t) ) @@ -96,7 +97,7 @@ global_ignore=( } -'status'() { +status() { local -a packages packages=($argv) (( $#packages == 0 )) && packages=( $DOTFILES/*(N:t) ) @@ -137,7 +138,7 @@ global_ignore=( done } -'main'() { +main() { : ${DOTFILES:=~/dotfiles} ${STOW:=stow} ${DOTS_SOURCE_PREFIX:=https://git.00dani.me/dot} comm=$1 @@ -159,4 +160,5 @@ global_ignore=( esac } -{'main' "$@"} +main "$@" +} # Wrap the entire program in a braced block so it won't run at all if you do curl | zsh and the connection drops. From a88e12d383392dd8ffe1098929c8239c63522707 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 16 Oct 2023 13:48:14 +1100 Subject: [PATCH 2/5] Specify Ruby version to use (3.2.2) --- site/.ruby-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 site/.ruby-version diff --git a/site/.ruby-version b/site/.ruby-version new file mode 100644 index 0000000..be94e6f --- /dev/null +++ b/site/.ruby-version @@ -0,0 +1 @@ +3.2.2 From 9d04a7d780683e864bff6cefb06c0a9343342732 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 16 Oct 2023 14:05:40 +1100 Subject: [PATCH 3/5] Upgrade to Jekyll 4.3.2 and Minima 3 --- site/Gemfile | 4 +-- site/Gemfile.lock | 87 ++++++++++++++++++++++++++--------------------- site/_config.yml | 19 ++++++++--- 3 files changed, 64 insertions(+), 46 deletions(-) diff --git a/site/Gemfile b/site/Gemfile index d610b4f..a4d4e37 100644 --- a/site/Gemfile +++ b/site/Gemfile @@ -11,10 +11,10 @@ gem "webrick" # # This will help ensure the proper Jekyll version is running. # Happy Jekylling! -gem "jekyll", "4.2.0" +gem "jekyll", "4.3.2" # This is the default theme for new Jekyll sites. You may change this to anything you like. -gem "minima" +gem "minima", github: "jekyll/minima" # Syntax highlighter! gem "rouge" diff --git a/site/Gemfile.lock b/site/Gemfile.lock index 15602a9..3316939 100644 --- a/site/Gemfile.lock +++ b/site/Gemfile.lock @@ -1,82 +1,91 @@ +GIT + remote: https://github.com/jekyll/minima.git + revision: 85374864e0311f544f49139078927b41ecbe8792 + specs: + minima (3.0.0.dev) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + GEM remote: https://rubygems.org/ specs: - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) colorator (1.1.0) - concurrent-ruby (1.1.9) - em-websocket (0.5.2) + concurrent-ruby (1.2.2) + em-websocket (0.5.3) eventmachine (>= 0.12.9) - http_parser.rb (~> 0.6.0) + http_parser.rb (~> 0) eventmachine (1.2.7) - ffi (1.15.3) + ffi (1.16.3) forwardable-extended (2.6.0) - http_parser.rb (0.6.0) - i18n (1.8.10) + google-protobuf (3.24.4) + http_parser.rb (0.8.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) - jekyll (4.2.0) + jekyll (4.3.2) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) i18n (~> 1.0) - jekyll-sass-converter (~> 2.0) + jekyll-sass-converter (>= 2.0, < 4.0) jekyll-watch (~> 2.0) - kramdown (~> 2.3) + kramdown (~> 2.3, >= 2.3.1) kramdown-parser-gfm (~> 1.0) liquid (~> 4.0) - mercenary (~> 0.4.0) + mercenary (>= 0.3.6, < 0.5) pathutil (~> 0.9) - rouge (~> 3.0) + rouge (>= 3.0, < 5.0) safe_yaml (~> 1.0) - terminal-table (~> 2.0) - jekyll-feed (0.15.1) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) - jekyll-sass-converter (2.1.0) - sassc (> 2.0.1, < 3.0) - jekyll-seo-tag (2.7.1) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) + jekyll-seo-tag (2.8.0) jekyll (>= 3.8, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - kramdown (2.3.1) + kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - liquid (4.0.3) - listen (3.5.1) + liquid (4.0.4) + listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) - minima (2.5.1) - jekyll (>= 3.5, < 5.0) - jekyll-feed (~> 0.9) - jekyll-seo-tag (~> 2.1) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (4.0.6) - rb-fsevent (0.11.0) + public_suffix (5.0.3) + rake (13.0.6) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - rexml (3.2.5) - rouge (3.26.0) + rexml (3.2.6) + rouge (4.1.3) safe_yaml (1.0.5) - sassc (2.4.0) - ffi (~> 1.9) - terminal-table (2.0.0) - unicode-display_width (~> 1.1, >= 1.1.1) - unicode-display_width (1.7.0) - webrick (1.7.0) + sass-embedded (1.69.3) + google-protobuf (~> 3.23) + rake (>= 13.0.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + unicode-display_width (2.5.0) + webrick (1.8.1) PLATFORMS ruby DEPENDENCIES - jekyll (= 4.2.0) - minima + jekyll (= 4.3.2) + minima! rouge webrick RUBY VERSION - ruby 3.0.1p64 + ruby 3.2.2p53 BUNDLED WITH - 2.2.15 + 2.4.10 diff --git a/site/_config.yml b/site/_config.yml index 50d9ffe..f554e98 100644 --- a/site/_config.yml +++ b/site/_config.yml @@ -1,12 +1,21 @@ +--- title: dot/dots -email: dani@00dani.me +author: + name: Danielle McLean + email: dani@00dani.me description: "Bootstrap and simple management script for my dotfiles" -github_username: 00dani -mastodon: - - username: 00dani - instance: elekk.club url: 'https://dots.00dani.me' # Build settings theme: minima +minima: + skin: auto + social_links: + - platform: github + user_url: 'https://github.com/00dani' + title: 'GitHub' + - platform: mastodon + user_url: 'https://elekk.xyz/@00dani' + title: '@00dani@elekk.xyz' + highlighter: rouge From 6ac1c1d7ead623f34335ee82f4eb90840c6f4251 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 16 Oct 2023 14:06:12 +1100 Subject: [PATCH 4/5] Remove unused Subscribe button from footer --- site/_includes/footer.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 site/_includes/footer.html diff --git a/site/_includes/footer.html b/site/_includes/footer.html new file mode 100644 index 0000000..f4a8002 --- /dev/null +++ b/site/_includes/footer.html @@ -0,0 +1,30 @@ +
+ + +
+ + + + + +
+ +
From dc3d59b4a467bddd8b8d8781384032f06b529fd4 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 16 Oct 2023 14:06:26 +1100 Subject: [PATCH 5/5] Use Minima's theming on the curlable script too --- site/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/index.html b/site/index.html index f7e6ae7..9d07e1b 100644 --- a/site/index.html +++ b/site/index.html @@ -1,4 +1,4 @@ --- --- {% include_relative local/bin/dots %} -# +#