🔖 v0.0.1

main
zztkm 2 years ago
parent d109fd9ed0
commit 6327f95e22

@ -17,11 +17,52 @@ cd vss
v vss.v v vss.v
``` ```
## Use ## Usage
Setup contents
```
tree
.
├── index.md
└── vss (executable)
cat index.md
# Open Sea
A static site generator
- [GitHub](https://github.com/zztkm)
```
Build your site Build your site
``` ```
vss vss
``` ```
Output Output
```
tree
.
├── dist
│ └── index.html
├── index.md
└── vss
1 directory, 3 files
cat dist/index.html
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>tsurutatakumi.info</title>
</head>
<body>
<h1>Open Sea</h1>
<p>A static site generator</p>
<ul>
<li><a href="https://github.com/zztkm">GitHub</a></li>
</ul>
</body>
```

@ -2,4 +2,4 @@
A static site generator A static site generator
- [GitHub](https://github.com/zztkm) - [GitHub](https://github.com/zztkm)

@ -1,3 +1,7 @@
/*
*/
module template module template
struct Template { struct Template {

@ -1,7 +1,7 @@
Module { Module {
name: 'vss' name: 'vss'
description: 'static site generator' description: 'static site generator'
version: '0.0.0' version: '0.0.1'
license: 'MIT' license: 'MIT'
dependencies: [markdown] dependencies: [markdown]
} }

11
vss.v

@ -11,7 +11,7 @@ const default_dist = 'dist'
fn main() { fn main() {
mut app := cli.Command{ mut app := cli.Command{
name: 'vss' name: 'vss'
version: '0.0.0' version: '0.0.1'
description: 'static site generator' description: 'static site generator'
execute: fn (cmd cli.Command) ? { execute: fn (cmd cli.Command) ? {
generate_index_page()? generate_index_page()?
@ -28,15 +28,6 @@ fn get_paths(path string) []string {
} }
fn generate_index_page() ? { fn generate_index_page() ? {
paths := get_paths('testfiles')
if paths.len == 0 {
println('Cloud not retrieve path')
return
}
for path in paths {
println(path)
}
index_md := os.read_file(default_index)? index_md := os.read_file(default_index)?
// for $tmpl value // for $tmpl value

Loading…
Cancel
Save