Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perlun/sitegen
Simple static site generator with Handlebars, Markdown and YAML support
https://github.com/perlun/sitegen
Last synced: about 2 months ago
JSON representation
Simple static site generator with Handlebars, Markdown and YAML support
- Host: GitHub
- URL: https://github.com/perlun/sitegen
- Owner: perlun
- License: mit
- Created: 2020-06-22T20:40:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-21T03:57:26.000Z (almost 2 years ago)
- Last Synced: 2024-10-27T23:28:20.638Z (3 months ago)
- Language: C#
- Homepage:
- Size: 76.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# README
## Examples of sites using `sitegen`
- https://github.com/perlun/halleluja.nu
## Building sitegen
```shell
$ dotnet build
```## `config.yaml` format
```yaml
config:
source_dir: src
layouts_dir: src/_layouts
output_dir: out
posts_dir: src/_posts
multiple_languages: truesite:
title: halleluja.nu
```See the [TopLevelConfig](SiteGenerator.ConsoleApp/Models/Config/TopLevelConfig.cs) class for details. YAML keys are converted from `snake_case_` to `PascalCase`, so `source_dir` in the `config.yaml` corresponds to the `SourceDir` property in [TopLevelConfig](SiteGenerator.ConsoleApp/Models/Config/Config.cs) and so forth.
## Variables available in Handlebars files
- `now` - the current `DateTime`, as a .NET DateTime object.
- `site` - the `site` section in `config.yaml`
- `blog_posts` - a list of all blog posts.## Similar projects
See also the following C#/.NET-based static site generators:
- https://github.com/krompaco/record-collector - built on top of ASP.NET Core MVC
- https://github.com/tomzorz/lastpage - .NET Core static website generator based on Mustachio## License
[MIT](LICENSE)