Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
66375b1dfe
commit
13d2234bbf
8 changed files with 33 additions and 29 deletions
|
@ -27,6 +27,7 @@ steps:
|
|||
project: samme-blog
|
||||
entrypoint: serve.ts
|
||||
production: true
|
||||
include: dist,serve.ts
|
||||
depends_on:
|
||||
- "Build site"
|
||||
when:
|
||||
|
|
22
.vscode/settings.json
vendored
22
.vscode/settings.json
vendored
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"deno.enable": true,
|
||||
"deno.lint": true,
|
||||
"deno.unstable": true,
|
||||
"deno.config": "./deno.json",
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "denoland.vscode-deno"
|
||||
},
|
||||
"deno.suggest.imports.hosts": {
|
||||
"https://deno.land": true,
|
||||
"https://esm.sh": true
|
||||
}
|
||||
"deno.enable": true,
|
||||
"deno.lint": true,
|
||||
"deno.unstable": true,
|
||||
"deno.config": "./deno.json",
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "denoland.vscode-deno"
|
||||
},
|
||||
"deno.suggest.imports.hosts": {
|
||||
"https://deno.land": true,
|
||||
"https://esm.sh": true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import date from "lume/plugins/date.ts";
|
|||
import jsx_preact from "lume/plugins/jsx_preact.ts";
|
||||
// import lightningcss from "lume/plugins/lightningcss.ts";
|
||||
import sass from "lume/plugins/sass.ts";
|
||||
import sitemap from "sitemap";
|
||||
import svgo from "lume/plugins/svgo.ts";
|
||||
|
||||
const site = lume({
|
||||
|
@ -19,9 +20,10 @@ site
|
|||
.use(date())
|
||||
.use(jsx_preact())
|
||||
// .use(mdx())
|
||||
.use(sass())
|
||||
.use(sass({ extensions: [".scss"] }))
|
||||
.use(codeHighlight())
|
||||
// .use(lightningcss())
|
||||
.use(sitemap())
|
||||
.use(svgo())
|
||||
.remoteFile(
|
||||
"_includes/styles/external/nord.min.css",
|
||||
|
|
|
@ -2,6 +2,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"
|
||||
"preact": "https://deno.land/x/lume@v1.12.0/deps/preact.ts",
|
||||
"sitemap": "https://raw.githubusercontent.com/lumeland/experimental-plugins/main/sitemap/sitemap.ts"
|
||||
}
|
||||
}
|
||||
|
|
16
serve.ts
16
serve.ts
|
@ -5,14 +5,14 @@ const app = new Application();
|
|||
// 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) => {
|
||||
try {
|
||||
await ctx.send({
|
||||
root: `${Deno.cwd()}/dist`,
|
||||
index: "index.html",
|
||||
});
|
||||
} catch {
|
||||
next();
|
||||
}
|
||||
try {
|
||||
await ctx.send({
|
||||
root: `${Deno.cwd()}/dist`,
|
||||
index: "index.html",
|
||||
});
|
||||
} catch {
|
||||
next();
|
||||
}
|
||||
});
|
||||
|
||||
const router = new Router();
|
||||
|
|
|
@ -16,9 +16,11 @@ export default ({ title, children }: PageData) => (
|
|||
<link rel="stylesheet" href="/styles/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
{/* <header>
|
||||
{/* <Navbar />
|
||||
</header> */}
|
||||
{
|
||||
/* <header>
|
||||
{/* <Navbar />
|
||||
</header> */
|
||||
}
|
||||
<main>
|
||||
{children}
|
||||
</main>
|
||||
|
|
|
@ -17,4 +17,6 @@ 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) ;)
|
||||
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) ;)
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
Sitemap: {{ 'sitemap.xml' | url(true) }}
|
||||
|
||||
User-agent: *
|
||||
Disallow:
|
Loading…
Reference in a new issue