Welcome to the repository for Algorithmia's Developer Center. Here you will find guides, tutorials, sample apps, as well as some documentation on getting started with the API and basic set up.
These docs are built on Jekyll. Learn more over at the official Jekyll page.
You're going to need:
- Linux or OS X — Windows may work, but is unsupported.
- Ruby, version 2.3.0 or newer - Avoid
sudo gem install
at all costs - see rvm.io. - Bundler — If Ruby is already installed, but the
bundle
command doesn't work, just rungem install bundler
in a terminal.
sudo apt install ruby ruby-dev zlib1g-dev
- Fork this repository on Github.
- Clone your forked repository with
git clone https://github.com/YOURUSERNAME/dev-center.git
cd dev-center
- Install all dependencies:
bundle install
. If you are having trouble with some of the gems, try runningbundle update
, then runbundle install
again. - Start the test server:
bundle exec jekyll serve
You can now see the developer center at http://localhost:4000.
Note: the header and footer may not look right. This is inconsequential as they are stripped from the page before embedding into the webserver.
###Project Organization
All posts, layouts, includes, stylesheets, assets, and whatever else is grouped nicely under the root folder.
Find all pages under the _pages
directory, organized by URL route structure.
The compiled Jekyll site outputs to _site/
. Do not edit anything in this directory (or your changes will be lost).
The first thing that goes in each new post is the YAML front-matter. Below is an example of front-matter:
---
layout: article
title: "Example post!"
excerpt: "This is an example post."
date: 2016-01-05 11:39:38
categories: guides example
tags: [stuff, things]
# optional fields:
exclude_from_search: true #false by default
share: false #true by default
sitemap: false #true by default
---
For our purposes, the minimum you will need is layout
, title
, date
, & categories
. The other fields only need to be present if you are overriding the default.
Use excerpt
to set the text that appears in under the article title in the collection view of all articles. The template will automatically grab the first sentence if you do not set an excerpt, so you'll want to make sure that is appropriate or set one by hand. Note: If the first line of your post is a templating tag, it will not automatically pick up an excerpt.
In the case of author
, the default author can be found in _config.yml
. The default author is Algorithmia. If you need to add yourself as an author, please fill out your author data in _data/authors.yml
. Then, set the author field in your front-matter in the post.
### Plugins
This Jekyll site uses several plugins to help generate content and make the site extra-awesome. Included in the `_plugins` directory:
- `Emoji.rb`: Emojify your posts. Simply use the text version (like you would on GitHub) and this plugin will replace it with the emoji image. See the [emoji cheat sheet](http://www.emoji-cheat-sheet.com) for a full listing of emoji codes. :nail_care:
- `author_page_generator.rb`: This plugin will generate a page that lists all posts by a given author.
- `jekyll-lunr-search.rb`: Generates the index of all posts for the search function.
- `navmenu.rb`: A tag plugin to generate the side navigation menu.
- `strip.rb`: Removes some excess whitespace and new lines generated by the Liquid templating process.
Contributing
-------------
First, fork the repository and follow the instructions above to get set up. Make sure all your changes work locally. When you are ready, make a pull request to this repo and we will review the changes. Be sure to describe the changes, attach screenshots of any cosmetic changes, and if applicable, link to the open issue.
Need Help? Found a bug?
----------------
If you find a bug, can't follow the documentation or have a question – [submit an issue!](https://github.com/algorithmiaio/dev-center/issues)
We will respond to you or reach out for more information as soon as possible. And, of course, feel free to submit pull requests with bug fixes or changes.