LoopBack project site - now with documentation!
CSS HTML JavaScript Shell Ruby Liquid GCC Machine Description
Latest commit b03e5de Jan 21, 2017 @crandmck crandmck Remove unused files
Permalink
Failed to load latest commit information.
_data Update for loopback-cli release (#254) Jan 20, 2017
_includes Update 2.x pages for lb cli Jan 20, 2017
_layouts Update 2.x pages for lb cli Jan 20, 2017
contributing Fix typo for contributing Nov 16, 2016
css Update 2.x pages for lb cli Jan 20, 2017
doc LB 3 GA Dec 21, 2016
examples Update for loopback-cli release (#254) Jan 20, 2017
fonts Add doc site POC Aug 2, 2016
getting-started Update for loopback-cli release (#254) Jan 20, 2017
images Pull logo images from WP into this repo Dec 2, 2016
js hide toc when there is no content Nov 10, 2016
pages Remove unused files Jan 21, 2017
resources Update for loopback-cli release (#254) Jan 20, 2017
scripts-pdf Add doc site POC Aug 2, 2016
style use https for ghbtns URLs Mar 22, 2016
users Use Jekyll templates May 17, 2016
.gitignore packaging readme updating into run script Sep 23, 2016
.markdownlintrc adding markdown linting script Oct 7, 2016
404.md Update TOCs to use toc_level and related Nov 11, 2016
CNAME Added CNAME file back Oct 1, 2014
Gemfile Add redirect-from gem and some redirects Nov 10, 2016
Gemfile.lock Add redirect-from gem and some redirects Nov 10, 2016
ISSUE_TEMPLATE.md Create ISSUE_TEMPLATE.md Sep 28, 2016
Jenkinsfile Added another git add command Nov 10, 2016
LICENSE Add license Oct 11, 2016
README.md Add license Oct 11, 2016
_config.yml Update doc for sidebars and misc Nov 10, 2016
favicon.ico New favicon Oct 2, 2014
index.html Update for loopback-cli release (#254) Jan 20, 2017
package.json adding markdown linting script Oct 7, 2016
update-community-readmes.sh Add script to get community readmes Nov 10, 2016
update-readmes.sh Update Oracle docs and use READMEs (#250) Jan 16, 2017

README.md

loopback.io

LoopBack community site, http://loopback.io. This website now includes the LoopBack documentation.

NOTE: The website is served from the gh-pages branch.

This repository is provided under the MIT License.

Setup

To preview the website locally:

  1. Install Ruby and Bundler if you don't have them already.

  2. cd to the repository directory and run the following command:

$ cd loopback.io
$ bundle install

Bundler will look in the Gemfile for which gems to install. The github-pages gem includes the same version of Jekyll and other dependencies as used by GitHub Pages, so that your local setup mirrors GitHub Pages as closely as possible.

Run and view site locally

Run Jekyll using the following command:

$ bundle exec jekyll serve

Then, load http://localhost:4001/ on your browser.

NOTE: The docs part will be at http://localhost:4001/doc. It's not yet linked from the main "overview" part of the site, but will be once we launch (RSN).

Formatting

Jekyll uses a variant of Markdown known as Kramdown.

Jekyll uses the Liquid template engine for templating.

Incorporating external READMEs

The documentation incorporates README files from a number of LoopBack example repositories. We use the get-readmes utility to fetch the README files directly from GitHub. Here is how to update the READMEs

  1. npm install (first time/setup only)
  2. npm run fetch-readmes

From there, the README markdown files are incorporated into documentation articles using the standard Jekyll "include" syntax as follows (for example):

---
title: "Angular example app"
lang: en
layout: readme
source: loopback-example-angular
keywords: LoopBack
tags:
sidebar: lb2_sidebar
permalink: /doc/en/lb2/Angular-example-app.html
summary: A brief tutorial on creating an Angular client app using the Loopback AngularJS SDK.
---

{% include readmes/loopback-example-angular.md %}

Linting Readmes

There is an additional npm script that "lints" the readmes for markdown formatting problems. It is currently "experimental", see #49 for more info.

You can run this script thus:

$ npm run lint-readmes