From 2fedc8a90f324e41afa4c7b14af009d14970a063 Mon Sep 17 00:00:00 2001 From: zztkm Date: Tue, 2 Aug 2022 13:00:14 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- example/index.md | 2 ++ vss.v | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7c36569..c08d6b5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ vss vls.log # generated test files -index.html \ No newline at end of file +index.html +example/dist/ \ No newline at end of file diff --git a/example/index.md b/example/index.md index 74b2f0b..9f9482c 100644 --- a/example/index.md +++ b/example/index.md @@ -3,3 +3,5 @@ A static site generator - [GitHub](https://github.com/zztkm) + +[about page](./about.md) \ No newline at end of file diff --git a/vss.v b/vss.v index 052d951..b8fdc16 100644 --- a/vss.v +++ b/vss.v @@ -54,6 +54,14 @@ fn get_html_filename(md_path string) string { return file_name + '.html' } +// parse_link convert markdown relative links to html relative links +fn parse_link(contents string) string { + lines := contents.split_into_lines() + for line in lines { + println(line) + } +} + fn generate_pages() ? { dist := default_dist if !os.exists(dist) {