Lint + sitemap
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-11 21:08:41 +02:00
parent 66375b1dfe
commit 13d2234bbf
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
8 changed files with 33 additions and 29 deletions

View file

@ -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
View file

@ -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
}
}

View file

@ -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",

View file

@ -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"
}
}

View file

@ -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();

View file

@ -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>

View file

@ -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) ;)

View file

@ -1,4 +0,0 @@
Sitemap: {{ 'sitemap.xml' | url(true) }}
User-agent: *
Disallow: