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

https://github.com/ninjascl/chercan

🐦 A simple static site generator with Wren
https://github.com/ninjascl/chercan

static-site-generator wren wren-language

Last synced: 3 months ago
JSON representation

🐦 A simple static site generator with Wren

Awesome Lists containing this project

README

          

:ext-relative:
:toc: macro
:toclevels: 4

# https://en.wikipedia.org/wiki/House_wren[Chercan] Static Site Generator

A simple https://en.wikipedia.org/wiki/Static_web_page[static site generator] using https://wren.io[Wren] programming language.

image:https://user-images.githubusercontent.com/292738/100270183-730e7980-2f36-11eb-88f6-b2a1929e23b9.png[https://www.avesdechile.cl/074.htm]

https://ninjas.cl[image:https://img.shields.io/badge/Ninjas-CL-green.svg?style=flat-square[Ninjas.cl]]

toc::[]

## Dependencies

Just https://github.com/wren-lang/wren-cli[_Wren CLI_] is needed. (Although _Python3_ is used for local server mode.).

- Installation:
- MacOS: `make wren-macos`
- Linux: `make wren-linux`

## 👩‍💻 Structure

```sh
.
├── LICENSE
├── Makefile
├── README.adoc
├── chercan
│   ├── build.wren
│   └── config.wren
├── content
│   ├── hello
│   │   ├── hello.adoc
│   │   └── hello.html
│   ├── hello.wren
│   └── index.wren
├── docs
│   ├── hello.html
│   ├── index.html
│   ├── normalize.css
│   └── sakura-vader.css
├── static
│   ├── normalize.css
│   └── sakura-vader.css
├── themes
│   └── default
│   ├── default.wren.html
│   ├── home.wren.html
│   └── partials
│   ├── footer.wren.html
│   └── header.wren.html
└── wren
└── run
```

## 🚀 Usage

Create your files inside `content`. Only root level `*.wren` files supported for now (_Wren CLI_ limitations).

- `./run new `: It will create a new _wren_ file inside `content`.

- `./run new:adoc `: It will create a new filename with its _*.wren_ and _*.adoc_ inside `content`.

- `./run build`: It will execute `make build`. (Builds _wren_ files).

- `./run build:adoc`: It would only build _asciidoc_ files. (Requires https://asciidoctor.org/[AsciiDoctor]).

- `./run build:all`: It will execute `make build-all` (Builds _wren_ and _asciidoc_ files).

- `./run serve`: It will execute `make serve`. (Requires _Python3_).

### Asciidoc

You could also create a _directory_ with https://asciidoctor.org/[Asciidoc] files and use the html output to append it to the file contents. It must have the same name as the _Wren_ file.

- Example _Page_:

```js

class Page {
static title {"Hello Chercan"}
static content {Asciidoc.read()}
}

return Page

```

### Themes

You can create your own _themes_. They are just _Wren_ files
that uses _Wren tags_ ``. You have all the _Wren_ power
in these templates.

Name them as `.wren.html`. Configure the default _theme_ in `chercan/config.wren`.

#### Example
```html







= "You can also use the shorthand echo tag" ?>


```

### Static

The `static` directory would contain any files (images, css, etc). They would be copied to the output directory.

## 📘 LICENSE
MIT

## 🤩 Credits

++++


Made with by

Ninjas.cl
.


++++