diff --git a/index.md b/index.md index 8434f2b..04b3974 100644 --- a/index.md +++ b/index.md @@ -4,4 +4,6 @@ ## Posts +$render{"test"} + - [recursive]($root/posts/2023-08-03-recursively-list-all-files-in-a-directory-with-elixir.html) diff --git a/site.moon b/site.moon index 866f316..659d259 100644 --- a/site.moon +++ b/site.moon @@ -18,9 +18,22 @@ posts = (path=".") -> files = [file for file in lfs.dir path when file != "." and file != ".."] {join(path, file), target(file, "/posts") for _, file in ipairs files} +-- renderer = require "sitegen.renderers.html" + + -- Change output dir to what Openresty prefers -site! -site.config.out_dir = "html/" +-- site = site! +-- site.config.out_dir = "html/" + +-- oof = site! + +-- templates = site.templates + +-- require"moon".p [k for k,v in pairs templates] +-- require"moon".p [k for k,v in pairs site.templates] +-- require"moon".p templates +-- require"moon".p renderer.Renderer.can_load("test.md") +-- require"moon".p renderer\helpers! css = tools.system_command "cat < %s > %s", "css" @@ -31,4 +44,5 @@ sitegen.create => add "index.md" add path, target: target for path, target in pairs posts "docs" + build css, "app.css" diff --git a/templates/index.html b/templates/index.html index 1a4131b..3eeb34e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,26 +1,3 @@ - - - - - - $title - - - - -
-
-

Web Dev Solutions

-

Catalin Mititiuc

-
-
-
$body