From 3912fc56dde63ce51371d1c7d2b9e9df5a80ca98 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Tue, 21 Mar 2023 00:43:15 -0400 Subject: [PATCH] Use forge.mikegerwitz.com (Forgejo) instance for /projects This removes the cgit configuration and added redirects. I'll check the 404 log and determine if I should add others in the future, if it's worth the effort. --- .gitignore | 2 - Makefile | 11 +-- conf/lighttpd.conf | 19 ++--- src/cgit/README | 4 - src/cgit/cgitrc | 189 --------------------------------------------- src/cgit/footer.sh | 27 ------- src/cgit/head.html | 2 - src/cgit/header.sh | 27 ------- src/header.tpl.htm | 2 +- style.css | 69 ----------------- 10 files changed, 9 insertions(+), 343 deletions(-) delete mode 100644 src/cgit/README delete mode 100644 src/cgit/cgitrc delete mode 100755 src/cgit/footer.sh delete mode 100644 src/cgit/head.html delete mode 100755 src/cgit/header.sh diff --git a/.gitignore b/.gitignore index acc28df..59dc5cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ *.html !/src/about/resume.html -!src/cgit/head.html *.meta *.mk /post/list @@ -8,7 +7,6 @@ rss.xml /inline.css /www-root -/cgit-root /papers/*.pdf /papers/*.dvi diff --git a/Makefile b/Makefile index 4b1795f..8941c08 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,6 @@ phtml := $(postsrc:.md=.html) pmk := $(pmeta:.meta=.mk) www-root = www-root -cgit-root = cgit-root # articles in TeX texticles = $(wildcard papers/*/) @@ -65,7 +64,7 @@ RSS_N=10 export WWW_URL -.PHONY: default clean webroot cgitroot +.PHONY: default clean webroot default: webroot @@ -144,11 +143,5 @@ papers/%.pdf: papers/%/abstract.tex docs/papers/.list: thoughts articles echo "$(articles) $(texticles)" | tr ' ' '\n' | tools/doclist >$@ - -cgitroot: $(cgit-root)/head.html $(cgit-root)/header.html $(cgit-root)/footer.html \ - $(cgit-root)/cgitrc -$(cgit-root)/%: src/cgit/% - install -Dma+r $< $@ - clean: - rm -rf $(www-root) $(pmeta) $(phtml) $(pmk) $(cgit-root) + rm -rf $(www-root) $(pmeta) $(phtml) $(pmk) diff --git a/conf/lighttpd.conf b/conf/lighttpd.conf index c66e7da..4b71af3 100644 --- a/conf/lighttpd.conf +++ b/conf/lighttpd.conf @@ -3,8 +3,6 @@ # This file has accumulated a lot of cruft over the years, a lot of which is # probably no longer necessary. Most of the redirections handle transitions # form older version of the site. -# -# This site uses cgit at /projects, but is otherwise a static website. ## $HTTP["scheme"] == "https" { @@ -30,31 +28,26 @@ $HTTP["scheme"] == "https" { "^/docs/(.*).html" => "/papers/$1", "^/talks/sapsf/?$" => "/talks/sapsf.pdf", "^/talks/ethics-void/?$" => "/talks/ethics-void.pdf", - "^/projects/$" => "/projects", + # cgit => forgejo + "^/projects/?$" => "//forge.mikegerwitz.com/", + "^/projects/(easejs(/.*)?)$" => "//forge.mikegerwitz.com/GNU/$1", + "^/projects/((tame|liza|liza-proguic|lvspec)(/.*)?)$" => "//forge.mikegerwitz.com/employer/$1", + "^/projects/(.+)$" => "//forge.mikegerwitz.com/mikegerwitz/$1", ) url.rewrite-once = ( "^/\.well-known/.*" => "$0", "^/[0-9]{4}/[0-9]{2}/.*[A-Z].*$" => "/redirect-map.php?path=$0", "^/projects/static/.*" => "$0", - "^/projects$" => "/cgit.cgi", - "^/projects/([^?/]+(/[^?]*)?)?(?:\?(.*))?$" => "/cgit.cgi?url=$1&$3", "^/rss/?" => "/rss.xml", "^/.+\.[a-zA-Z]+$" => "$0", "^/docs/.*?$" => "$0", "^/hoxsl/.*?$" => "$0", "^/talks/sapsf/?$" => "$0", "^/talks/ethics-void/?$" => "$0", + "^/projects/?.*$" => "$0", "^/(.+?)/?$" => "/$1.html", ) - - alias.url = ( - "/cgit.cgi" => "/usr/lib/cgit/cgit.cgi", - "/projects/static/" => "/usr/share/cgit/", - ) - cgi.assign = ( - "/usr/lib/cgit/cgit.cgi" => "", - ) } } diff --git a/src/cgit/README b/src/cgit/README deleted file mode 100644 index c0a8dec..0000000 --- a/src/cgit/README +++ /dev/null @@ -1,4 +0,0 @@ -cgit Configuration -================== -These files are used by cgit at /projects. - diff --git a/src/cgit/cgitrc b/src/cgit/cgitrc deleted file mode 100644 index 5c53334..0000000 --- a/src/cgit/cgitrc +++ /dev/null @@ -1,189 +0,0 @@ -# -# cgit config -# see cgitrc(5) for details - -root-title=Projects -root-desc=Free Software projects, configurations, and playthings -#root-readme=/var/gitrepos/README.html - -logo-link=https://mikegerwitz.com/ -virtual-root=/projects/ - -enable-http-clone=1 -clone-url=https://mikegerwitz.com/projects/$CGIT_REPO_URL -snapshots=tar.gz tar.bz2 zip - -enable-index-owner=0 -enable-index-links=1 -enable-commit-graph=1 -enable-log-filecount=1 -enable-log-linecount=1 - -repository-sort=name -branch-sort=age -max-stats=quarter - -head-include=/var/gitrepos/head.html -header=/var/gitrepos/header.html -footer=/var/gitrepos/footer.html -css=/projects/static/cgit.css -logo= - -source-filter=/usr/lib/cgit/filters/syntax-highlighting.py -about-filter=/usr/lib/cgit/filters/about-formatting.sh - -readme=:README.md -readme=:README - -section-sort=0 - -section=libs / frameworks - -repo.url=easejs -repo.name=GNU ease.js -repo.path=/var/gitrepos/easejs.git -repo.desc=Classical object-oriented framework for JavaScript -#repo.logo=/images/heckert-gnu.png - -repo.url=liza -repo.path=/var/gitrepos/liza.git -repo.desc=Data collection, validation, and processing framework for JavaScript [employer project] - -repo.url=hoxsl -repo.path=/var/gitrepos/hoxsl.git -repo.desc=Higher-order logic for XSLT 2.0 - -repo.url=shspec -repo.path=/var/gitrepos/shspec.git -repo.desc=BDD framework for shell - - -section=languages / compilers - -repo.url=tame -repo.name=TAME -repo.path=/var/gitrepos/tame.git -repo.desc=The Algebraic Metalanguage [employer project] - -repo.url=liza-proguic -repo.path=/var/gitrepos/liza-proguic.git -repo.desc=Declarative DSL for Liza programs [employer project] - -repo.url=literate-xsl -repo.path=/var/gitrepos/literate-xsl.git -repo.desc=Literate documentation weaver for XSLT 2.0 - -repo.url=ulambda -repo.path=/var/gitrepos/ulambda.git -repo.desc=[STALLED] Self-hosting Scheme compiling to JavaScript (very incomplete proof-of-concept) - - -section=misc - -repo.url=night -repo.path=/var/gitrepos/night.git -repo.desc=Nighttime hacks: playful creativity as a form of relaxation - -repo.url=git-shortmaps -repo.path=/var/gitrepos/git-shortmaps.git -repo.desc=Simple one--three-character bash aliases for Git with tab completion - -repo.url=dotfiles -repo.path=/var/gitrepos/dotfiles.git -repo.desc=Personal system configuration and miscellaneous scripts - -repo.url=promscripts -repo.path=/var/gitrepos/promscripts.git -repo.desc=Scripts for generating Prometheus metrics - - -section=talks - -repo.url=afsi -repo.name=afsi -repo.path=/var/gitrepos/afsi.git -repo.desc=Adopting Free Software Ideals (LibrePlanet 2021) - -repo.url=sapsf -repo.name=SAPSF -repo.path=/var/gitrepos/sapsf.git -repo.desc=The Surreptitious Assault on Privacy, Security, and Freedom (LibrePlanet 2017) - -repo.url=cs4m -repo.name=cs4m -repo.path=/var/gitrepos/cs4m.git -repo.desc=Computational Symbiosis: Methods That Meld Mind and Machine (LibrePlanet 2019) - -repo.url=ethics-void -repo.name=The Ethics Void -repo.path=/var/gitrepos/ethics-void.git -repo.desc=The Ethics Void (LibrePlanet 2018) - -repo.url=online-freedom -repo.name=Restore Online Freedom! -repo.path=/var/gitrepos/online-freedom.git -repo.desc=Restore Online Freedom! (LibrePlanet 2016) - - -section=papers - -repo.url=coope -repo.name=COOPE -repo.path=/var/gitrepos/coope.git -repo.desc=Classical Object-Oriented Programming with ECMAScript (2012) - -repo.url=cptt -repo.name=cptt -repo.path=/var/gitrepos/cptt.git -repo.desc=Discussion on Compilers: Principles, Techniques, and Tools (2013) - - -section=websites - -repo.url=repo2html -repo.path=/var/gitrepos/repo2html.git -repo.desc=Repository-agnostic HTML generator (used to generate mikegerwitz.com) - -repo.url=thoughts -repo.path=/var/gitrepos/thoughts.git -repo.desc=Thoughts and Ramblings (mikegerwitz.com) - - - -section=on-hold - -repo.url=guile-mime -repo.path=/var/gitrepos/guile-mime.git -repo.desc=MIME library and globs2 parser for Guile - -repo.url=lasertank-js -repo.path=/var/gitrepos/lasertank-js.git -repo.desc=Clone of the classic 1990s game LaserTank - -repo.url=pkgsh -repo.path=/var/gitrepos/pkgsh.git -repo.desc=Library to aid in the factoring of large programs written in shell - - -section=archive - -repo.url=epmanners -repo.path=/var/gitrepos/epmanners.git -repo.desc=Teach LaTeX some manners to respect \everypar - -repo.url=gsgp -repo.path=/var/gitrepos/gsgp.git -repo.desc=GNU Screen Gaming Platform - -repo.url=jstonic -repo.path=/var/gitrepos/jstonic.git -repo.desc=Miscellaneous library built upon GNU ease.js - -repo.url=rectest -repo.path=/var/gitrepos/rectest.git -repo.desc=Browser-based recollection test - -repo.url=lvspec -repo.path=/var/gitrepos/lvspec.git -repo.desc=LaTeX specification library for LoVullo Associates with a focus on Liza/TAME [employer project] - diff --git a/src/cgit/footer.sh b/src/cgit/footer.sh deleted file mode 100755 index c1e6d75..0000000 --- a/src/cgit/footer.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# Extracts relevant portion of footer for cgit -# -# Copyright (C) 2019 Mike Gerwitz -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -## - -set -euo pipefail - -main() -{ - awk 'NR==1,/<\/footer>/{ print }' < src/footer.tpl.htm -} - -main "$@" diff --git a/src/cgit/head.html b/src/cgit/head.html deleted file mode 100644 index 557e103..0000000 --- a/src/cgit/head.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/cgit/header.sh b/src/cgit/header.sh deleted file mode 100755 index 62eb30c..0000000 --- a/src/cgit/header.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# Extracts relevant portion of header for cgit -# -# Copyright (C) 2019 Mike Gerwitz -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -## - -set -euo pipefail - -main() -{ - awk '/
/,/
/{ print }' < <( src/mkheader projects ) -} - -main "$@" diff --git a/src/header.tpl.htm b/src/header.tpl.htm index 6e48ccb..85aa023 100644 --- a/src/header.tpl.htm +++ b/src/header.tpl.htm @@ -22,7 +22,7 @@
  • About
  • Posts
  • Talks
  • -
  • Projects
  • +
  • Projects
  • Papers
  • Social
  • diff --git a/style.css b/style.css index c68addc..fcbda88 100644 --- a/style.css +++ b/style.css @@ -786,75 +786,6 @@ footer .site-nav > nav > ul > li a { } } - -/** - * cgit customization - **/ -div#cgit { - font-family: 'Open Sans', sans-serif; -} -div#cgit div.content { - padding: 2em 0em; /* remove left/right margin */ -} - -/* repo name and desc, above tabs */ -div#cgit table#header td.main { - font-size: 1.7rem; /* h1 font size (see above) */ -} -div#cgit table#header td.sub { - border-top: 0px; -} - -div#cgit #header { - margin: inherit; /* undo previous conflicting style */ -} - -/* reduce tab page separator height */ -div#cgit table.tabs { - border-bottom-width: 1px; -} -div#cgit table.tabs td a { - padding: 0.25ex 0.75em 0ex; -} -div#cgit table.tabs td a.active { - background-color: inherit; - border-bottom: 3px solid #ccc; -} - -div#cgit div.content { - border-bottom: inherit; /* we have our own footer */ -} - -/* we have limited width, so wrap and compensate */ -div#cgit table.list.nowrap td { - white-space: inherit; - text-align: left; -} -div#cgit table.list.nowrap td.sublevel-repo, -div#cgit table.list.nowrap td .age-months { - white-space: nowrap; -} -div#cgit table.list.nowrap tr { - vertical-align: top; -} - -div#cgit table.list tr:not(.nohover) td { - padding-top: 0.5ex; - padding-bottom: 0.5ex; -} - -/* getting creative...separate sections */ -div#cgit table.list tr:not(.nohover) + tr.nohover td { - padding-top: 1ex; -} - -/* reduce headings relative to surrounding page */ -div#cgit h1 { font-size: 1.4em; } -div#cgit h2 { font-size: 1.2em; } -div#cgit h3 { font-size: 1.1em; } -div#cgit h4 { font-size: 1.0em; } - - /*** https://github.com/jgm/highlighting-kate/blob/master/css/hk-tango.css ***/ /* GNU GPLv2 */ /* Loosely based on pygment's tango colors */