Home

Awesome

Haxe Code Cookbook

Build Status

Sources for the Haxe Code Cookbook site, a community driven resource website for learning Haxe in practise.

The repository contains a static website generator, which converts markdown articles into a website. The project is being developed here on GitHub, feel free to contribute Haxe related code snippets and tutorials.

Structure

Contributing

Contributing changes

To contribute a change, you have to make a pull request. This can be done using the GitHub website or by fork/cloning the project.

Contributing using GitHub as online editor

This is the easiest way of doing small changes:

Contributing using a fork

This would also allow to test/see the changes before submitting which is also useful when you want to add new pages.

Creating articles

Please add/edit the articles (markdown files) in the assets folder and do a pull request. The scope of the cookbook includes the core language, the standard library, and also any libraries maintained by the Haxe Foundation.

Formatting

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

Other remarks

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

<pre> &lbrack;tags&rbrack;: / "class,array,json,building-fields" # Title of the page Description and explanation of the code. ## Implementation &grave;&grave;&grave;haxe class Main { // Code here } &grave;&grave;&grave; ## Usage Description of how to use/test the code. &grave;&grave;&grave;haxe class Test { // Code here } &grave;&grave;&grave; &gt; More on this topic: &gt; &gt; * &lbrack;Class field in Haxe Manual&rbrack;(https://haxe.org/manual/class-field.html) &gt; &gt; Author: &lbrack;Name&rbrack;(https://github.com/username) </pre>

Running a local copy

To run the project you can use Neko:

Call neko CodeCookBook.n to re-generate the output files.

Contributing to the generator

You need Haxe 3.4.2+ installed.

The static site generator source depends on hxtemplo and haxe-markdown.

Install the libraries using haxelib, run the following command in the root of the project:

haxelib install all

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

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