2022-07-22 19:12:02 +02:00
|
|
|
|
# vss
|
|
|
|
|
|
2022-08-14 12:45:16 +02:00
|
|
|
|
Easy-to-use static site generator
|
|
|
|
|
|
2022-08-16 21:48:50 +02:00
|
|
|
|
![image](image.gif)
|
|
|
|
|
|
2022-08-14 12:45:16 +02:00
|
|
|
|
![CI](https://github.com/zztkm/vss/workflows/CI/badge.svg)
|
2022-07-22 19:12:02 +02:00
|
|
|
|
|
|
|
|
|
## Caution
|
|
|
|
|
|
|
|
|
|
vss is still under development and the API is not stable.
|
|
|
|
|
Be aware that destructive changes will be made if you use it!
|
|
|
|
|
|
2022-08-13 13:58:44 +02:00
|
|
|
|
## Feature
|
|
|
|
|
|
|
|
|
|
- Easy to use
|
2022-08-14 12:45:16 +02:00
|
|
|
|
- Create site content with markdown
|
|
|
|
|
|
|
|
|
|
## Installation
|
2022-07-26 19:16:41 +02:00
|
|
|
|
|
2022-08-14 12:45:16 +02:00
|
|
|
|
### Get the binary
|
|
|
|
|
Download from [Releases](https://github.com/zztkm/vss/releases)
|
|
|
|
|
|
|
|
|
|
### Build from source
|
2022-07-26 19:16:41 +02:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
git clone https://github.com/zztkm/vss.git
|
|
|
|
|
cd vss
|
|
|
|
|
|
2022-08-14 12:45:16 +02:00
|
|
|
|
v install markdown
|
|
|
|
|
|
|
|
|
|
v . -o vss
|
2022-07-26 19:16:41 +02:00
|
|
|
|
```
|
|
|
|
|
|
2022-07-28 05:58:29 +02:00
|
|
|
|
## Usage
|
|
|
|
|
|
2022-07-31 13:25:50 +02:00
|
|
|
|
### Setup contents
|
|
|
|
|
|
|
|
|
|
Currently, be sure to configure the following
|
|
|
|
|
|
2022-07-28 05:58:29 +02:00
|
|
|
|
```
|
2022-07-31 13:25:50 +02:00
|
|
|
|
❯ tree
|
2022-07-28 05:58:29 +02:00
|
|
|
|
.
|
2022-08-12 15:17:10 +02:00
|
|
|
|
├── about.md
|
2022-07-31 13:25:50 +02:00
|
|
|
|
├── config.toml
|
|
|
|
|
├── dist
|
2022-08-12 15:17:10 +02:00
|
|
|
|
│ ├── css
|
|
|
|
|
│ │ └── main.css
|
|
|
|
|
│ └── js
|
|
|
|
|
│ └── main.js
|
2022-07-28 05:58:29 +02:00
|
|
|
|
├── index.md
|
2022-08-12 15:17:10 +02:00
|
|
|
|
├── layouts
|
|
|
|
|
│ └── index.html
|
|
|
|
|
└── static
|
|
|
|
|
├── css
|
|
|
|
|
│ └── main.css
|
|
|
|
|
└── js
|
|
|
|
|
└── main.js
|
|
|
|
|
|
2022-07-31 13:25:50 +02:00
|
|
|
|
```
|
2022-07-28 05:58:29 +02:00
|
|
|
|
|
|
|
|
|
❯ cat index.md
|
2022-07-31 13:25:50 +02:00
|
|
|
|
```markdown
|
2022-07-28 05:58:29 +02:00
|
|
|
|
# Open Sea
|
|
|
|
|
|
|
|
|
|
A static site generator
|
|
|
|
|
|
|
|
|
|
- [GitHub](https://github.com/zztkm)
|
2022-08-12 15:17:10 +02:00
|
|
|
|
|
|
|
|
|
[about page](./about.md)
|
2022-07-31 13:25:50 +02:00
|
|
|
|
```
|
2022-07-28 05:58:29 +02:00
|
|
|
|
|
2022-07-31 13:25:50 +02:00
|
|
|
|
❯ cat config.toml
|
|
|
|
|
```toml
|
|
|
|
|
title = "Open Sea"
|
2022-08-12 15:17:10 +02:00
|
|
|
|
description = "Takumi Tsuruta's home page"
|
|
|
|
|
baseUrl = 'https://zztkm.github.io/vss/'
|
2022-07-31 13:25:50 +02:00
|
|
|
|
```
|
|
|
|
|
|
2022-08-12 15:17:10 +02:00
|
|
|
|
❯ cat layouts/index.html
|
2022-07-31 13:25:50 +02:00
|
|
|
|
```html
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<title>@title</title>
|
2022-08-12 15:17:10 +02:00
|
|
|
|
<base href="@baseUrl">
|
|
|
|
|
<meta name="description" content="@description" />
|
2022-07-31 13:25:50 +02:00
|
|
|
|
</head>
|
2022-08-12 15:17:10 +02:00
|
|
|
|
|
2022-07-31 13:25:50 +02:00
|
|
|
|
<body>
|
|
|
|
|
@contents
|
|
|
|
|
</body>
|
2022-07-28 05:58:29 +02:00
|
|
|
|
```
|
2022-07-22 19:12:02 +02:00
|
|
|
|
|
|
|
|
|
Build your site
|
|
|
|
|
```
|
2022-08-12 15:17:10 +02:00
|
|
|
|
vss build
|
2022-07-22 19:12:02 +02:00
|
|
|
|
```
|
|
|
|
|
|
2022-08-12 15:17:10 +02:00
|
|
|
|
Output
|
2022-07-28 05:58:29 +02:00
|
|
|
|
```
|
2022-08-12 15:17:10 +02:00
|
|
|
|
❯ tree dist
|
|
|
|
|
dist
|
|
|
|
|
├── about.html
|
|
|
|
|
├── css
|
|
|
|
|
│ └── main.css
|
|
|
|
|
├── index.html
|
|
|
|
|
└── js
|
|
|
|
|
└── main.js
|
2022-07-31 13:25:50 +02:00
|
|
|
|
```
|
2022-07-28 05:58:29 +02:00
|
|
|
|
|
|
|
|
|
❯ cat dist/index.html
|
2022-07-31 13:25:50 +02:00
|
|
|
|
```html
|
2022-07-28 05:58:29 +02:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
2022-08-12 15:17:10 +02:00
|
|
|
|
<title>Open Sea</title>
|
|
|
|
|
<base href="https://zztkm.github.io/vss/">
|
|
|
|
|
<meta name="description" content="Takumi Tsuruta's home page" />
|
2022-07-28 05:58:29 +02:00
|
|
|
|
</head>
|
2022-08-12 15:17:10 +02:00
|
|
|
|
|
2022-07-28 05:58:29 +02:00
|
|
|
|
<body>
|
|
|
|
|
<h1>Open Sea</h1>
|
|
|
|
|
<p>A static site generator</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li><a href="https://github.com/zztkm">GitHub</a></li>
|
|
|
|
|
</ul>
|
2022-08-12 15:17:10 +02:00
|
|
|
|
<p><a href="./about.html">about page</a></p>
|
2022-07-28 05:58:29 +02:00
|
|
|
|
</body>
|
2022-08-14 12:45:16 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
|
|
Examples can be found at the [example](https://github.com/zztkm/vss/tree/main/example) directory.
|