Nice

Cross platform static site generator
https://github.com/gmisail/Nice

To install, run:

haxelib install Nice 1.4.1 

See using Haxelib in Haxelib documentation for more information.

README.md

Nice

Installation

Nice is distributed through haxelib. To install, type into terminal:

haxelib install nice

To generate a new site, first create a new folder. Then go to Terminal / Command Prompt:

` cd your-site-path haxelib run nice new`

To build your site, run this command:

` haxelib run nice build`

Theming

Nice does not come with a pre-installed theme or design. The user must design their own theme using HTML & the Haxe Templating language.

The following variables are exposed from Nice to the templates:

  • ::title:: - the title of the page / post
  • ::body:: - the body text of the page / post
  • ::posts:: - an array of the posts
  • ::pages:: - an array of the pages
  • ::name:: - name of the current file
  • ::date:: - date of the current post
  • ::tags:: - tags used by all of the posts. Duplicate tags are removed.
  • ::postTag:: - tags used by the current post.

You can access these variables through the Haxe Templating Engine. The template for every Nice page is located in layout/index.html.

Project Structure

A template for a Nice website is located in /export. Nice has a few requirements:

  • assets/ - static files that are copied over, e.g. images
  • layout/ - this is where your template file lives. Your template file must be called index.html
  • pages/ - this folder holds all of the pages. Pages are like posts without tags or a date.
  • pages/404.html - 404 file
  • pages/home.html - home page / page located at the root of your site. This file will be renamed to index.html and placed in the root.
  • posts/ - this folder holds all of the posts.
  • public/ - this folder is where Nice spits out your generated site
  • config.json - config file for your Nice site. Configure site paths, site title, etc.
Contributors
gmisail
Version
1.4.1
Published
1 week ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github