Skip to content

Commit 2a06114

Browse files
authored
Merge pull request #1 from rix1/maintenance/lume-tailwind-refresh
maintenance/lume tailwind refresh
2 parents bc836fd + 8908c88 commit 2a06114

42 files changed

Lines changed: 3876 additions & 380 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# rix1.dev · my personal website
22

3-
Welcome to the source repository of my personal website, [rix1.dev](https://rix1.dev)! I'm a product developer and engineering manager based in Oslo, Norway. My website showcases previous and ongoing projects as well as my professional journey.
3+
Welcome to the source repository of my personal website,
4+
[rix1.dev](https://rix1.dev)! I'm a product developer and engineering manager
5+
based in Oslo, Norway. My website showcases previous and ongoing projects as
6+
well as my professional journey.
47

58
## About the Site
69

7-
Built with Lume — a static site generator for Deno, the site reflects my interest in products, technology, and design.
10+
Built with Lume — a static site generator for Deno, the site reflects my
11+
interest in products, technology, and design.
812

913
### Features
1014

@@ -17,15 +21,17 @@ Built with Lume — a static site generator for Deno, the site reflects my inter
1721

1822
- [Lume](https://lume.land) - A static site generator built with Deno.
1923
- [Deno](https://deno.land) - A secure runtime for JavaScript and TypeScript.
20-
- [Deno Deploy](https://deno.com/deploy) - A hassle-free platform for serverless JavaScript applications
24+
- [Deno Deploy](https://deno.com/deploy) - A hassle-free platform for serverless
25+
JavaScript applications
2126

2227
## Local Development
2328

2429
To get a local copy up and running, follow these simple steps.
2530

2631
### Prerequisites
2732

28-
Ensure you have [Deno](https://deno.land/#installation) installed on your machine. To install Deno, run:
33+
Ensure you have [Deno](https://deno.land/#installation) installed on your
34+
machine. To install Deno, run:
2935

3036
```bash
3137
curl -fsSL https://deno.land/install.sh | sh
@@ -43,11 +49,41 @@ curl -fsSL https://deno.land/install.sh | sh
4349
deno task dev
4450
```
4551

46-
The site should now be running on `http://localhost:3000`. Open your browser to this address to view the site.
52+
The site should now be running on `http://localhost:3000`. Open your browser to
53+
this address to view the site.
54+
55+
## Writing Posts
56+
57+
Posts live in `posts/*.md`. To publish a new one, add a Markdown file with this
58+
front matter:
59+
60+
```yaml
61+
---
62+
title: My post title
63+
description: A short summary used for the overview, RSS, and social previews.
64+
date: 2026-05-18
65+
topic: Build
66+
---
67+
```
68+
69+
The shared defaults in `posts/_data.yml` add the post layout, author data, and
70+
the `post` tag automatically. For interactive posts, prefer a small browser
71+
script or web component in `assets/` and opt into it from the post:
72+
73+
```yaml
74+
scripts:
75+
- /assets/my-post-widget.js
76+
```
77+
78+
Drafts live in `drafts/*.md` with `draft: true`. Lume renders drafts while
79+
serving locally, but `deno task build` ignores the whole `drafts/` folder so
80+
they do not deploy.
4781

4882
## Contributing
4983

50-
I would be surprised if anyone would like to contribute to this site, but if you find any typos feel or want to change my opinion about something, feel free to open a PR:
84+
I would be surprised if anyone would like to contribute to this site, but if you
85+
find any typos feel or want to change my opinion about something, feel free to
86+
open a PR:
5187

5288
1. Fork the Project
5389
2. Create your Feature Branch (`git checkout -b fix/your-opinion`)
@@ -62,5 +98,6 @@ Distributed under the MIT License. See `LICENSE` for more information.
6298
## Contact
6399

64100
- @rix1 - [Twitter](https://twitter.com/rix1)
65-
- Project Link: [https://github.com/rix1/rix1.dev](https://github.com/rix1/rix1.dev)
101+
- Project Link:
102+
[https://github.com/rix1/rix1.dev](https://github.com/rix1/rix1.dev)
66103
- Website: [rix1.dev](https://rix1.dev)

_components/MetaTags.tsx

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,14 @@ const MetaTags = () => {
22
return (
33
<>
44
<meta name="viewport" content="width=device-width, initial-scale=1" />
5-
6-
<meta
7-
property="og:title"
8-
content="rix1.dev: Product developer from Norway 🇳🇴"
9-
/>
10-
<meta
11-
property="og:description"
12-
content="Dev, design, product and hooman. Currently having fun chasing the sun together with @OtovoSolar"
13-
/>
145
<meta property="og:image:height" content="600" />
156
<meta property="og:image:width" content="1200" />
167
<meta
178
property="og:image:alt"
189
content="On the internet, I'm usually referred to as @rix1. I'm a product developer at Otovo, living in Oslo, Norway."
1910
/>
20-
<meta
21-
property="og:image"
22-
content="https://s3.eu-north-1.amazonaws.com/rix1.dev/social-image.png"
23-
/>
24-
<meta
25-
name="twitter:title"
26-
content="rix1.dev: Product developer from Norway"
27-
/>
28-
<meta
29-
name="twitter:description"
30-
content="Dev, design, product and hooman. Currently having fun chasing the sun together with @OtovoSolar"
31-
/>
32-
<meta
33-
name="twitter:image:src"
34-
content="https://s3.eu-north-1.amazonaws.com/rix1.dev/social-image.png"
35-
/>
36-
37-
<meta name="twitter:card" content="summary_large_image" />
38-
<meta name="twitter:site" content="@rix1" />
3911
<link rel="stylesheet" href="/globals.css" />
12+
<script type="module" src="/assets/command-palette.js"></script>
4013
</>
4114
);
4215
};

_components/ShareIcons.tsx

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
1-
const ShareIcons = ({ withBlob = false }) => {
1+
type ShareIconsProps = {
2+
withBlob?: boolean;
3+
showDivider?: boolean;
4+
class?: string;
5+
};
6+
7+
const ShareIcons = ({
8+
withBlob = false,
9+
showDivider = true,
10+
class: className = "",
11+
}: ShareIconsProps) => {
12+
const rootClass =
13+
showDivider || withBlob
14+
? "mb-[1.2em] relative flex flex-col"
15+
: "relative flex flex-col";
16+
217
return (
3-
<div class="mb-[1.2em] relative flex flex-col">
4-
<hr class="w-1/2 mx-auto mt-0 mb-7 not-prose border-primary/10" />
18+
<div class={[rootClass, className].join(" ")}>
19+
{showDivider && (
20+
<hr class="w-1/2 mx-auto mt-0 mb-7 not-prose border-primary/10" />
21+
)}
522
<div
623
className="mx-auto inline-flex items-center share-icons"
724
style={{
@@ -28,6 +45,26 @@ const ShareIcons = ({ withBlob = false }) => {
2845
</svg>
2946
<small>Twitter</small>
3047
</a>
48+
<a
49+
href="https://bsky.app/profile/rix1.bsky.social"
50+
target="_blank"
51+
class="p-3 flex flex-col items-center"
52+
rel="noreferrer"
53+
>
54+
<svg
55+
stroke-linecap="round"
56+
stroke-linejoin="round"
57+
stroke-width="1.2"
58+
shape-rendering="geometricPrecision"
59+
viewBox="0 0 24 24"
60+
height="32"
61+
width="32"
62+
stroke="#000"
63+
>
64+
<path d="M12 11.5c-1.6-3.3-4.4-6-6.8-6-1.6 0-2.2 1.1-2.2 2.5 0 2.5 2.9 5.1 6 6.4-2.9.3-5.2 1.7-5.2 3.7 0 1.2 1 2.2 2.5 2.2 2.1 0 4.4-2.1 5.7-4.8 1.3 2.7 3.6 4.8 5.7 4.8 1.5 0 2.5-1 2.5-2.2 0-2-2.3-3.4-5.2-3.7 3.1-1.3 6-3.9 6-6.4 0-1.4-.6-2.5-2.2-2.5-2.4 0-5.2 2.7-6.8 6Z"></path>
65+
</svg>
66+
<small>Bluesky</small>
67+
</a>
3168
<a
3269
href="https://github.com/rix1"
3370
target="_blank"

_components/SiteFooter.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export default ({ comp }: Lume.Data) => {
2+
return (
3+
<footer class="not-prose mx-auto mt-20 max-w-5xl px-4 pb-12 pt-8 sm:px-6 lg:px-8">
4+
<div class="border-t border-primary/10 pt-8">
5+
<div class="flex items-start gap-4">
6+
<p class="m-0 max-w-2xl text-sm leading-6 text-gray-600">
7+
This is Rix1's personal site for notes on products, technology,
8+
design, building things, and life.
9+
</p>
10+
<comp.ShareIcons showDivider={false} class="w-full self-center" />
11+
</div>
12+
</div>
13+
</footer>
14+
);
15+
};

_components/SiteNav.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
type Props = {
2+
backHref?: string;
3+
backLabel?: string;
4+
};
5+
6+
const SiteNav = ({ backHref = "/", backLabel = "Back home" }: Props) => {
7+
return (
8+
<nav class="not-prose mb-12 flex items-center justify-between gap-4">
9+
<a href="/" class="clear group inline-flex items-center gap-3">
10+
<span class="mini-avatar" aria-hidden="true"></span>
11+
<span>
12+
<span class="block bricolage-grotesque-heavy text-lg leading-none text-gray-950 group-hover:text-primary">
13+
rix1
14+
</span>
15+
<span class="block text-xs font-semibold text-gray-500">
16+
Product, code, notes
17+
</span>
18+
</span>
19+
</a>
20+
<a
21+
href={backHref}
22+
class="clear rounded-full border border-primary/10 bg-white/70 px-3 py-1.5 text-sm font-semibold text-primary shadow-sm hover:bg-white"
23+
>
24+
{backLabel}
25+
</a>
26+
</nav>
27+
);
28+
};
29+
30+
export default SiteNav;

_config.ts

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,22 @@ import favicon from "lume/plugins/favicon.ts";
55
import feed from "lume/plugins/feed.ts";
66
import reading_info from "lume/plugins/reading_info.ts";
77
import sitemap from "lume/plugins/sitemap.ts";
8+
import pagefind from "lume/plugins/pagefind.ts";
89
import tailwindcss from "lume/plugins/tailwindcss.ts";
910
import jsx from "lume/plugins/jsx.ts";
1011
import googleFonts from "lume/plugins/google_fonts.ts";
12+
import metas from "lume/plugins/metas.ts";
13+
import footnote from "npm:markdown-it-footnote@4.0.0";
1114

12-
const site = lume();
15+
const site = lume({
16+
location: new URL("https://rix1.dev"),
17+
});
18+
19+
site.hooks.addMarkdownItPlugin(footnote);
20+
21+
if (Deno.env.get("LUME_DRAFTS") !== "true") {
22+
site.ignore("/drafts");
23+
}
1324

1425
// Add assets
1526
site.add("assets");
@@ -29,8 +40,37 @@ site.use(
2940
}),
3041
);
3142
site.use(tailwindcss());
32-
site.use(feed());
43+
site.use(metas());
44+
site.use(
45+
feed({
46+
output: ["/posts.rss"],
47+
query: "type=post",
48+
sort: "date=desc",
49+
info: {
50+
title: "rix1.dev: Thoughts & experiments",
51+
description:
52+
"Notes on products, technology, design, building things, and life.",
53+
},
54+
items: {
55+
title: "=title",
56+
description: "=description",
57+
published: "=date",
58+
content: "=description",
59+
},
60+
}),
61+
);
3362
site.use(sitemap());
63+
site.use(
64+
pagefind({
65+
ui: {
66+
containerId: "search",
67+
showImages: false,
68+
excerptLength: 18,
69+
showSubResults: false,
70+
resetStyles: false,
71+
},
72+
}),
73+
);
3474

3575
// Add CSS files explicitly for processing
3676
site.add([".css"]);

_data/metas.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
site: rix1.dev
2+
title: "=title || rix1.dev"
3+
description: "=description || Dev, design, product and hooman. Currently having fun chasing the sun together with @OtovoSolar"
4+
image: https://s3.eu-north-1.amazonaws.com/rix1.dev/social-image.png
5+
lang: en
6+
twitter: "@rix1"
7+
generator: true

_includes/layouts/center-content.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default ({ comp, title, alignment, children }: Lume.Data) => {
1919
<comp.ShareIcons withBlob />
2020
</main>
2121

22+
<comp.SiteFooter />
2223
<div id="blur"></div>
2324
</body>
2425
</html>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
type Project = {
2+
title: string;
3+
when: string;
4+
description: string;
5+
link: string;
6+
};
7+
8+
type Post = {
9+
title: string;
10+
description?: string;
11+
topic?: string;
12+
date?: Date | string;
13+
url: string;
14+
};
15+
16+
const dateFormatter = new Intl.DateTimeFormat("en", {
17+
month: "short",
18+
day: "2-digit",
19+
year: "numeric",
20+
});
21+
22+
function stripMarkdownLinks(value: string) {
23+
return value.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1");
24+
}
25+
26+
function formatDate(date: Date | string | undefined) {
27+
return date ? dateFormatter.format(new Date(date)) : undefined;
28+
}
29+
30+
export default ({ search, index }: Lume.Data) => {
31+
const posts = (search.pages("type=post", "date=desc") as Post[]).map((
32+
post,
33+
) => ({
34+
category: "Posts",
35+
title: post.title,
36+
description: post.description,
37+
url: post.url,
38+
meta: [post.topic, formatDate(post.date)].filter(Boolean).join(" · "),
39+
}));
40+
41+
const projects = [...(index.repos as Project[])].sort((a, b) =>
42+
Number(b.when) - Number(a.when)
43+
).map((project) => ({
44+
category: "Projects",
45+
title: project.title,
46+
description: stripMarkdownLinks(project.description),
47+
url: project.link,
48+
meta: project.when,
49+
}));
50+
51+
return JSON.stringify({ posts, projects });
52+
};

_includes/layouts/landing.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export default ({ comp, title, heading, children, index }: Lume.Data) => {
8484
))}
8585
</div>
8686
</section>
87+
<comp.SiteFooter />
8788
<div id="blur"></div>
8889
</body>
8990
</html>

0 commit comments

Comments
 (0)