🔖 v0.0.1
This commit is contained in:
parent
d109fd9ed0
commit
6327f95e22
5 changed files with 50 additions and 14 deletions
43
README.md
43
README.md
|
@ -17,7 +17,23 @@ 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
|
||||||
```
|
```
|
||||||
|
@ -25,3 +41,28 @@ 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>
|
||||||
|
```
|
|
@ -1,3 +1,7 @@
|
||||||
|
/*
|
||||||
|
何も作ってない
|
||||||
|
*/
|
||||||
|
|
||||||
module template
|
module template
|
||||||
|
|
||||||
struct Template {
|
struct Template {
|
||||||
|
|
2
v.mod
2
v.mod
|
@ -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
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…
Add table
Reference in a new issue