/codehub

3scale snippet library

Primary LanguageJavaScriptMIT LicenseMIT

Codehub Build Status

How to contribute

  1. Clone the repository https://github.com/3scale/codehub.git
  2. Create a new page under _posts directory with name following the pattern: YYYY-MM-DD-YourSnippetTitle.html, where YYYY-MM-DD is the publish date of the snippet.
  3. Add the front matter code at the top of the snippet file following the schema:
---
layout: default
title: YOUR_SNIPPET_TITLE
categories: CATEGORIES_UNDER_WHICH_THE_SNIPPET_BELONGS
comments: true
excerpt: EXCERPT_OF_THE_SNIPPET
---
  1. Add the snippet description:
<h1>{{ page.title }}</h1>
<dl>
<dt>Author:</dt>
<dd><a href="LINK-TO-GITHUB-ACCOUNT">AUTHOR</a></dd>
<dt>Version:</dt>
<dd>SNIPPET'S_VERSION_NUMBER</dd>
<dt>Language:</dt>
<dd>PROGRAMMING_LANGUAGE_THE_SNIPPET_IS_WRITTEN_IN</dd>
</dl>
<p><strong>Description:</strong>A SHORT DESCRIPTION</p>
  1. Add the snippet code together with some additional comments/descriptions. The code itself will go between {% highlight LANG linenos=table %} and {% endhighlight %} liquid tags. In the place of the LANG placeholder you should put the proper language identifier, e.g. lua. The fill list of the supported languages can be found here under the Short names parameter. NOTE: If the snippet is containing some liquid tags, you should wrap them between {% raw %} and {% endraw %} tags.
  2. Create a new branch for your snippet git checkout -b BRANCHNAME
  3. Commit the branch to the repository:
git add FILENMAE
git commit -m "COMMIT DESCRIPTION"
git push
  1. Create a pull request in the CodeHub repository.
  2. Wait until it is merged and deployed

What if I don't know how to use Git?

Don't worry, you can file your idea as an issue here.

Misc

The project is created using Jekyll blogging platform using the jekyll-lunr-js-search plugin.