First commit
This commit is contained in:
commit
d3beb92c8e
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.vscode
|
||||
.zig-cache
|
||||
zig-out
|
3
assets/style.css
Normal file
3
assets/style.css
Normal file
@ -0,0 +1,3 @@
|
||||
* {
|
||||
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
|
||||
}
|
13
build.zig
Normal file
13
build.zig
Normal file
@ -0,0 +1,13 @@
|
||||
const std = @import("std");
|
||||
const zine = @import("zine");
|
||||
|
||||
pub fn build(b: *std.Build) !void {
|
||||
zine.website(b, .{
|
||||
.title = "Some Website",
|
||||
.host_url = "https://example.com",
|
||||
.content_dir_path = "content",
|
||||
.layouts_dir_path = "layouts",
|
||||
.assets_dir_path = "assets",
|
||||
.debug = true,
|
||||
});
|
||||
}
|
11
build.zig.zon
Normal file
11
build.zig.zon
Normal file
@ -0,0 +1,11 @@
|
||||
.{
|
||||
.name = "Some Website",
|
||||
.version = "0.0.0",
|
||||
.dependencies = .{
|
||||
.zine = .{
|
||||
.url = "git+https://github.com/kristoff-it/zine#1d66842aa28f4edfc437b7a5fe7863e1be3e240e",
|
||||
.hash = "12202ee10bbcfad7006ba10b933b579c47acf23ad8911f4146a937cba048907156ab",
|
||||
},
|
||||
},
|
||||
.paths = .{"."},
|
||||
}
|
8
content/index.smd
Normal file
8
content/index.smd
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
.title = "My website",
|
||||
.date = @date("2024-10-06T12:14:00-07:00"),
|
||||
.author = "Brandon",
|
||||
.layout = "home.shtml",
|
||||
---
|
||||
|
||||
Check out my [posts]($link.url('http://localhost:1990/posts/index.html'))!
|
7
content/posts/first-post.smd
Normal file
7
content/posts/first-post.smd
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
.title = "Nothing in Particular",
|
||||
.author = "Brandon",
|
||||
.date = @date("2024-10-07"),
|
||||
.layout = "post.shtml",
|
||||
---
|
||||
Words on a page.
|
7
content/posts/index.smd
Normal file
7
content/posts/index.smd
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
.title = "Posts",
|
||||
.date = @date("2024-10-06T12:14:00-07:00"),
|
||||
.author = "Brandon",
|
||||
.layout = "posts.shtml",
|
||||
---
|
||||
Ain’t nothin’ here.
|
11
layouts/home.shtml
Normal file
11
layouts/home.shtml
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title :text="$site.title"></title>
|
||||
</head>
|
||||
<body>
|
||||
<h1 :text="$page.title"></h1>
|
||||
<div :html="$page.content()"></div>
|
||||
</body>
|
||||
</html>
|
12
layouts/post.shtml
Normal file
12
layouts/post.shtml
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title :text="$page.title.suffix(' — ', $site.title)"></title>
|
||||
<link rel="stylesheet" type="text/css" href="$site.asset('style.css').link()">
|
||||
</head>
|
||||
<body>
|
||||
<h1 :text="$page.title"></h1>
|
||||
<ctx :html="$page.content()"></ctx>
|
||||
</body>
|
||||
</html>
|
9
layouts/posts.shtml
Normal file
9
layouts/posts.shtml
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<div :html="$page.content()"></div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user