Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization, removing code duplications #1

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"imports": {
"lume/": "https://deno.land/x/[email protected]/",
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/[email protected].3/"
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/[email protected].7/"
},
"lock": false,
"tasks": {
Expand All @@ -15,23 +15,7 @@
}
},
"compilerOptions": {
"types": [
"lume/types.ts"
]
"types": ["lume/types.ts"]
},
"lint": {
"exclude": [
"./_site"
],
"rules": {
"tags": [
"recommended"
]
}
},
"fmt": {
"exclude": [
"./_site"
]
}
"exclude": ["./_site"]
}
4 changes: 2 additions & 2 deletions plugins.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import postcss from "lume/plugins/postcss.ts";
import lightningcss from "lume/plugins/lightningcss.ts";
import basePath from "lume/plugins/base_path.ts";
import metas from "lume/plugins/metas.ts";
import { Options as SitemapOptions, sitemap } from "lume/plugins/sitemap.ts";
Expand All @@ -23,7 +23,7 @@ export default function (userOptions?: Options) {
const options = merge(defaults, userOptions);

return (site: Lume.Site) => {
site.use(postcss())
site.use(lightningcss())
.use(basePath())
.use(metas())
.use(sitemap(options.sitemap))
Expand Down
13 changes: 3 additions & 10 deletions src/_includes/css/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
box-sizing: border-box;
}

html {
font-family: system-ui, sans-serif;
line-height: 1.4;
}

body {
font-family: system-ui, sans-serif;
line-height: 1.5;
margin: 0;
}

Expand All @@ -23,11 +20,7 @@ pre {

button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.4;
margin: 0;
font: inherit;
}
9 changes: 3 additions & 6 deletions src/_includes/layouts/base.vto
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<!doctype html>

<html lang="{{ lang || metas.lang }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title || metas.title }} - {{ metas.site }}</title>

<meta name="supported-color-schemes" content="light dark">

<link rel="stylesheet" href="/styles.css">
<meta name="color-scheme" content="light dark">
<link rel="stylesheet" href="/style.css">
<link rel="canonical" href="{{ url |> url(true) }}">
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion src/index.vto
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ title: Home
<h1>{{ title }}</h1>

<p>This is a boilerplate to create a Lume theme</p>
</header>
</header>
7 changes: 7 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "css/reset.css";

body {
max-inline-size: 60ch;
margin-inline: auto;
padding-inline: 1rem;
}
7 changes: 0 additions & 7 deletions src/styles.css

This file was deleted.