vss/README.md

121 lines
1.8 KiB
Markdown
Raw Normal View History

2022-07-22 19:12:02 +02:00
# vss
A static site generator
## 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
- Create site content with markdown
- Easy to use
2022-07-26 19:16:41 +02:00
## Install
```
git clone https://github.com/zztkm/vss.git
cd vss
v vss.v
```
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>
```