commit ee48b9dea4f8cc6cad5dcb40f10d7eabd08f93b5
parent 7f515f39fe04587a09552d311700dfcffd68e20a
Author: Henry Unite <unitehenry@gmail.com>
Date: Thu, 9 Apr 2026 04:50:10 +0000
refactor: argv
Diffstat:
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/build/first-post.html b/build/first-post.html
@@ -0,0 +1,2 @@
+<h1 id="first-post">First Post</h1>
+<p>This is my first blog post.</p>
diff --git a/build/index.html b/build/index.html
@@ -0,0 +1,2 @@
+<h2 id="welcome-to-my-site">Welcome to my Site</h2>
+<p>This is my website.</p>
diff --git a/build/nested-1.html b/build/nested-1.html
@@ -0,0 +1 @@
+<p>nested content</p>
diff --git a/src/main.c b/src/main.c
@@ -120,7 +120,7 @@ void generate_pages(StringList *list) {
}
}
-int main(int argc, char **args) {
+int main(int argc, char **argv) {
if (argc < 2) {
fprintf(stderr, "Must provide content directory\n");
@@ -129,7 +129,7 @@ int main(int argc, char **args) {
StringList *list = init_string_list(10); // start with capacity 10
- get_content_files(list, args[1]);
+ get_content_files(list, argv[1]);
generate_pages(list);