ref: 29a3475d3bb07f610c27e06e03244263a78602c9
parent: b490278c9123db9f9edfc3dd2b324eba39a0794c
author: Alex Musolino <[email protected]>
date: Wed Aug 23 23:51:56 EDT 2023
mkpages.rc: show year/month for "up"
--- a/mkpages.rc
+++ b/mkpages.rc
@@ -1,5 +1,8 @@
#!/bin/rc
+month=`{basename `{pwd}}
+year=`{basename `{dirname `{pwd}}}
+
fn mkpage{
echo '<!DOCTYPE html>
<html>
@@ -23,7 +26,7 @@
echo '<a href="'^$3^'.html">prev</a>'
if not
echo '<span class="disabled">prev</span>'
-echo ' | <a href="index.html">index</a> | '
+echo ' | <a href="../../'^$year^/^$month^'/index.html">'^$year^/^$month^'</a> | '
if(! ~ $4 '')
echo '<a href="'^$4^'.html">next</a>'
if not