chore: settle with something
This commit is contained in:
parent
f661bdff58
commit
9e78a778c0
21 changed files with 183 additions and 72 deletions
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"deno.config": "./deno.jsonc",
|
||||
"deno.enable": true,
|
||||
"deno.lint": true,
|
||||
"deno.unstable": true,
|
||||
"deno.config": "./deno.json",
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "denoland.vscode-deno"
|
||||
},
|
||||
|
|
22
_config.ts
22
_config.ts
|
@ -3,10 +3,10 @@ import lume from "lume/mod.ts";
|
|||
// Stable plugins
|
||||
import attributes from "lume/plugins/attributes.ts";
|
||||
import codeHighlight from "lume/plugins/code_highlight.ts";
|
||||
import date from "lume/plugins/date.ts";
|
||||
import esbuild from "lume/plugins/esbuild.ts";
|
||||
import jsx from "lume/plugins/jsx_preact.ts";
|
||||
import lightningcss from "lume/plugins/lightningcss.ts";
|
||||
import metas from "lume/plugins/metas.ts";
|
||||
import minifyHTML from "lume/plugins/minify_html.ts";
|
||||
import remark from "lume/plugins/remark.ts";
|
||||
import sass from "lume/plugins/sass.ts";
|
||||
|
@ -14,9 +14,12 @@ import sourceMaps from "lume/plugins/source_maps.ts";
|
|||
import svgo from "lume/plugins/svgo.ts";
|
||||
|
||||
// Experimental plugins
|
||||
import mdx from "experimental/mdx/mod.ts";
|
||||
// import mdx from "experimental/mdx/mod.ts";
|
||||
import sitemap from "experimental/sitemap/sitemap.ts";
|
||||
|
||||
// Custom plugins
|
||||
import toml from "./custom/toml/toml.ts";
|
||||
|
||||
const site = lume({
|
||||
src: "./src",
|
||||
dest: "./dist",
|
||||
|
@ -24,14 +27,15 @@ const site = lume({
|
|||
});
|
||||
|
||||
site
|
||||
.copy("img")
|
||||
.copy("static", ".")
|
||||
.copy("static/.well-known", ".well-known")
|
||||
.copy(".domains")
|
||||
.copy(".well-known")
|
||||
.loadData([".toml"], toml)
|
||||
.use(attributes())
|
||||
.use(codeHighlight())
|
||||
.use(date())
|
||||
.use(jsx())
|
||||
.use(mdx())
|
||||
.use(metas())
|
||||
// .use(mdx())
|
||||
.use(remark())
|
||||
.use(sitemap())
|
||||
.use(svgo())
|
||||
|
@ -41,8 +45,10 @@ site
|
|||
)
|
||||
.use(esbuild())
|
||||
.use(lightningcss())
|
||||
.use(sass({ extensions: [".scss"] }))
|
||||
.use(sass())
|
||||
.use(minifyHTML())
|
||||
.use(sourceMaps());
|
||||
.use(sourceMaps({
|
||||
sourceContent: true,
|
||||
}));
|
||||
|
||||
export default site;
|
||||
|
|
6
custom/toml/toml.ts
Normal file
6
custom/toml/toml.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
import { parse } from "std/encoding/toml.ts";
|
||||
|
||||
export default async function toml(path: string | URL) {
|
||||
const content = await Deno.readTextFile(path);
|
||||
return parse(content);
|
||||
}
|
12
deno.json
12
deno.json
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"importMap": "import_map.json",
|
||||
"tasks": {
|
||||
"lume": "deno eval \"import 'lume/task.ts'\" --",
|
||||
"build": "deno task lume",
|
||||
"serve": "deno task lume -s"
|
||||
},
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "npm:preact"
|
||||
}
|
||||
}
|
22
deno.jsonc
Normal file
22
deno.jsonc
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"importMap": "import_map.json",
|
||||
"tasks": {
|
||||
"lume": "echo \"import 'lume/cli.ts'\" | deno run --unstable -A -",
|
||||
"build": "deno task lume",
|
||||
"serve": "deno task lume -s"
|
||||
},
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "npm:preact"
|
||||
},
|
||||
"lint": {
|
||||
"files": {
|
||||
"exclude": ["src/_includes/styles/external/"]
|
||||
}
|
||||
},
|
||||
"fmt": {
|
||||
"files": {
|
||||
"exclude": ["src/_includes/styles/external/"]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"imports": {
|
||||
"lume/": "https://deno.land/x/lume@v1.12.1/",
|
||||
"preact/jsx-runtime": "https://deno.land/x/lume@v1.11.4/deps/preact_runtime.ts",
|
||||
"experimental/": "https://raw.githubusercontent.com/lumeland/experimental-plugins/main/"
|
||||
"experimental/": "https://raw.githubusercontent.com/lumeland/experimental-plugins/main/",
|
||||
"std/": "https://deno.land/std/",
|
||||
"#types": "./src/_includes/types.ts"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ app.use(async (ctx, next) => {
|
|||
index: "index.html",
|
||||
hidden: true,
|
||||
}).catch(async () => {
|
||||
ctx.response.status = 404
|
||||
ctx.response.status = 404;
|
||||
ctx.response.body = await Deno.readTextFile(`${Deno.cwd()}/dist/404.html`);
|
||||
await next();
|
||||
});
|
||||
|
|
11
src/404.md
11
src/404.md
|
@ -1,13 +1,12 @@
|
|||
---
|
||||
title: 404 - There's Nothing Here
|
||||
layout: layouts/head.njk
|
||||
title: Well, how did I get here?
|
||||
subtitle: 404 - Not found
|
||||
layout: layouts/head.tsx
|
||||
url: /404.html
|
||||
---
|
||||
|
||||
# Well, how did I get here?
|
||||
#### Where does that [highway](/) go to?
|
||||
|
||||
Would you like to [return](/)?
|
||||
|
||||
```ts
|
||||
```js
|
||||
window.location.replace("/");
|
||||
```
|
||||
|
|
12
src/_data.toml
Normal file
12
src/_data.toml
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Site metas from Lume metas plugin
|
||||
[metas]
|
||||
site = "Sam's site"
|
||||
lang = "en"
|
||||
description = "The website of a random fishe"
|
||||
icon = "img/favicon.png"
|
||||
keywords = ["nothing"]
|
||||
robots = true
|
||||
generator = true
|
||||
|
||||
[mergedKeys]
|
||||
metas = "object"
|
23
src/_includes/layouts/about.tsx
Normal file
23
src/_includes/layouts/about.tsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { PageData } from "lume/core.ts";
|
||||
|
||||
export const title = "Sam Site 2.0";
|
||||
export const layout = "layouts/head.tsx";
|
||||
|
||||
export default ({ children }: PageData) => (
|
||||
<div class="grid">
|
||||
<div>
|
||||
{children}
|
||||
</div>
|
||||
<div>
|
||||
<iframe
|
||||
title="Powered by Fedifeed"
|
||||
allowfullscreen
|
||||
sandbox="allow-top-navigation allow-scripts"
|
||||
width="400"
|
||||
height="500"
|
||||
src="https://fedifeed.com/api/v1/feed?user=sam&instance=https%3A%2F%2Ffroth.zone&instance_type=&theme=pleroma&size=75&header=true&replies=true&boosts=true"
|
||||
>
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
);
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ language }}">
|
||||
<head>
|
||||
<meta charSet="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link rel="shortcut icon" href="img/favicon.png"/>
|
||||
<link rel="stylesheet" href="styles/style.css"/>
|
||||
<title>{{ title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
{{ content | safe }}
|
||||
</body>
|
||||
</html>
|
34
src/_includes/layouts/head.tsx
Normal file
34
src/_includes/layouts/head.tsx
Normal file
|
@ -0,0 +1,34 @@
|
|||
import { PageData } from "lume/core.ts";
|
||||
|
||||
export default ({ metas, children, title, subtitle }: PageData) => (
|
||||
<html lang={metas?.lang}>
|
||||
<head>
|
||||
<title>{title}</title>
|
||||
<meta charSet="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="shortcut icon" href="/img/favicon.png" />
|
||||
<link rel="stylesheet" href="/styles/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header class="container">
|
||||
<hgroup>
|
||||
<h1>{title}</h1>
|
||||
<h2>{subtitle}</h2>
|
||||
</hgroup>
|
||||
</header>
|
||||
<main class="container">
|
||||
{children}
|
||||
</main>
|
||||
<footer class="container">
|
||||
<small>
|
||||
Built with <a href="https://lume.land">Lume</a> • Hosted on{" "}
|
||||
<a href="https://deno.com/deploy">Deno Deploy</a> from{" "}
|
||||
<a href="https://samtherapy.net">here</a> <em>and</em>{" "}
|
||||
<a href="https://freecumextremist.finance">Froth Pages</a> from{" "}
|
||||
<a href="https://samtherapy.xyz">here</a> •{" "}
|
||||
<a href="https://git.froth.zone/sam/site">Source</a>
|
||||
</small>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
);
|
|
@ -10,15 +10,19 @@
|
|||
@use "styles/external/nord.min";
|
||||
|
||||
// // Font
|
||||
@import url("https://rsms.me/inter/inter.css");
|
||||
// @import url("https://rsms.me/inter/inter.css");
|
||||
|
||||
// /* CSS */
|
||||
// :root {
|
||||
// font-family: "Inter", sans-serif;
|
||||
// }
|
||||
|
||||
// @supports (font-variation-settings: normal) {
|
||||
// :root {
|
||||
// font-family: "Inter var", sans-serif;
|
||||
// }
|
||||
// }
|
||||
|
||||
/* CSS */
|
||||
:root {
|
||||
font-family: "Inter", sans-serif;
|
||||
}
|
||||
|
||||
@supports (font-variation-settings: normal) {
|
||||
:root {
|
||||
font-family: "Inter var", sans-serif;
|
||||
}
|
||||
}
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, "Nimbus Sans L", Roboto, Noto, "Segoe UI", Arial, Helvetica, "Helvetica Neue", sans-serif;
|
||||
}
|
0
src/_includes/types.ts
Normal file
0
src/_includes/types.ts
Normal file
29
src/about.md
Normal file
29
src/about.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: About me
|
||||
subtitle: This is actually just a list of things I host because I have the personality of a ham sandwich
|
||||
layout: layouts/about.tsx
|
||||
---
|
||||
|
||||
### An inexhaustible list of everything I host :)
|
||||
|
||||
- [Status page](https://status.froth.zone)
|
||||
|
||||
#### Federated stuff :)
|
||||
|
||||
- [Pleroma](https://froth.zone)
|
||||
- [Gitea](https://git.froth.zone)
|
||||
- [Writefreely](https://blog.froth.zone)
|
||||
- [PeerTube](https://tube.froth.zone)
|
||||
- [Funkwhale](https://funkwhale.samtherapy.net)
|
||||
- [Fedifeed (pictured either to the right or below)](https://fedifeed.com)
|
||||
|
||||
#### Private frontends
|
||||
|
||||
- [Invidious for YouTube](https://invidious.froth.zone)
|
||||
- [Nitter for Twitter](https://nitter.bird.froth.zone)
|
||||
- [Teddit for Reddit](https://teddit.froth.zone)
|
||||
- [Scribe for Medium](https://scribe.froth.zone)
|
||||
|
||||
##### DNS
|
||||
|
||||
I also self-host [all of my DNS](https://dns.froth.zone).
|
11
src/index.md
Normal file
11
src/index.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: Sam's Website, 2.0
|
||||
subtitle: Under construction since October 2022
|
||||
layout: layouts/head.tsx
|
||||
---
|
||||
|
||||
### Hello there.
|
||||
|
||||
Website!
|
||||
|
||||
[Information, I guess](/about)
|
|
@ -1,19 +0,0 @@
|
|||
import { PageData } from "lume/core.ts";
|
||||
|
||||
export const title = "Sam Site 2.0";
|
||||
export const layout = "layouts/head.njk";
|
||||
|
||||
export default ({ data }: PageData) => (
|
||||
<>
|
||||
<header class="container">
|
||||
<hgroup>
|
||||
<h1>{title}</h1>
|
||||
<h2>Stuff</h2>
|
||||
</hgroup>
|
||||
</header>
|
||||
<main class="container">
|
||||
<p>There was a website here. There isn't anymore.</p>
|
||||
<p>There will be, eventually.</p>
|
||||
</main>
|
||||
</>
|
||||
);
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
BIN
static/img/favicon.png
Normal file
BIN
static/img/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
8
velociraptor.yaml
Normal file
8
velociraptor.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
scripts:
|
||||
lint: deno lint
|
||||
format: deno fmt
|
||||
pre-commit:
|
||||
cmd:
|
||||
- vr lint
|
||||
- vr format
|
||||
gitHook: pre-commit
|
Loading…
Reference in a new issue