From c21cd02b69f3dc4369f46c628cd1b1856185d9b9 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 17 Oct 2021 09:48:00 -0400 Subject: add two new posts --- content/posts/2021-10-16-jekyll-to-hugo.md | 65 +++++++++++++++++++ content/posts/2021-10-17-imported-old-repos.md | 87 ++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 content/posts/2021-10-16-jekyll-to-hugo.md create mode 100644 content/posts/2021-10-17-imported-old-repos.md (limited to 'content') diff --git a/content/posts/2021-10-16-jekyll-to-hugo.md b/content/posts/2021-10-16-jekyll-to-hugo.md new file mode 100644 index 0000000..f3ff839 --- /dev/null +++ b/content/posts/2021-10-16-jekyll-to-hugo.md @@ -0,0 +1,65 @@ +--- +slug: jekyll-to-hugo +title: "Jekyll to Hugo" +date: "2021-10-16T07:51:29-04:00" +draft: false +--- +I took some time this weekend to do the following: + +1. Migrate this site from [Jekyll][] to [Hugo][]. +2. Create a new site theme. +3. Update the [About][] page. +4. Add a new [Articles][] section. + +The [Articles][] section will allow me to write longer articles without +polluting the main blog. + +### Hugo Migration + +Pros: + +* Significantly faster. [Jekyll][] sometimes tool 30 seconds to + regenerate this site, and [Hugo][] does it in less than a second. +* Single static binary. Much easier to install. +* Built-in [SASS/SCSS][sass] support. +* [HTML][], [CSS][], and [JavaScript][js] [minification][]. In + particular, HTML minification is content-aware so it doesn't strip + significant whitespace in `
` or `` blocks.  View the
+  source of this page to see what I mean).
+* [Go template][html-template] support.
+* [Jekyll][] importer that works reasonably well (but see below).
+
+Cons:
+
+* The default [Markdown][] parser is limited and not based on
+  [GitHub][]-flavored [Markdown][].
+* Because of the previous item, many of the literal `` elements in
+  my imported [Jekyll][] content had to be fixed by hand.
+* Occasionally baffling template search order.
+* Default RSS feed entry contents are truncated and stripped of HTML.
+
+### Theme Rewrite
+
+Changes in the new theme:
+
+* Clean rewrite based on [Bulma v0.9.3][bulma].
+* Icons from [Feather Icons][feathericons].
+* Consistent font sizes.
+* Improved layout.  In particular, I removed the sidebar and improved
+  the page header.
+
+[jekyll]: https://jekyllrb.com/ "Jekyll static site generator"
+[hugo]: https://gohugo.io/ "Hugo static site generator"
+[bulma]: https://bulma.io/ "Bulma CSS framework"
+[sass]: https://sass-lang.com/ "Syntactically Awesome Style Sheets"
+[css]: https://en.wikipedia.org/wiki/CSS "Cascading Style Sheets"
+[html]: https://en.wikipedia.org/wiki/HTML "HyperText Markup Language"
+[js]: https://en.wikipedia.org/wiki/JavaScript "JavaScript programming language"
+[minification]: https://en.wikipedia.org/wiki/Minification_(programming) "Remove all unnecessary characters from source code to reduce it's size"
+[go]: https://golang.org/ "Go programming language."
+[html-template]: https://pkg.go.dev/html/template "Go html/template"
+[feathericons]: https://github.com/feathericons/feather "beautiful open source icons"
+[about]: /about "About page"
+[articles]: /articles "Articles section"
+[markdown]: https://en.wikipedia.org/wiki/Markdown "Markdown markup language"
+[github]: https://github.com/ "GitHub"
diff --git a/content/posts/2021-10-17-imported-old-repos.md b/content/posts/2021-10-17-imported-old-repos.md
new file mode 100644
index 0000000..9b4918f
--- /dev/null
+++ b/content/posts/2021-10-17-imported-old-repos.md
@@ -0,0 +1,87 @@
+---
+slug: imported-old-repos
+title: "Imported Old Repos"
+date: "2021-10-17T07:36:37-04:00"
+draft: false
+---
+Several months ago I used [fast-export][] to convert most of my old
+repositories from [Mercurial][hg] to [Git][].  This morning I finally
+imported the converted repositories to [GitHub][] and archived them.
+
+The old repositories are as follows:
+
+* [broker-cappy](https://github.com/pablotron/broker-cappy)
+* [cuckoo2](https://github.com/pablotron/cuckoo2)
+* [devil-ruby](https://github.com/pablotron/devil-ruby)
+* [easing-js](https://github.com/pablotron/easing-js)
+* [easy-cookie](https://github.com/pablotron/easy-cookie)
+* [fam-ruby](https://github.com/pablotron/fam-ruby)
+* [forced-timeout](https://github.com/pablotron/forced-timeout)
+* [freshmeat-ruby](https://github.com/pablotron/freshmeat-ruby)
+* [honeypot-php](https://github.com/pablotron/honeypot-php)
+* [honeypot-ruby](https://github.com/pablotron/honeypot-ruby)
+* [id3-ruby](https://github.com/pablotron/id3-ruby)
+* [imlib2-ruby](https://github.com/pablotron/imlib2-ruby)
+* [joggle](https://github.com/pablotron/joggle)
+* [joystick-ruby](https://github.com/pablotron/joystick-ruby)
+* [libjiffy](https://github.com/pablotron/libjiffy)
+* [localfark](https://github.com/pablotron/localfark)
+* [maildrop-log-colorize](https://github.com/pablotron/maildrop-log-colorize)
+* [mb-ruby](https://github.com/pablotron/mb-ruby)
+* [persist-js](https://github.com/pablotron/persist-js)
+* [ptpgp](https://github.com/pablotron/ptpgp)
+* [raggle](https://github.com/pablotron/raggle)
+* [reddit-content-filter](https://github.com/pablotron/reddit-content-filter)
+* [rubilicious](https://github.com/pablotron/rubilicious)
+* [searchkeys-chrome](https://github.com/pablotron/searchkeys-chrome)
+* [sn9c102-webcam](https://github.com/pablotron/sn9c102-webcam)
+* [speedtest-kml](https://github.com/pablotron/speedtest-kml)
+* [syndic8-ruby](https://github.com/pablotron/syndic8-ruby)
+* [tarstream-php](https://github.com/pablotron/tarstream-php)
+* [techmeme-author-filter](https://github.com/pablotron/techmeme-author-filter)
+* [technorati-ruby](https://github.com/pablotron/technorati-ruby)
+* [tilefu](https://github.com/pablotron/tilefu)
+* [tunepimp-ruby](https://github.com/pablotron/tunepimp-ruby)
+* [wirble](https://github.com/pablotron/wirble)
+* [xmms-ruby](https://github.com/pablotron/xmms-ruby)
+
+Here is the repo import script:
+
+```bash
+#!/bin/bash
+
+set -eu 
+
+# space-delimited list of repos
+repos='... omitted for brevity ...'
+
+# get base repo dir
+base=$(pwd)
+
+# loop through repos
+for repo in $repos; do
+  # print repo name, switch to repo
+  echo repo: $repo
+  cd "$base/$repo"
+
+  # create repo
+  gh repo create $repo
+
+  # fix origin
+  # (gh sets the origin to "https://github.com/pablotron/...)
+  git remote rm origin
+  git remote add origin git@github.com:pablotron/$repo.git
+
+  # push upstream
+  git push -u origin master
+
+  # archive repo
+  gh repo archive $repo
+done
+```
+
+[hg]: https://www.mercurial-scm.org/ "Mercurial VCS"
+[git]: https://www.git-scm.com/ "Git VCS"
+[github]: https://github.com/ "GitHub"
+[gh]: https://cli.github.com/ "GitHub CLI"
+[fast-export]: http://repo.or.cz/w/fast-export.git "mercurial to git converter"
-- 
cgit v1.2.3