Skip to content

Commit

Permalink
set timezone, add info to footer
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCogley committed Nov 24, 2024
1 parent 490f2c8 commit b9d9ad1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TZ='Asia/Tokyo'
13 changes: 13 additions & 0 deletions _config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import lume from "lume/mod.ts";
import { getCurrentVersion } from "lume/core/utils/lume_version.ts";
import googleFonts from "lume/plugins/google_fonts.ts";
import attributes from "lume/plugins/attributes.ts";
import base_path from "lume/plugins/base_path.ts";
import date from "lume/plugins/date.ts";
import { enUS } from "npm:date-fns/locale/en-US";
import { ja } from "npm:date-fns/locale/ja";
import { getGitDate } from "lume/core/utils/date.ts";
// import favicon from "lume/plugins/favicon.ts";
import feed from "lume/plugins/feed.ts";
import filter_pages from "lume/plugins/filter_pages.ts";
Expand Down Expand Up @@ -98,6 +100,7 @@ site.use(shuffle());
// return array;
// });

site.data("lumeVersion", getCurrentVersion());
site.copy("assets");
// site.copy("static/portfolio", "portfolio");
site.copy([".gif",".pdf",".docx",".pptx",".xlsx",".zip",".svg"]);
Expand All @@ -106,6 +109,16 @@ site.copyRemainingFiles();
site.ignore("*.DS_Store");
site.ignore("archive");

site.preprocess([".html"], (pages) => {
for (const page of pages) {
const src = page.src.entry?.src;

if (src) {
page.data.lastmod = getGitDate("modified", src);
}
}
});

// Create zip and tree scripts
site.script(
"zipsite",
Expand Down
5 changes: 4 additions & 1 deletion src/_includes/templates/footer.vto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<!-- Icons from Phosphor -->
<footer style="background-image:url(/assets/footer_bg1sm.gif);" class="tc-l bg-center cover bg-black">
<div class="w-100 ph3 pv5 bg-black-70">
<span class="white-70"><small>©{{ "now" |> date("y") }} {{ site.author }}</small></span><br>
<span class="white-70"><small>©{{ "now" |> date("y") }} {{ site.author }}<br>
Updated {{ date |> date("HUMAN_DATETIME")}}<br>
Lume {{ lumeVersion }}, Deno {{ Deno.version.deno }}, Typescript {{ Deno.version.typescript }}, V8 {{ Deno.version.v8 }}<br></small>
</span>
{{ for item of footer.links }}
<a
rel="me"
Expand Down

0 comments on commit b9d9ad1

Please sign in to comment.