Skip to content
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

add t2006 ssg #963

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
73 changes: 73 additions & 0 deletions src/site/generators/t2006.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: t2006
repo: cinnabar-forge/t2006
homepage: https://github.com/cinnabar-forge/t2006
language:
- JavaScript
license:
- ISC
templates:
- JSON
description: A small, low-opinionated static site generator with sections and items
---

A small, low-opinionated static site generator with sections and items.

You can change sections quantity, text, images, colors (dark-theme ready) and fonts for headers and text.

Sample site: [page](https://timurrin.github.io/) and [repo](https://github.com/TimurRin/timurrin.github.io).

## Configuration

t2006 is driven by two main configuration files:

- `data.json`: Defines the structure and content of your site.
- `style.json`: Specifies the visual styling of your site.

Both files examples can be found inside `sample` folder.

`data.json` structure:

```json
{
"title": "Title text",
"description": "HTML meta description text",
"header": {
"image": "https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/why.svg",
"title": "TITLE TEXT",
"subtitle": "Subtitle text",
"about": "About text"
},
"sections": [
{
"title": "SECTION TEXT",
"items": [
{
"name": "Line example",
"image": {
"path": "https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/beacon.svg"
},
"links": [
{ "text": "link", "url": "https://example.com/" }
],
"extra": "extra info"
},
{
"name": "Card example",
"text": "If you need description",
"links": [
{ "text": "foo", "url": "https://example.com/" },
{ "text": "bar", "url": "https://example.com/" }
]
}
]
}
]
}
```

## Usage

```bash
npx t2006 --input "path/to/json/data/files" --output "path/to/html/output"
```