Skip to content

flashultra/haxe-cookbook

Repository files navigation

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 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]: / "enum,pattern-matching,macro,macro-function"

# 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: <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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published