init template

This commit is contained in:
2023-10-17 12:54:59 +05:30
commit 42cddb207a
8 changed files with 2438 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
node_modules/
/_site/

37
Makefile Normal file
View File

@@ -0,0 +1,37 @@
PROJ =
ifndef PROJ
$(error variable $$PROJ needs to be defined)
endif
PACKAGE_SCRIPTS = { "scripts": { "dev": "eleventy --serve", "build": "eleventy" } }
POD_MOUNTS = \
-w /app \
-v $(PWD):/app:z \
-v $(PROJ)_modules:/app/node_modules:z
POD_OPTIONS_TEMPLATE = \
--interactive --tty \
--rm \
--name $(PROJ)_$(CONTAINER_TAG) \
$(POD_MOUNTS) $(EXTRA_FLAGS) \
node:alpine
dev: EXTRA_FLAGS = --publish 8080:8080
dev: SCRIPT = dev
dev: run
build: SCRIPT = build
build: run
run: CONTAINER_TAG = $(firstword $(SCRIPT))
run:
podman run $(POD_OPTIONS_TEMPLATE) npm run $(SCRIPT)
sh: CONTAINER_TAG = sh
sh:
podman run $(POD_OPTIONS_TEMPLATE) sh

4
_data/site.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "",
"desc": ""
}

20
_includes/base.liquid Normal file
View File

@@ -0,0 +1,20 @@
<!doctype html>
<html>
<head>
<title>{{ site.name }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="{{ desc | default: site.desc }}">
<link rel="stylesheet" href="/pico.min.css">
</head>
<body class=".grid" style="min-width:100dvh;min-width:100vh;">
<header>
<h1>{{ site.name }}</h1>
</header>
<main>
{{ content }}
</main>
<footer>
</footer>
</body>
</html>

11
eleventy.config.cjs Normal file
View File

@@ -0,0 +1,11 @@
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
module.exports = function(eleventyConfig){
eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
eleventyConfig.addPassthroughCopy({
"./node_modules/@picocss/pico/css/pico.min.*": "./",
}, {debug: true})
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
}

3
index.md Normal file
View File

@@ -0,0 +1,3 @@
---
layout: base.liquid
---

2350
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

10
package.json Normal file
View File

@@ -0,0 +1,10 @@
{
"scripts": {
"dev": "eleventy --serve",
"build": "eleventy"
},
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@picocss/pico": "^1.5.10"
}
}