commit message
continuous-integration/drone Build was killed Details
continuous-integration/drone/push Build is passing Details

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-10-15 23:16:27 +02:00
parent 37f1bc92e0
commit f661bdff58
Signed by: sam
GPG Key ID: 4D8B07C18F31ACBD
13 changed files with 85 additions and 66 deletions

View File

@ -18,7 +18,7 @@ steps:
depends_on:
- "Clone"
- name: Deploy
- name: Deploy to Deno Deploy
image: git.froth.zone/sam/drone-deno-deploy
environment:
DENO_DEPLOY_TOKEN:
@ -32,6 +32,23 @@ steps:
- "Build site"
when:
branch:
- master
- master
event:
- push
- push
- name: Push to Pages
image: plugins/gh-pages
settings:
remote_url:
from_secret: URL
target_branch: pages
pages_directory: dist/
user_name: Sam Therapy
user_email: sam@samtherapy.net
depends_on:
- "Build site"
when:
branch:
- master
event:
- push

View File

@ -6,4 +6,7 @@
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[typescriptreact]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}

View File

@ -4,15 +4,17 @@ import lume from "lume/mod.ts";
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_preact from "lume/plugins/jsx_preact.ts";
import esbuild from "lume/plugins/esbuild.ts";
import jsx from "lume/plugins/jsx_preact.ts";
import lightningcss from "lume/plugins/lightningcss.ts";
import minifyHTML from "lume/plugins/minify_html.ts";
import remark from "lume/plugins/remark.ts";
import sass from "lume/plugins/sass.ts";
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";
const site = lume({
@ -23,21 +25,24 @@ const site = lume({
site
.copy("img")
.copy(".domains")
.copy(".well-known")
.use(attributes())
.use(codeHighlight())
.use(date())
.use(jsx_preact())
.use(jsx())
.use(mdx())
.use(remark())
.use(sitemap())
.use(svgo())
.remoteFile(
"_includes/styles/external/nord.min.css",
"https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.6.0/build/styles/nord.min.css",
)
)
.use(esbuild())
.use(lightningcss())
.use(sass({ extensions: [ ".scss" ] }))
.use(sass({ extensions: [".scss"] }))
.use(minifyHTML())
.use(sourceMaps());
export default site;

View File

@ -7,6 +7,6 @@
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
"jsxImportSource": "npm:preact"
}
}

View File

@ -1,8 +1,7 @@
{
"imports": {
"lume/": "https://deno.land/x/lume@v1.12.0/",
"preact/jsx-runtime": "https://deno.land/x/lume@v1.12.0/deps/preact_runtime.ts",
"preact": "https://deno.land/x/lume@v1.12.0/deps/preact.ts",
"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/"
}
}

1
src/.domains Normal file
View File

@ -0,0 +1 @@
samtherapy.xyz

View File

@ -1,6 +1,6 @@
---
title: 404 - There's Nothing Here
layout: layouts/base.tsx
layout: layouts/head.njk
url: /404.html
---

View File

@ -1,22 +0,0 @@
// This exists because lume doesn't actually add the <!DOCTYPE> header when rendering.
export const layout = "layouts/doctype.njk";
import type { PageData } from "lume/core.ts";
import Navbar from "../components/navbar.tsx";
export default ({ title, children }: PageData) => (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{title}</title>
<link rel="shortcut icon" href="img/favicon.png" />
<link rel="stylesheet" href="/styles/style.css" />
</head>
<body>
<main class="container">
{children}
</main>
</body>
</html>
);

View File

@ -1,2 +0,0 @@
<!DOCTYPE html>
{{ content | safe }}

View File

@ -0,0 +1,13 @@
<!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>

View File

@ -1,16 +1,24 @@
// Imports
@use "styles/external/pico/scss/pico"; // Pico Framework
@use "styles/external/nord.min"; // Highlight.js
// Pico CSS, https: //picocss.com/
@use "styles/external/pico/scss/pico" with (
$primary-500: #9e9e9e,
$primary-600: #757575,
$primary-700: #616161
);
// Font
// Highlight.js theme
@use "styles/external/nord.min";
// // Font
@import url("https://rsms.me/inter/inter.css");
html {
/* CSS */
:root {
font-family: "Inter", sans-serif;
}
@supports (font-variation-settings: normal) {
html {
:root {
font-family: "Inter var", sans-serif;
}
}

View File

@ -1,22 +0,0 @@
---
title: Sam Site 2.0 (currently under construction)
layout: layouts/base.tsx
---
# Hello there
This is a website.
## There appears to be nothing here
You would be correct.
### Currently under (re)construction
It'll be ready, eventually. :)
#### Plans
As of now I'm using [lume.land](https://lume.land) and deploying to
[Deno Deploy](https://deno.com/deploy) with a
[custom Drone CI action](https://git.froth.zone/sam/drone-deno-deploy) ;)

19
src/index.tsx Normal file
View File

@ -0,0 +1,19 @@
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>
</>
);