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) {