<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Make calendar start week on Monday</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href="../style.css" type="text/css" /> <link rel="stylesheet" href="../local.css" type="text/css" /> </head> <body> <div class="page"> <div class="pageheader"> <div class="header"> <span> <span class="parentlinks"> <a href="../index.html">ikiwiki</a>/ <a href="../tips.html">tips</a>/ </span> <span class="title"> Make calendar start week on Monday </span> </span> </div> </div> <div id="pagebody"> <div id="content" role="main"> <p>To accomplish this on a blog setup, I ran:</p> <pre><code>mkdir ${SRCDIR}/templates cp /usr/share/ikiwiki/templates/calendar* ${SRCDIR}/templates/ sed -i 's/^\(\[\[!calendar\)/\1 week_start_day="1"/' ${SRCDIR}/templates/calendar* ${SRCDIR}/sidebar.mdwn </code></pre> <p>where <code>${SRCDIR}</code> was the source directory for the blog. This overrides the standard templates with ones that have the <code>week_start_day="1"</code> option added. If the upstream templates change, one has to manually update the locally overriding ones.</p> <p>I personally managed to forget about having to change also the initially auto-generated <code>sidebar.mdwn</code> page, which led to some brain activity for me.</p> </div> </div> <div id="footer" class="pagefooter" role="contentinfo"> <div id="pageinfo"> <div class="pagedate"> Last edited <span class="date">Tue Feb 26 23:01:54 2019</span> <!-- Created <span class="date">Thu Jul 14 21:27:42 2011</span> --> </div> </div> <!-- from ikiwiki --> </div> </div> </body> </html>