-
Notifications
You must be signed in to change notification settings - Fork 0
site/ ディレクトリを最新化する #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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}} | ||
|
|
||
| {{^posts}} | ||
| <p>No posts found with this tag.</p> | ||
| {{/posts}} | ||
| </main> | ||
|
|
||
| <footer> | ||
| <p>© 2025 {{site_title}}</p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| title: "First release" | ||
| description: "最初のリリース" | ||
| emoji: "🎉" | ||
| tags: ["meta"] | ||
| --- | ||
|
|
||
| # First release | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この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}}