File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,32 @@ const watched = (reposDoc.repos ?? []).map((r) =>
2626) ;
2727site . data ( "watched" , watched ) ;
2828
29+ // Next scheduled daily run (cron "0 6 * * *"): the upcoming 06:00 UTC, computed
30+ // at build time and shown in the footer.
31+ const MONTHS = [
32+ "Jan" ,
33+ "Feb" ,
34+ "Mar" ,
35+ "Apr" ,
36+ "May" ,
37+ "Jun" ,
38+ "Jul" ,
39+ "Aug" ,
40+ "Sep" ,
41+ "Oct" ,
42+ "Nov" ,
43+ "Dec" ,
44+ ] ;
45+ const buildNow = new Date ( ) ;
46+ const nextRun = new Date ( `${ buildNow . toISOString ( ) . slice ( 0 , 10 ) } T06:00:00Z` ) ;
47+ if ( nextRun . getTime ( ) <= buildNow . getTime ( ) ) {
48+ nextRun . setUTCDate ( nextRun . getUTCDate ( ) + 1 ) ;
49+ }
50+ site . data (
51+ "nextUpdate" ,
52+ `${ MONTHS [ nextRun . getUTCMonth ( ) ] } ${ nextRun . getUTCDate ( ) } , 06:00 UTC` ,
53+ ) ;
54+
2955// Tailwind entry stylesheet (compiled by the tailwindcss plugin).
3056site . add ( "/styles.css" ) ;
3157
@@ -91,7 +117,9 @@ site.process([".html"], (pages) => {
91117 . map ( ( h , i ) => {
92118 const open = i === 0 ? "(" : "" ;
93119 const close = i === hashes . length - 1 ? ")" : "" ;
94- return `<span class="commit-ref">${ open } ${ render ( h ) } ${ close } </span>` ;
120+ return `<span class="commit-ref">${ open } ${
121+ render ( h )
122+ } ${ close } </span>`;
95123 } )
96124 . join ( ", " ) ;
97125 } ,
Original file line number Diff line number Diff line change 3636 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-3.5 w-3.5" aria-hidden="true"><path d="M4 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path><path d="M4 4a16 16 0 0 1 16 16"></path><path d="M4 11a9 9 0 0 1 9 9"></path></svg>
3737 RSS on every repo page
3838 </span>
39+ <span aria-hidden="true">·</span>
40+ <span>Next update {{ nextUpdate }}</span>
3941 </div>
4042 </footer>
4143</body>
Original file line number Diff line number Diff line change @@ -195,16 +195,5 @@ export default function (data: Lume.Data): string {
195195 <p class="m-0 text-lg leading-snug text-ink-soft">A daily, LLM-written digest of selected git repositories. <a class="font-semibold text-accent no-underline hover:underline" href="/about">How it works →</a></p>
196196 </div>` ;
197197
198- // Next scheduled daily run: the upcoming 06:00 UTC relative to build time.
199- const now = new Date ( ) ;
200- const nextRun = new Date ( `${ ymd ( now ) } T06:00:00Z` ) ;
201- if ( nextRun . getTime ( ) <= now . getTime ( ) ) {
202- nextRun . setUTCDate ( nextRun . getUTCDate ( ) + 1 ) ;
203- }
204- const nextNote =
205- `<p class="mb-8 m-0 text-right text-xs text-ink-soft">Next update scheduled for ${
206- human ( nextRun )
207- } , 06:00 UTC.</p>`;
208-
209- return `${ intro } ${ nextNote } <div>${ cards . join ( "\n" ) } </div>${ script } ` ;
198+ return `${ intro } <div>${ cards . join ( "\n" ) } </div>${ script } ` ;
210199}
You can’t perform that action at this time.
0 commit comments