mirror of
https://github.com/RGBCube/Site
synced 2025-08-01 13:37:49 +00:00
More code
This commit is contained in:
parent
f694638186
commit
d060f7d9f9
18 changed files with 3185 additions and 48 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -14,4 +14,6 @@
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
|
||||||
!*.json
|
!*.json
|
||||||
|
!*.lock
|
||||||
!*.ts
|
!*.ts
|
||||||
|
!*.tsx
|
||||||
|
|
12
_config.ts
12
_config.ts
|
@ -2,22 +2,20 @@ import lume from "lume/mod.ts";
|
||||||
|
|
||||||
import codeHighlight from "lume/plugins/code_highlight.ts";
|
import codeHighlight from "lume/plugins/code_highlight.ts";
|
||||||
import feed from "lume/plugins/feed.ts";
|
import feed from "lume/plugins/feed.ts";
|
||||||
import inline from "lume/plugins/inline.ts";
|
import jsx from "lume/plugins/jsx.ts";
|
||||||
import minifyHTML from "lume/plugins/minify_html.ts";
|
import minifyHTML from "lume/plugins/minify_html.ts";
|
||||||
import resolveUrls from "lume/plugins/resolve_urls.ts";
|
|
||||||
|
|
||||||
const site = lume({
|
const site = lume({
|
||||||
|
prettyUrls: false,
|
||||||
src: "./site",
|
src: "./site",
|
||||||
location: new URL("https://rgbcu.be/"),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
site.use(codeHighlight());
|
site.use(codeHighlight());
|
||||||
site.use(inline());
|
site.use(jsx());
|
||||||
site.use(resolveUrls());
|
|
||||||
site.use(minifyHTML());
|
site.use(minifyHTML());
|
||||||
|
|
||||||
site.use(feed({
|
site.use(feed({
|
||||||
output: ["/blog/feed.rss"],
|
output: ["/blog.rss"],
|
||||||
|
|
||||||
query: "type=article",
|
query: "type=article",
|
||||||
sort: "date=desc",
|
sort: "date=desc",
|
||||||
|
@ -25,7 +23,7 @@ site.use(feed({
|
||||||
info: {
|
info: {
|
||||||
title: "RGBCube's Blog",
|
title: "RGBCube's Blog",
|
||||||
description:
|
description:
|
||||||
"The webpage where RGBCube dumps his schizophrenic ramblings about software and all the likes.",
|
"The blog where RGBCube dumps his schizophrenic ramblings about software and all the likes.",
|
||||||
lang: "en",
|
lang: "en",
|
||||||
generator: false,
|
generator: false,
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"jsxImportSource": "npm:react"
|
"jsxImportSource": "npm:react",
|
||||||
|
"types": [
|
||||||
|
"lume/types.ts",
|
||||||
|
"https://unpkg.com/@types/react@18.2.37/index.d.ts"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"lume": "echo \"import 'lume/cli.ts'\" | deno run --unstable -A -",
|
"lume": "echo \"import 'lume/cli.ts'\" | deno run --unstable -A -",
|
||||||
|
@ -9,6 +13,7 @@
|
||||||
"serve": "deno task lume --serve"
|
"serve": "deno task lume --serve"
|
||||||
},
|
},
|
||||||
"imports": {
|
"imports": {
|
||||||
|
"std/": "https://deno.land/std@0.212.0/",
|
||||||
"lume/": "https://deno.land/x/lume@v2.0.3/"
|
"lume/": "https://deno.land/x/lume@v2.0.3/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
31
site/404.tsx
Normal file
31
site/404.tsx
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
import Cube from "./_includes/cube.tsx";
|
||||||
|
|
||||||
|
export const layout = "base.vto";
|
||||||
|
export const title = "404";
|
||||||
|
|
||||||
|
export default (_data: Lume.Data, helpers: Lume.Helpers) => {
|
||||||
|
const face = (
|
||||||
|
<>
|
||||||
|
<div className="frame">
|
||||||
|
<a href={helpers.url("/", true)}>
|
||||||
|
404
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div className="square black"></div>
|
||||||
|
<div className="square magenta"></div>
|
||||||
|
<div className="square magenta"></div>
|
||||||
|
<div className="square black"></div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Cube
|
||||||
|
front={face}
|
||||||
|
back={face}
|
||||||
|
left={face}
|
||||||
|
right={face}
|
||||||
|
top={face}
|
||||||
|
bottom={face}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
|
@ -4,12 +4,12 @@ type: article
|
||||||
---
|
---
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<a class="nav-home" href="/">HOME</a>
|
<a href="/">HOME</a>
|
||||||
<a class="nav-about" href="/about">ABOUT</a>
|
<a href="/about">ABOUT</a>
|
||||||
<a class="nav-blog" href="/blog">BLOG</a>
|
<a href="/blog">BLOG</a>
|
||||||
<a class="nav-contact" href="/contact">CONTACT</a>
|
<a href="/contact">CONTACT</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="content">{{ content }}</div>
|
<div class="content">{{ content }}</div>
|
||||||
|
|
||||||
<footer>Copyright © {{ new Date().getFullYear() }} RGBCube</footer>
|
<footer>Copyright © RGBCube</footer>
|
||||||
|
|
|
@ -2,13 +2,10 @@
|
||||||
description: null
|
description: null
|
||||||
color: null
|
color: null
|
||||||
type: null
|
type: null
|
||||||
tags: null
|
|
||||||
thumbnail: null
|
thumbnail: null
|
||||||
|
|
||||||
# Required:
|
# Required:
|
||||||
# title
|
# title
|
||||||
---
|
---
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
|
@ -31,15 +28,15 @@ thumbnail: null
|
||||||
<meta property="og:type" content="{{ type ?? 'website' }}"> <!-- Can be either "website" or "article" -->
|
<meta property="og:type" content="{{ type ?? 'website' }}"> <!-- Can be either "website" or "article" -->
|
||||||
<meta property="og:locale" content="en">
|
<meta property="og:locale" content="en">
|
||||||
|
|
||||||
<link rel="canonical" href="{{ url }}">
|
<link rel="canonical" href="{{ url |> url(true) }}">
|
||||||
<meta property="og:url" content="{{ url }}">
|
<meta property="og:url" content="{{ url |> url(true) }}">
|
||||||
<meta name="twitter:url" content="{{ url }}">
|
<meta name="twitter:url" content="{{ url |> url(true) }}">
|
||||||
|
|
||||||
<meta name="author" content="RGBCube">
|
<meta name="author" content="RGBCube">
|
||||||
<meta property="og:article:author" content="RGBCube">
|
<meta property="og:article:author" content="RGBCube">
|
||||||
<meta name="twitter:creator" content="RGBCubed">
|
<meta name="twitter:creator" content="RGBCubed">
|
||||||
|
|
||||||
{{ if tags }}
|
{{ if tags.length !== 0 }}
|
||||||
<meta name="keywords" content="{{ tags.join(', ') }}">
|
<meta name="keywords" content="{{ tags.join(', ') }}">
|
||||||
<meta property="og:article:tag" content="{{ tags.join(', ') }}">
|
<meta property="og:article:tag" content="{{ tags.join(', ') }}">
|
||||||
{{ /if }}
|
{{ /if }}
|
||||||
|
|
27
site/_includes/cube.tsx
Normal file
27
site/_includes/cube.tsx
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import React, { ReactNode as Node } from "npm:react";
|
||||||
|
|
||||||
|
const empty: Node = <></>;
|
||||||
|
|
||||||
|
interface CubeProps {
|
||||||
|
front?: Node;
|
||||||
|
back?: Node;
|
||||||
|
left?: Node;
|
||||||
|
right?: Node;
|
||||||
|
top?: Node;
|
||||||
|
bottom?: Node;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Cube = (props: CubeProps) => (
|
||||||
|
<div className="scene">
|
||||||
|
<div className="cube">
|
||||||
|
<div className="face front">{props.front || empty}</div>
|
||||||
|
<div className="face back">{props.back || empty}</div>
|
||||||
|
<div className="face left">{props.left || empty}</div>
|
||||||
|
<div className="face right">{props.right || empty}</div>
|
||||||
|
<div className="face top">{props.top || empty}</div>
|
||||||
|
<div className="face bottom">{props.bottom || empty}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default Cube;
|
|
@ -1,19 +0,0 @@
|
||||||
---
|
|
||||||
layout: base.vto
|
|
||||||
title: RGBCube
|
|
||||||
|
|
||||||
# Required:
|
|
||||||
# faces
|
|
||||||
---
|
|
||||||
|
|
||||||
{{ set sides = ["front", "top", "back", "bottom", "right", "left"] }}
|
|
||||||
|
|
||||||
<div class="scene">
|
|
||||||
<div class="cube">
|
|
||||||
{{ for (let i = 0; i < sides.length; i++) }}
|
|
||||||
<div class={{ "face " + sides[i] }}>
|
|
||||||
{{ faces[i] }}
|
|
||||||
</div>
|
|
||||||
{{ /for }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
15
site/_includes/post.vto
Normal file
15
site/_includes/post.vto
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
layout: article.vto
|
||||||
|
---
|
||||||
|
|
||||||
|
{{ content }}
|
||||||
|
|
||||||
|
{{ if tags.length !== 0 }}
|
||||||
|
<p>Tags: {{ tags.join(", ") }}</p>
|
||||||
|
{{ /if }}
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Also, if you are a dinosaur that enjoys good technology, check out my
|
||||||
|
<a href="/blog.rss">RSS Feed</a>
|
||||||
|
.
|
||||||
|
</p>
|
10
site/_includes/posts.vto
Normal file
10
site/_includes/posts.vto
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<ul>
|
||||||
|
{{ for post of search.pages("layout=base.vto", "date")}}
|
||||||
|
<li>
|
||||||
|
<p>
|
||||||
|
<a href="{{ post.url }}">{{ post.date.toISOString().slice(0, 10) }}</a>:
|
||||||
|
{{ post.title }}
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
{{ /for }}
|
||||||
|
</ul>
|
|
@ -1,10 +1,31 @@
|
||||||
---
|
---
|
||||||
title: About
|
|
||||||
layout: article.vto
|
layout: article.vto
|
||||||
date: 2024-01-24
|
|
||||||
|
title: About
|
||||||
---
|
---
|
||||||
|
|
||||||
# Test 123
|
## Hi.
|
||||||
|
|
||||||
Testing deez
|
I'm yet another high schooler that is interested in programming.
|
||||||
thats it.
|
I'm from Türkiye 🇹🇷.
|
||||||
|
|
||||||
|
I primarily use [Rust](https://rust-lang.org) and
|
||||||
|
also know quite a bit of Python, Java, Kotlin, Go,
|
||||||
|
JavaScript (No frameworks, though!), [**Nix**](https://nixos.org/)
|
||||||
|
and [Nushell](https://nushell.sh/).
|
||||||
|
|
||||||
|
I've created this site using [Lume](https://lume.land/). It is served
|
||||||
|
with Nginx on my small VPS that runs [NixOS](https://nixos.org/).
|
||||||
|
|
||||||
|
I also host other services like Synapse (Matrix server), Forgejo, Nextcloud
|
||||||
|
Grafana on the VPS, which are all configured using Nix.
|
||||||
|
|
||||||
|
Historically, this blog was made using Rust, [Axum](https://lib.rs/crates/axum),
|
||||||
|
[Maud](https://maud.lambda.xyz/) and a bunch of other neat crates (some which
|
||||||
|
I created, like [embed-rs](https://github.com/RGBCube/embed-rs), which sped up
|
||||||
|
development). But I decided to abandon this strategy as I was reinventing too much
|
||||||
|
for just a simple static website. Development was also *really* slow on a i5 from
|
||||||
|
2015 so I decided to ditch it and use Lume.
|
||||||
|
|
||||||
|
Here is the up to date [GitHub repository for said site](https://github.com/RGBCube/Site),
|
||||||
|
and here is the [historical version written in Rust](https://github.com/RGBCube/Site/tree/555e7ad501692ef2cba5fd927dc58b8b8a8d3086).
|
||||||
|
|
4
site/blog/_data.json
Normal file
4
site/blog/_data.json
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"layout": "post.vto",
|
||||||
|
"title": "$ h1"
|
||||||
|
}
|
|
@ -1,4 +0,0 @@
|
||||||
export default {
|
|
||||||
layout: "article.vto",
|
|
||||||
title: "$ h1",
|
|
||||||
};
|
|
7
site/blog/a.md
Normal file
7
site/blog/a.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
layout: post.vto
|
||||||
|
date: 2024-01-01
|
||||||
|
url: /blog/a
|
||||||
|
---
|
||||||
|
|
||||||
|
test
|
14
site/blog/index.vto
Normal file
14
site/blog/index.vto
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
layout: article.vto
|
||||||
|
|
||||||
|
title: Blog
|
||||||
|
---
|
||||||
|
|
||||||
|
<h1>Blog Articles</h1>
|
||||||
|
|
||||||
|
Are you old? Then you might want to check
|
||||||
|
out my super cool
|
||||||
|
<a href="/feed">RSS Feed</a> too!
|
||||||
|
|
||||||
|
{{ include "posts.vto" }}
|
||||||
|
|
17
site/contact.md
Normal file
17
site/contact.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
layout: article.vto
|
||||||
|
|
||||||
|
title: Contact
|
||||||
|
---
|
||||||
|
|
||||||
|
You can contact me via:
|
||||||
|
|
||||||
|
- Discord: `rgbcube` or `RGBCube#4777`
|
||||||
|
- E-Mail: [`contact@rgbcu.be`](mailto:contact@rgbcu.be)
|
||||||
|
- Matrix: [`@rgbcube:rgbcu.be`](https://matrix.to/#/@rgbcube:rgbcu.be)
|
||||||
|
|
||||||
|
Here are some other useful links as well:
|
||||||
|
|
||||||
|
- [GitHub](https://github.com/RGBCube)
|
||||||
|
- [Twitch](https://www.twitch.tv/rgbcube)
|
||||||
|
- [X](https://x.com/RGBCubed)
|
29
site/index.tsx
Normal file
29
site/index.tsx
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
import Cube from "./_includes/cube.tsx";
|
||||||
|
|
||||||
|
export const layout = "base.vto";
|
||||||
|
export const title = "RGBCube";
|
||||||
|
|
||||||
|
export default (
|
||||||
|
<Cube
|
||||||
|
front={
|
||||||
|
<a href="/about">
|
||||||
|
<div className="frame">about</div>
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
top={
|
||||||
|
<a href="https://github.com/RGBCube">
|
||||||
|
<div className="frame">github</div>
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
right={
|
||||||
|
<a href="/contact">
|
||||||
|
<div className="frame">contact</div>
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
left={
|
||||||
|
<a href="/blog">
|
||||||
|
<div className="frame">blog</div>
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
Loading…
Add table
Add a link
Reference in a new issue