Skip to content

Commit

Permalink
finalize text and add update dates
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCogley committed Nov 22, 2024
1 parent 679a322 commit a39faf0
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ I have spent my career in IT in Japan, doing a wide range of activities, such as
| Item | Value |
| --- | --- |
| Total Files | 5 |
| Repo Size in MB | 4473 |
| Repo Size in MB | 4666 |


12 changes: 12 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import favicon from "lume/plugins/favicon.ts";
import metas from "lume/plugins/metas.ts";
import postcss from "lume/plugins/postcss.ts";
import transformImages from "lume/plugins/transform_images.ts";
import prism from "lume/plugins/prism.ts";
import { getGitDate } from "lume/core/utils/date.ts";

/** Configure the site */
export default function () {
Expand All @@ -17,14 +19,25 @@ export default function () {
.mergeKey("extra_head", "stringArray")
.use(transformImages())
.use(simpleIcons())
.use(prism())

site.data("textColor", (hex: string) => {
const color = new Color(`#${hex}`);
const onWhite = Math.abs(color.contrastWCAG21("white"));
const onBlack = Math.abs(color.contrastWCAG21("black"));
return (onWhite + 0.5) > onBlack ? "white" : "black";
});


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

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

site.copy([".jpg", ".webp", ".png"]);
};
}
4 changes: 3 additions & 1 deletion src/_includes/layouts/base.vto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<meta name="theme-color" content="hsl(220, 20%, 10%)" media="(prefers-color-scheme: dark)">

<link rel="stylesheet" href="/styles.css">
{{# <link rel="stylesheet" href="/css/code_theme.css"> #}}
<link rel="icon" type="image/png" sizes="32x32" href="/favicon.png">
<link rel="canonical" href="{{ url |> url(true) }}">

Expand All @@ -36,7 +37,7 @@

<img class="header-avatar" src="{{ header.avatar }}" alt="Avatar" transform-images="webp avif 200@2">
<h1 class="header-title">{{ header.title }}</h1>
{{ header.description |> md }}
{{ header.description |> md |> toUpperCase() }}
</header>
<article>
{{ content }}
Expand Down Expand Up @@ -79,6 +80,7 @@
{{ if footer }}
<footer>
{{ footer |> md }}
<p class="header-description"><small>Updated {{ date }}</small></p>
</footer>
{{ /if }}
</body>
Expand Down
5 changes: 3 additions & 2 deletions src/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: layouts/base.vto
url: /
date: Git Last Modified
header:
title: Rick Cogley
description: Make a dynamic Github profile with Lume SSG!
Expand Down Expand Up @@ -117,9 +118,9 @@ on:
- cron: "6 21 * * *"
```

## How to use?
## How to get yours?

Go to the repo, "use this template" then tweak it how you like.
Go to my [profile repo](https://github.com/rickcogley/rickcogley), and click "use this template" to make your own copy. If you don't have a profile repo already, save the repo as your username. Then tweak it how you like including updating the RSS feeds. Or, setup Deno and Lume, and copy in the files manually.

## Is it good?

Expand Down
4 changes: 3 additions & 1 deletion src/repo-readme.vto
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
url: /repo-readme.md
date: Git Last Modified
---
[![PGP Public Key](https://img.shields.io/badge/PGP-Public_Key-orange?style=flat-square&logo=monkey%20tie)](https://cogley.jp/pgp) [![Proven.lol Lightweight Proof](https://img.shields.io/badge/Proven.lol-Lightweight_Proof-green?style=flat-square&logo=cachet)](https://proven.lol/6265e6)
**Today is:** {{ todaysDateENUS }}{{ set today = todaysDateYYYYMMDD }}{{ if holidays[today] }} ({{ holidays[today] }}){{ /if }}
**Today is:** {{ todaysDateENUS }}{{ set today = todaysDateYYYYMMDD }}{{ if holidays[today] }} ({{ holidays[today] }}){{ /if }}
**Last Updated:** {{ date }}

### Hi there 👋

Expand Down

0 comments on commit a39faf0

Please sign in to comment.