diff --git a/.gitignore b/.gitignore
index ad6d464..b0ba90a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,6 @@
.local/
.cpcache/
+.statyk/
+_site/
+_src/
+_templates/
diff --git a/resources/statyk/index.html b/resources/statyk/index.html
new file mode 100644
index 0000000..b51f1ce
--- /dev/null
+++ b/resources/statyk/index.html
@@ -0,0 +1,144 @@
+
+
+
+
+
+ $title$
+
+
+
+
+
+
+
+
+ $header-includes$
+
+
+
+
+ Articles
+$body$
+
+Archives from my previous dead blog
+
+
+
+
+
+
+
diff --git a/resources/statyk/post.html b/resources/statyk/post.html
new file mode 100644
index 0000000..e5b7d81
--- /dev/null
+++ b/resources/statyk/post.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+ $title$
+
+
+
+
+
+
+
+
+ $header-includes$
+
+
+
+
+
+
$title$
+
+
+$description$
+
+
+
+
+$if(toc)$$endif$
+
+$body$
+
+
+
+
+
diff --git a/statyk b/statyk
index 419c5fa..fb55cfe 100755
--- a/statyk
+++ b/statyk
@@ -5,7 +5,8 @@
#_DEPS is same format as deps.edn. Multiline is okay.
DEPS='
- {:deps {
+ {:paths ["." "resources"]
+ :deps {
org.clojure/tools.cli {:mvn/version "1.0.214"}
ring/ring-core {:mvn/version "1.11.0"}
ring/ring-jetty-adapter {:mvn/version "1.11.0"}
@@ -185,13 +186,12 @@ exec clojure $OPTS -Sdeps "$DEPS" -M "$0" "$@"
"- clean delete generated files in _site"]))
(System/exit 0))
-(defn cp-resource [resource-name]
- (let [dst (str ".statyk/" resource-name)]
+(defn cp-resource [dst-dir resource-name]
+ (let [dst (str dst-dir "/" resource-name)]
(println (format "Generating: %s" dst))
(if-let [resource (io/resource (str "statyk/" resource-name))]
(spit dst (slurp resource))
- (err! "Cannot read %s" (io/resource (str "statyk/" resource-name)))
- )))
+ (err! "Cannot read %s" (io/resource (str "statyk/" resource-name))))))
(defn init-site
[_options]
@@ -204,8 +204,10 @@ exec clojure $OPTS -Sdeps "$DEPS" -M "$0" "$@"
(doseq [f ["org-links-to-html.lua"
"img-to-webp.lua"
"metas.lua"]]
- (cp-resource f))
-
+ (cp-resource ".statyk" f))
+ (doseq [f ["index.html"
+ "post.html"]]
+ (cp-resource (:templates-directory config) f))
)
(defn -main [& args]