about summary refs log tree commit diff stats
path: root/update_html
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-12-01 14:13:33 -0800
committerKartik Agaram <vc@akkartik.com>2018-12-01 14:13:33 -0800
commite4ac3c9e6e5464a0fc0f8fd3763a572e0e180c04 (patch)
tree7f6ca26afcdf8e3bf54459c6592ebf26fb968133 /update_html
parent54e5128a14dcea5b93a8a9402558f0736fb7dba3 (diff)
downloadmu-e4ac3c9e6e5464a0fc0f8fd3763a572e0e180c04.tar.gz
4814
Diffstat (limited to 'update_html')
-rwxr-xr-xupdate_html5
1 files changed, 5 insertions, 0 deletions
diff --git a/update_html b/update_html
index 62cece9c..85475325 100755
--- a/update_html
+++ b/update_html
@@ -13,11 +13,16 @@ process() {
   mv html/$1.html.out html/$1.html
 }
 
+URL_BASE='https://github.com/akkartik/mu/blob/master'
+
 convert_html() {
   vim -c "set number" -c TOhtml -c write -c qall $1
 
   sed -i 's,<title>.*/mu/,<title>Mu - ,' $1.html
   sed -i 's,\.html</title>,</title>,' $1.html
+
+  sed -i "/^<body/a <a href='$URL_BASE/$1'>$URL_BASE/$1</a>" $1.html
+
   sed -i 's/^\* { \(.*\) }/* { font-size:12pt; \1 }/g' $1.html
   sed -i 's/^body { \(.*\) }/body { font-size:12pt; \1 }/g' $1.html
   # turn most code grey