H2GIS's website is built using Jekyll and Github pages. Consult Jekyll's documentation first, especially the section on YAML front matter. Or if you're really impatient, just take a look at the source of one of the existing pages on the website.
To install Jekyll and serve the website locally, consult GitHub's help page Using Jekyll with Pages.
To contribute, fork H2GIS and clone it locally. We will assume your username is
user
.
~ $ git clone https://github.com/user/h2gis.git
The website is located on the branch gh-pages
. So checkout a new branch
work
which tracks your fork's gh-pages
branch.
~ $ cd h2gis
~/h2gis $ git checkout -b work origin/gh-pages
Make changes, commit and push to your fork as usual.
~/h2gis $ git commit -m "Made some changes"
~/h2gis $ git push origin work
When you are ready, submit a pull request from user/work
to orbisgis/gh-pages
.
Your work will be peer-reviewed and accepted when approved.
Each function's documentation contains three sections: Signature(s), Description and Example(s).
- Global comments:
- When refering to geometries in a global sense (and not as WKT), write
Geometry or Geometries (and not
GEOMETRY
). But we still writeGEOMETRY
in case 1.ii. - WKT geometries should be in UPPERCASE (
POLYGON
and notPolygon
orpolygon
). - Function names should be written as
ST_CompactnessRatio
and notst_compactnessratio
orST_COMPACTNESSRATIO
. - Put spaces after commas.
- When refering to geometries in a global sense (and not as WKT), write
Geometry or Geometries (and not
- Signature(s) - Give all possible function signatures.
- Write Signature if there is only one.
- Include a semicolon at the end of the signature.
- Primitives should be in lowercase (
double
and notDouble
orDOUBLE
). - Do not skip lines between signatures.
- Description and
description:
- Description - Explain what the function does.
- Reference the various
variables
included in the signature. - Conjugate the verb in third-person singular tense (Rotates and not Rotate).
- Reference the various
description:
field - Include a short summarizing description in the front-matterdescription:
field.- Do not reference variables.
- Do not conjugate the verb (Rotate and not Rotates).
- Description - Explain what the function does.
- Example(s) - Insert examples in SQL.
- Write Example if there is only one.
- All SQL keywords should be in UPPERCASE.
- SQL variables should be in lowercase.
- Insert illustrations as necessary.
- Tables may be written in Markdown or SQL comments. If you choose SQL comments, use proper alignment.
- Align long geometries vertically by inserting linebreaks as necessary.
Good:
-- Answer: LINESTRING(0.3839745962155607 2.0669872981077813,
-- 2.1160254037844384 1.0669872981077806,
-- 2.6160254037844384 1.933012701892219)
Bad:
-- Answer: LINESTRING(0.3839745962155607 2.0669872981077813, 2.1160254037844384 1.0669872981077806, 2.6160254037844384 1.933012701892219)