Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdubourg001/ssgo
The minimalistic but flexible static site generator for Deno 🦕.
https://github.com/mdubourg001/ssgo
deno ssgo static-site-generator
Last synced: 27 days ago
JSON representation
The minimalistic but flexible static site generator for Deno 🦕.
- Host: GitHub
- URL: https://github.com/mdubourg001/ssgo
- Owner: mdubourg001
- License: mit
- Created: 2020-04-28T16:06:58.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T20:59:24.000Z (9 months ago)
- Last Synced: 2024-10-13T18:09:23.781Z (4 months ago)
- Topics: deno, ssgo, static-site-generator
- Language: TypeScript
- Homepage: https://ssgo.netlify.app
- Size: 1.51 MB
- Stars: 176
- Watchers: 9
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - mdubourg001/ssgo - The minimalistic but flexible static site generator for Deno 🦕. (deno)
- awesome-list - ssgo
README
![]()
# ssgo
The minimalistic but flexible static site generator.
**`ssgo`** is built with Deno and relies on it.

[](https://github.com/prettier/prettier)
## Documentation
Read the documentation at https://ssgo.netlify.app/docs.
## Quickstart
To install `ssgo` using Deno:
```bash
deno install --unstable --allow-read --allow-write --allow-net --allow-run -q https://deno.land/x/ssgo/ssgo.ts
```**To create a `ssgo` project** just run:
```bash
mkdir my-ssgo-project && cd my-ssgo-project
ssgo init
```Here's what a `ssgo` project looks like:
```plaintext
├── creators/ <- here go the scripts creating your pages
├── templates/ <- here go the templates of your pages
├── components/ <- here go your custom components
└── static/ <- here go your static files
```**To launch a build**: just run:
```bash
ssgo
```Your site will be built inside of the `dist/` directory.
**To start development mode** with file watching, and a hot reloaded dev server:
```bash
ssgo dev
```The `dist/` directory will be served over `http://localhost:5580`.
## Overview
`ssgo` basically relies on two types of files: **templates**, and **creators**.
**Templates** are the skeleton of your pages and are simply HTML files living inside the `templates/` directory (and its subdirectories):
```html
{{ title }}
Hello, ssgo !
Just run
ssgo dev
to get started !
```
**Creators** are like page factories. Using a `buildPage` function given by `ssgo`, they use **templates** and datas to build pages. Creators live in the `creators/` directory (and its subdirectories):
```typescript
// creators/my-creator.tsimport type { BuildPage } from "https://deno.land/x/ssgo/mod.ts"
import { fetchTitle } from "../src/api.ts"export default async function (buildPage: BuildPage) {
const title = await fetchTitle()buildPage(
"my-template.html" // template to use to build the page,
{ title: title } // data to use to build the page,
{ filename: "index.html", dir: "" } // build options
)
}
````ssgo` also provides much more cool stuffs like components, automatic static files management, or just-in-time page build in dev mode. You can learn more about all this things by [reading the documentation](https://ssgo.netlify.app/docs).
## Roadmap
- [ ] Pass undefined if variable doesn't exist when passing props
- [ ] Use CWD's `.tsconfig.json` for typescript compilation if exists
- [ ] Add a support for a config file (.ssgorc, ssgo.config.js)
- [ ] Provide a way to opt out of static ressources resolution on a per-file basis