- Clone the repository
https://github.com/3scale/codehub.git
- 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.
- 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
---
- 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>
- 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 theLANG
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. - Create a new branch for your snippet
git checkout -b BRANCHNAME
- Commit the branch to the repository:
git add FILENMAE
git commit -m "COMMIT DESCRIPTION"
git push
- Create a pull request in the CodeHub repository.
- Wait until it is merged and deployed
Don't worry, you can file your idea as an issue here.
The project is created using Jekyll blogging platform using the jekyll-lunr-js-search plugin.