• Stars
    star
    112
  • Rank 312,240 (Top 7 %)
  • Language Haxe
  • Created over 8 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Haxe Code Cookbook - A community driven resource website for learning Haxe in practise

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

  • The actual articles are in assets/content/cookbook, organized per folder.
  • The html template files are in assets/content/.
  • The static files (css, js, images) files are in assets/includes/.
  • The Haxe source files of the generator are in src/.
  • The website-generated content will output in output/ (excluded from git).

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:

  • Navigate to an article on https://code.haxe.org and press the edit button on any page: image
  • You are redirected to GitHub. Once you have an account and are logged in, you can make the change in the online editor.
  • Set the description / what you changed and press the Request change button: image
  • A pull request will be created. GitHub makes a fork for you automatically.
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.

  • Make a fork (on GitHub) of the project.
  • Checkout your repo on your machine, create a new branch for the pull request.
  • Make the changes in that new branch.
  • Push the commits (they go to your fork).
  • On GitHub, you make a pull request from your fork's branch to the original repo.

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:

  • 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.
  • Use > Author: [Name](https://github.com/username) to mark yourself as author of the article. The other contributors are inferred from git commits.
  • 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](https://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

Description of how to use/test the code.

```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 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

More Repositories

1

haxe

Haxe - The Cross-Platform Toolkit
Haxe
6,166
star
2

hashlink

A virtual machine for Haxe
C
810
star
3

neko

The Neko Virtual Machine
C
553
star
4

hxcpp

Runtime files for c++ backend for haxe
C++
297
star
5

hscript

Parser and interpreter for Haxe expressions
Haxe
262
star
6

intellij-haxe

Haxe plugin for IntelliJ Platform based IDEs (IDEA, Android-Studio)
Java
220
star
7

HaxeManual

The official Haxe manual
Haxe
218
star
8

as3hx

Convert AS3 sources to their Haxe equivalent
Haxe
174
star
9

haxelib

The Haxe library manager
Haxe
172
star
10

hxnodejs

Haxe externs for working with node.js
Haxe
171
star
11

dox

Haxe documentation generator.
Haxe
146
star
12

format

Various files formats support for Haxe
Haxe
131
star
13

haxe-evolution

Repository for maintaining proposal for changes to the Haxe programming language
111
star
14

haxe.org

The haxe.org website
HTML
81
star
15

haxe-markdown

A Markdown parser in Haxe.
Haxe
63
star
16

hxcs

Haxe C# support library. Build scripts and support code.
Haxe
57
star
17

record-macros

Macro-based ORM (object-relational mapping)
Haxe
49
star
18

hxcpp-debugger

Cross-platform debugger for hxcpp
Haxe
49
star
19

crypto

Cross platform cryptographic functions for Haxe
Haxe
48
star
20

npm-haxe

Install Haxe using Node Package Manager aka npm
JavaScript
46
star
21

hxjava

Haxe Java support library. Build scripts and support code.
Haxe
46
star
22

tora

NekoVM Application Server
Haxe
30
star
23

docker-library-haxe

Docker official image for Haxe
Dockerfile
28
star
24

ocamllibs

Various OCaml Libraries
OCaml
24
star
25

Project-Management

Project management and communication
20
star
26

haxedevelop.org

Website content and sources
Haxe
19
star
27

try.haxe.org

run Haxe code snippets in your browser
Haxe
18
star
28

hx3compat

Haxe 3 compatibility lib for Haxe 4
Haxe
16
star
29

html-externs

HTML externs for Haxe
IDL
15
star
30

hxnodelibs

Haxe
14
star
31

ocamhaxe

OCaml distribution for Haxe compilation
Haxe
11
star
32

haxe-debian

Debianizing Haxe
Haxe
11
star
33

api.haxe.org

Haxe API documentation
Haxe
10
star
34

hxgithub

Haxe
8
star
35

haxe-terraform

Haxe Foundation infrastructure
HCL
5
star
36

nekovm.org

The website for NekoVM.
Haxe
5
star
37

neko-debian

Debianizing Neko
C
4
star
38

build.haxe.org

Snapshot build storage web UI
Haxe
3
star
39

hx4compat

Haxe 4 compatibility lib for Haxe 5, or maybe the other way aroun?
Haxe
3
star
40

haxe.org-comments

Repository to collect comments of our haxe.org websites
2
star
41

hashlink.haxe.org

HTML
2
star
42

homebrew-haxe

Haxe formulae for the Homebrew package manager
Ruby
1
star
43

summit.haxe.org

Haxe
1
star
44

haxe-deps

A luarocks spec for the dependencies required for the Haxe Lua target
Lua
1
star
45

haxe-choco

Chocolatey Haxe package
Haxe
1
star