Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hilmanski/mini-SSG

Mini SSG (static site generator) with minimal and beautiful syntax
https://github.com/hilmanski/mini-SSG

html ssg

Last synced: about 2 months ago
JSON representation

Mini SSG (static site generator) with minimal and beautiful syntax

Awesome Lists containing this project

README

        

# Status
Currently, there's no plan to updating this project in the near future.

Take a look other similar project:
- [Static by DevDojo](https://github.com/thedevdojo/static)

# Mini SSG
Simple static site generator, to prevent you write DRY HTML files with minimal syntax
Built with Nodejs
Inspired by Laravel Blade Template and Sergey.cool SSG

**Update/Log**
v 0.2.2: Add livereload, running npm run dev, will auto reload browser when changes occured
v 0.2.1: Bug fixes: section value include "comma sign" allowed
v 0.1.9: All static assets live in "dev/static".

## Use Case
For someone who works with a lot of html files and many reuse components (header, footer, etc.) or want to use general layout

## Why and How to use it
Check out [mini SSG website](https://minissg.vercel.app)

## Syntax preview

Import page
```html
@import(header)

Your awesome content

@import(footer)
```

Use general layout
```html
@layout(base)

@section(title, Your Page Title)

@section(main)

Hey.. meet your awesome content

@endsection
```

How layout looks like
```html


@attach(title)

@attach(main)

```

Layout can include multiple imports
```html


@attach(title)

@import(header)
@attach(main)
@import(footer)

```

Need components? don't worry!
```html

Other stuff

@component(story)
@slot(fullDiv)

😀 I'm slot with name text


I can be very complex element


@endslot

@slot(textOnly)
I can also be just text like this
@endslot
@endcomponent
```

How your component looks like
```html




@attach(fullDiv)

@attach(textOnly)




```

If attach need a default value as fallback
```html
@attach(title, My default title)
```

All static assets or files like CSS, javascript, image and stuff can live in "static" folder

That's it! learn more at [mini SSG website](https://minissg.vercel.app/tour)