Skip to content

Latest commit

 

History

History
131 lines (97 loc) · 3.29 KB

README.adoc

File metadata and controls

131 lines (97 loc) · 3.29 KB

Chercan Static Site Generator

Dependencies

Just Wren CLI is needed. (Although Python3 is used for local server mode.).

  • Installation:

  • MacOS: make wren-macos

  • Linux: make wren-linux

👩‍💻 Structure

.
├── 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 <name>: It will create a new wren file inside content.

  • ./run new:adoc <name>: 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 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 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:

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 <?wren ?>. You have all the Wren power in these templates.

Name them as <name>.wren.html. Configure the default theme in chercan/config.wren.

Example

<!DOCTYPE html>
<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type">
  </head>
  <body>
    <h1>
      <?wren echo.call(page.title) ?>
      <small><?= "You can also use the shorthand echo tag" ?></small>
    </h1>
  </body>
</html>

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 .