aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-07-12 16:32:27 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-07-12 16:32:27 +0530
commit291df9b9887e47f6bff77ab99913cc31e2f7c4ff (patch)
treee845d884fcc36f1935a7e71ab3f7e324feab0367
parent37c69bc9c889c2cee0a66336c3b7dec7194d982b (diff)
template: templates should be ingested before lexing
This is mainly so that we can use include directives in templates
-rw-r--r--compromyse.xyz/base.html2
-rw-r--r--compromyse.xyz/index.html2
-rw-r--r--compromyse.xyz/projects.html2
-rw-r--r--src/template.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/compromyse.xyz/base.html b/compromyse.xyz/base.html
index 26e0350..042ee4d 100644
--- a/compromyse.xyz/base.html
+++ b/compromyse.xyz/base.html
@@ -10,6 +10,8 @@
<link href="https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap" rel="stylesheet">
</head>
<body class="bg-zinc-900 text-pink-300 font-[Pixelify_Sans] selection:text-pink-900 selection:bg-pink-100">
+ {{ include "navbar.html" }}
+
{{ body }}
</body>
</html>
diff --git a/compromyse.xyz/index.html b/compromyse.xyz/index.html
index 53a4028..c60ce75 100644
--- a/compromyse.xyz/index.html
+++ b/compromyse.xyz/index.html
@@ -1,5 +1,3 @@
-{{ include "navbar.html" }}
-
<div class="p-16">
<div class="flex flex-wrap gap-8">
diff --git a/compromyse.xyz/projects.html b/compromyse.xyz/projects.html
index 5966890..1f78beb 100644
--- a/compromyse.xyz/projects.html
+++ b/compromyse.xyz/projects.html
@@ -1,5 +1,3 @@
-{{ include "navbar.html" }}
-
<div class="p-16">
<h1 class="text-5xl">PROJECTS</h1>
<p class="text-xl">Here's a bunch of things I've done.</p>
diff --git a/src/template.c b/src/template.c
index 31bb41f..9083463 100644
--- a/src/template.c
+++ b/src/template.c
@@ -1,5 +1,6 @@
#define _GNU_SOURCE
+#include <engine.h>
#include <filehandler.h>
#include <lexer.h>
#include <mkdio.h>
@@ -21,6 +22,7 @@ template_create(void)
char *buffer = fcontent(base, size);
fclose(base);
+ ingest(&buffer);
template->components = lex(buffer);
free(buffer);