I live in Spain but the S is silent
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-10-13 19:14:58 +02:00
parent 6bddb5c454
commit 37f1bc92e0
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
8 changed files with 29 additions and 30 deletions

View file

@ -24,7 +24,7 @@ steps:
DENO_DEPLOY_TOKEN:
from_secret: DENO_DEPLOY_TOKEN
settings:
project: samme-blog
project: samme
entrypoint: server.ts
production: true
include: dist,server.ts

View file

@ -6,8 +6,4 @@
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"deno.suggest.imports.hosts": {
"https://deno.land": true,
"https://esm.sh": true
}
}

View file

@ -1,33 +1,43 @@
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_preact from "lume/plugins/jsx_preact.ts";
// import lightningcss from "lume/plugins/lightningcss.ts";
import lightningcss from "lume/plugins/lightningcss.ts";
import minifyHTML from "lume/plugins/minify_html.ts";
import sass from "lume/plugins/sass.ts";
import sitemap from "sitemap";
import svgo from "lume/plugins/svgo.ts";
// Experimental plugins
import mdx from "experimental/mdx/mod.ts"
import sitemap from "experimental/sitemap/sitemap.ts";
const site = lume({
src: "./src",
dest: "./dist",
location: new URL("https://samtherapy.net")
location: new URL("https://samtherapy.net"),
});
site
.copy("img")
.copy(".well-known")
.use(attributes())
.use(codeHighlight())
.use(date())
.use(jsx_preact())
// .use(mdx())
.use(sass({ extensions: [".scss"] }))
.use(codeHighlight())
// .use(lightningcss())
.use(mdx())
.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(minifyHTML())
export default site;

View file

@ -3,6 +3,6 @@
"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",
"sitemap": "https://raw.githubusercontent.com/lumeland/experimental-plugins/main/sitemap/sitemap.ts"
"experimental/": "https://raw.githubusercontent.com/lumeland/experimental-plugins/main/"
}
}

View file

@ -1,7 +1,12 @@
import { Application, httpErrors, Router } from "https://deno.land/x/oak@v11.1.0/mod.ts";
import { Application, Router } from "https://deno.land/x/oak@v11.1.0/mod.ts";
const app = new Application();
app.addEventListener("error", (evt) => {
// Will log the thrown error to the console.
console.dir(evt.error);
});
// First we try to serve static files from the dist folder. If that fails, we
// fall through to the router below.
app.use(async (ctx, next) => {
@ -12,7 +17,7 @@ app.use(async (ctx, next) => {
}).catch(async () => {
ctx.response.status = 404
ctx.response.body = await Deno.readTextFile(`${Deno.cwd()}/dist/404.html`);
next();
await next();
});
});

View file

@ -9,19 +9,12 @@ export default ({ title, children }: PageData) => (
<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>
{
/* <header>
{/* <Navbar />
</header> */
}
<main>
<main class="container">
{children}
</main>
</body>

View file

@ -1,5 +1,5 @@
// Imports
@use "styles/external/pico/scss/pico.classless"; // Pico Framework
@use "styles/external/pico/scss/pico"; // Pico Framework
@use "styles/external/nord.min"; // Highlight.js
// Font

View file

@ -1,5 +0,0 @@
{
"info": {
"title": "samtherapy.net"
}
}