aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-07-11 12:35:34 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-07-11 12:35:34 +0530
commitf62c7ced4f529a069530e6effc370371338eb3af (patch)
treeaa6baaf130dcf02aaeb731855d9157c5cba1f43e
parentb666cf57efc0028a8648b068ffe6ba1630784444 (diff)
main: handle markdown files
-rw-r--r--compromyse.xyz/index.html1
-rw-r--r--src/main.c15
2 files changed, 8 insertions, 8 deletions
diff --git a/compromyse.xyz/index.html b/compromyse.xyz/index.html
index 3d3fe3a..53a4028 100644
--- a/compromyse.xyz/index.html
+++ b/compromyse.xyz/index.html
@@ -1,6 +1,7 @@
{{ include "navbar.html" }}
<div class="p-16">
+
<div class="flex flex-wrap gap-8">
<img src="/assets/me.webp" class="max-h-56"></img>
<div class="flex flex-col justify-center">
diff --git a/src/main.c b/src/main.c
index 7a88ec4..b14a9b7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -71,7 +71,7 @@ handle_file(const char *path)
if (dot && strcmp(dot, ".md") == 0) {
MMIOT *doc = mkd_string(buffer, size, 0);
- template_write(base_template, NULL, out, doc, false);
+ template_write(base_template, NULL, out, doc, true);
} else if (strlen(buffer) != 0) {
list_t *content_headers = ingest(&buffer);
template_write(base_template, content_headers, out, buffer, false);
@@ -118,15 +118,14 @@ main(int argc, char **argv)
printf("HANDLING: %s\n", filepath);
handle_file(filepath);
free(filepath);
-
- return EXIT_SUCCESS;
}
- /* for (x = (char **) md_resources; *x != NULL; x++) { */
- /* asprintf(&filepath, "%s.md", *x); */
- /* handle_file(filepath); */
- /* free(filepath); */
- /* } */
+ for (x = (char **) md_resources; *x != NULL; x++) {
+ asprintf(&filepath, "%s.md", *x);
+ printf("HANDLING: %s\n", filepath);
+ handle_file(filepath);
+ free(filepath);
+ }
return EXIT_SUCCESS;
}