The Haxe Code Cookbook
Haxe CSS JavaScript Shell
Latest commit 3100ff1 Jan 5, 2017 @markknol markknol deferred script loading
Permalink
Failed to load latest commit information.
assets deferred script loading Jan 5, 2017
src trace total articles Jan 3, 2017
.gitignore
.travis.yml dont use nodejs yet Sep 23, 2016
CodeCookBook.hxml internal code restructuring Nov 9, 2016
CodeCookBook.hxproj
CodeCookBook.n internal code restructuring Nov 9, 2016
CodeCookBookNodeJS.hxml
README.md Update README.md Jan 2, 2017
RunCodeCookBook.hxml internal code restructuring Nov 9, 2016
deploy.sh

README.md

Haxe Code Cookbook

Build Status

Sources for the Haxe Code Cookbook site

This project contains a static website generator, it is mixing templates and markdown files into plain HTML files.

Structure

Contributing articles

Please add/edit the articles (markdown files) in the assets folder and do a pull request.

Formatting

It would be nice if you keep the formatting of the code in the same style as used already:

  • Braces on same line
  • Two-space indentation
  • No type-hints for local variables and function return unless it's instructive
  • Type-hints for fields
  • Type-hints for function arguments unless it's very obvious
  • Judicious use of extra line-breaks to avoid ugly automatic breaks (check the output)
Other remarks
  • The first heading is used in the navigation. Keep this title short.
  • The first paragraph is used as description. Describe what the content of the article is about.
  • Tag the article using [tags]: / "tag1,tag2" (no spaces). Try to use an existing tag.
  • Mention the author / sources at the bottom of the page.
  • If you want to include a try.haxe.org code snippet use [tryhaxe](http://try.haxe.org/embed/76f24).
  • If you want to include a YouTube video use [youtube](https://www.youtube.com/watch?v=dQw4w9WgXcQ).
  • If possible, link to related pages in the Haxe Manual / API documentation.
  • If you want to use images or other includes, create a folder called assets in the same directory as the article and link to that.

This would be a typical template to use. Use ```haxe for syntax highlighting:

[tags]: / "class,array,json,building-fields"

# Title of the page

Description and explanation of the code.

## Implementation
```haxe
class Main {
  // Code here
}
```

## Usage
```haxe
class Test {
  // Code here
}
```

> More on this topic: 
> 
> * [Class field in Haxe Manual](https://haxe.org/manual/class-field.html)
> 
> Author: [Name](https://github.com/username)

Running a local copy

To run the project you need Haxe.

Call build-site.bat to re-generate the output files.

Contributing to the generator

You need Haxe 3.2+ installed.

The static site generator source depends on hxtemplo and markdown. Install from haxelib:

haxelib install CodeCookBook.hxml

The CSS files are compressed using less. Install from npm:

npm install -g less
npm install -g less-plugin-clean-css