So you got something you want to tell the Console?
Excellent, we’d love to add it here for all to benefit. The best way would be to go to the GitHub Repo and add it yourself. If you’re not familiar with GitHub, you can also contact me on Twitter me about your snippet and I’ll add it for you.
How to contribute
- Fork the repo
- Add your snippet to the
_scripts
folder - Snippets are Markdown files with a YAML front matter.
- You can take a look at the existing snippets or take the
template.md
file and alter it. - Once you have your snippet, create a pull request and we’re off to the races
Here is what the template looks like with comments to explain what each thing means.
---
# This is the title
title: Dear Console, say hello world
# This is what the link will display on the idex page
name: Say hello world
# This is the code example that will be added to the copy buttons
# Every instance of ' needs to be replaced with ± and double
# quotes should not be used
codeexample: 'console.log(±hello world±)'
# tags for the example
tags: logging hello console
# choose the default layout to render an HTML document
layout: default
author: Your name
authorlink: your url
---
{% highlight javascript %}
console.log('hello world')
{% endhighlight %}
Thanks for contributing!