Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ emoji: "📖"

# About vss

vss is a static site generator written in Go. It is designed to be simple and easy to use.
vss is a static site generator written in Rust. It is designed to be simple and easy to use. It was originally written in Go but was rewritten in Rust with v0.16.0 for better performance and reliability.
19 changes: 14 additions & 5 deletions site/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A static site generator.

![vss-logo](./image.gif)

- [GitHub](https://github.com/veltiosoft/go-vss)
- [GitHub](https://github.com/veltiosoft/vss)

## Features

Expand All @@ -20,26 +20,35 @@ For Mac & Linux

latest version
```sh
curl -sfL https://raw.githubusercontent.com/veltiosoft/go-vss/main/scripts/install.sh | sh
curl -sfL https://raw.githubusercontent.com/veltiosoft/vss/main/scripts/install.sh | sh
```

specific version
```sh
curl -sfL https://raw.githubusercontent.com/veltiosoft/go-vss/main/scripts/install.sh | sh -s v0.0.1
curl -sfL https://raw.githubusercontent.com/veltiosoft/vss/main/scripts/install.sh | sh -s v0.0.1
```

For Windows (with PowerShell)
```powershell
irm https://raw.githubusercontent.com/veltiosoft/go-vss/main/scripts/install.ps1 | iex
irm https://raw.githubusercontent.com/veltiosoft/vss/main/scripts/install.ps1 | iex
```

specific version
```powershell
$v="v0.0.1"; irm https://raw.githubusercontent.com/veltiosoft/go-vss/main/scripts/install.ps1 | iex
$v="v0.0.1"; irm https://raw.githubusercontent.com/veltiosoft/vss/main/scripts/install.ps1 | iex
```

## Contents

- [about page](./about)
- post
- [first](./post/first)

## Browse by Tag

Explore posts organized by topic:

- [release](/tags/release/) - Release announcements and updates
- [features](/tags/features/) - New features and improvements
- [major](/tags/major/) - Major releases and changes
- [meta](/tags/meta/) - Meta posts and discussions
153 changes: 153 additions & 0 deletions site/layouts/tags/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Posts tagged "{{tag_name}}" - {{site_title}}</title>
<meta name="description" content="Posts tagged with {{tag_name}} - {{site_description}}">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: #333;
background-color: #f9f9f9;
}

header {
background-color: #fff;
border-bottom: 1px solid #eee;
padding: 2rem;
margin-bottom: 2rem;
}

header h1 {
font-size: 2rem;
margin-bottom: 0.5rem;
}

header p {
color: #666;
}

main {
max-width: 800px;
margin: 0 auto;
padding: 2rem;
}

main h1 {
font-size: 2rem;
margin-bottom: 2rem;
color: #222;
}

.post-list {
list-style: none;
}

.post-item {
background-color: #fff;
border: 1px solid #eee;
border-radius: 4px;
padding: 1.5rem;
margin-bottom: 1.5rem;
transition: box-shadow 0.2s;
}

.post-item:hover {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-item h2 {
font-size: 1.5rem;
margin-bottom: 0.5rem;
}

.post-item h2 a {
color: #0066cc;
text-decoration: none;
}

.post-item h2 a:hover {
text-decoration: underline;
}

.post-meta {
font-size: 0.9rem;
color: #666;
margin-bottom: 0.5rem;
}

.post-description {
color: #555;
margin-top: 0.5rem;
}

footer {
background-color: #fff;
border-top: 1px solid #eee;
padding: 2rem;
text-align: center;
color: #666;
margin-top: 4rem;
}

.back-link {
display: inline-block;
margin-bottom: 1rem;
color: #0066cc;
text-decoration: none;
}

.back-link:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<header>
<h1>{{site_title}}</h1>
<p>{{site_description}}</p>
</header>

<main>
<a href="/" class="back-link">← Back to Home</a>

<h1>Posts tagged "{{tag_name}}"</h1>

{{#posts}}
<ul class="post-list">
{{/posts}}
{{#posts}}
<li class="post-item">
<h2><a href="{{url}}">{{title}}</a></h2>
{{#pub_datetime}}
<p class="post-meta">
<time datetime="{{pub_datetime}}">{{pub_datetime}}</time>{{#author}} by {{author}}{{/author}}
</p>
{{/pub_datetime}}
{{#description}}
<p class="post-description">{{description}}</p>
{{/description}}
</li>
{{/posts}}
{{#posts}}
</ul>
{{/posts}}
Comment on lines +124 to +142
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

このMustacheのループ構文は正しくありません。現在の実装は3つの独立した {{#posts}} ループで構成されており、posts 配列の要素数だけ <ul> タグ、<li> タグ、</ul> タグがそれぞれレンダリングされてしまいます。これにより、不正なHTMLが生成されます。

投稿リストを条件付きで(投稿がない場合は何も表示せず、ある場合のみリストを表示する)正しくレンダリングするには、posts 配列が空でないことを確認してから <ul> を開始し、その中で <li> をループする必要があります。

{{#posts.0}} を使って配列の最初の要素が存在するかどうかをチェックすることで、これを実現できます。この方法は、posts が空の場合に {{^posts}} ブロックが正しく機能することも保証します。

        {{#posts.0}}
        <ul class="post-list">
            {{#posts}}
            <li class="post-item">
                <h2><a href="{{url}}">{{title}}</a></h2>
                {{#pub_datetime}}
                <p class="post-meta">
                    <time datetime="{{pub_datetime}}">{{pub_datetime}}</time>{{#author}} by {{author}}{{/author}}
                </p>
                {{/pub_datetime}}
                {{#description}}
                <p class="post-description">{{description}}</p>
                {{/description}}
            </li>
            {{/posts}}
        </ul>
        {{/posts.0}}


{{^posts}}
<p>No posts found with this tag.</p>
{{/posts}}
</main>

<footer>
<p>&copy; 2025 {{site_title}}</p>
</footer>
</body>
</html>
1 change: 1 addition & 0 deletions site/posts/first.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "First release"
description: "最初のリリース"
emoji: "🎉"
tags: ["meta"]
---

# First release
Expand Down
3 changes: 3 additions & 0 deletions site/posts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ emoji: "📝"

# Posts

- [v0.18.0 - Tag Page Generation](v0.18.0)
- [v0.17.0 - Allow Dangerous HTML](v0.17.0)
- [v0.16.0 - Rust Migration](v0.16.0)
- [v0.8.0](v0.8.0)
107 changes: 107 additions & 0 deletions site/posts/v0.16.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
title: "v0.16.0 - Rust Migration"
description: "vss is now written in Rust"
emoji: "🦀"
pub_datetime: 2024-12-15
tags: ["release", "major"]
---

# v0.16.0 - Rust Migration

We're excited to announce that vss has been completely rewritten in Rust! This is a major milestone for the project.

## Why Rust?

After using vss in Go for several years, we decided to migrate to Rust for the following reasons:

### Performance
Rust's zero-cost abstractions and compile-time optimizations provide excellent runtime performance without sacrificing readability or safety.

### Reliability
Rust's type system and borrow checker catch many classes of bugs at compile time, making the codebase more robust and maintainable.

### Memory Safety
Rust prevents entire categories of bugs like null pointer exceptions, buffer overflows, and data races without garbage collection overhead.

## What's Changed?

### User Perspective

From a user's perspective, vss works exactly the same way:

- All existing features are maintained
- Configuration format is compatible
- Command-line interface is unchanged
- Markdown and template processing work identically

You can upgrade from Go-based vss to Rust-based vss without any changes to your site configuration or content.

### Developer Perspective

Internally, the codebase has been completely rewritten:

- New module structure optimized for Rust
- Better separation of concerns
- Improved error handling
- Enhanced type safety

## Performance Improvements

The Rust implementation provides:

- Faster build times for large sites
- Lower memory footprint
- More efficient asset processing
- Better concurrent file handling

## Backward Compatibility

This release maintains backward compatibility with:

- Existing `vss.toml` configurations
- Markdown content files
- Template files (Mustache)
- Post front matter format

All existing sites should continue to work without modifications.

## Migration Guide

### For Users

If you're using vss with Go, upgrading is straightforward:

1. Download the new Rust-based binary
2. Replace your old `vss` binary
3. Run your existing commands - everything works the same!

No changes to configuration or content are needed.

### For Contributors

If you were contributing to the Go version, we welcome your help with the Rust version! The new codebase is designed to be approachable while maintaining Rust's safety guarantees.

Check out the [repository](https://github.com/veltiosoft/vss) for contribution guidelines.

## Future Direction

With the Rust foundation in place, we can now:

- Add new features more confidently
- Improve performance further
- Expand platform support
- Build additional tools around vss

## Known Limitations

While we've maintained compatibility with the Go version, there are some differences:

- Code highlighting configuration has changed
- Some internal APIs differ (not user-facing)
- Build process requires Rust toolchain for contributors

## Thanks

Thank you to everyone who has used and contributed to vss over the years. This migration wouldn't have been possible without the feedback and support from the community.

For more information, see the [CHANGELOG](https://github.com/veltiosoft/vss/blob/main/CHANGELOG.md#v0160).
Loading