🔖 v0.0.1
This commit is contained in:
parent
d109fd9ed0
commit
6327f95e22
5 changed files with 50 additions and 14 deletions
45
README.md
45
README.md
|
@ -17,11 +17,52 @@ cd vss
|
|||
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
|
||||
```
|
||||
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
|
||||
|
||||
- [GitHub](https://github.com/zztkm)
|
||||
- [GitHub](https://github.com/zztkm)
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
何も作ってない
|
||||
*/
|
||||
|
||||
module template
|
||||
|
||||
struct Template {
|
||||
|
|
2
v.mod
2
v.mod
|
@ -1,7 +1,7 @@
|
|||
Module {
|
||||
name: 'vss'
|
||||
description: 'static site generator'
|
||||
version: '0.0.0'
|
||||
version: '0.0.1'
|
||||
license: 'MIT'
|
||||
dependencies: [markdown]
|
||||
}
|
||||
|
|
11
vss.v
11
vss.v
|
@ -11,7 +11,7 @@ const default_dist = 'dist'
|
|||
fn main() {
|
||||
mut app := cli.Command{
|
||||
name: 'vss'
|
||||
version: '0.0.0'
|
||||
version: '0.0.1'
|
||||
description: 'static site generator'
|
||||
execute: fn (cmd cli.Command) ? {
|
||||
generate_index_page()?
|
||||
|
@ -28,15 +28,6 @@ fn get_paths(path string) []string {
|
|||
}
|
||||
|
||||
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)?
|
||||
|
||||
// for $tmpl value
|
||||
|
|
Loading…
Reference in a new issue