Code Monkey home page Code Monkey logo

bean-docs's Introduction

Setup

Use Node 4+

Check what version of Node you're running.

node --version

If it doesn't start with v4 or greater (v5, etc.), you need to update Node. You're probably on a Mac and installed Node via Homebrew, so try:

brew update
brew upgrade node

Install Dependencies

Inside the bean-docs folder, run this to install the project dependencies:

npm install

Usage

npm run build   # build the site into /build
npm run serve   # serve the site at localhost:8080 with live reloading
npm run deploy  # deploy to GitHub Pages

Writing Content

Images

Images go inside src/_assets/images/FOLDER_NAME/FILE_NAME/IMAGE_NAME.EXT, where FOLDER_NAME and FILE_NAME match the document referring to them.

Here's where you would put an image named blue_led.jpg to be accessed from inside the features/accelerometer.md guide:

src/_assets/images/features/accelerometer/blue_led.jpg

Inside accelerometer.md, add the following Handlebars helper call to add the image tag:

{{{img_rel this 'blue_led.jpg' 'A description of this image'}}}

When you use the above tag in your own documents, replace blue_led.jpg with your actual file name, and replace "A description of this image" with your own description of your image.

Max Width

To make an image take up less width horizontally and place margins around the left and right sides, add a max width argument:

{{{img_rel this 'blue_led.jpg' 'A description of this image' '50%'}}}

The image above will be 50% the width of the content column with 25% margins on the left and right sides.

Videos

For videos, use the same syntax with video_rel instead:

{{{video_rel this 'move_bean.mp4' '60%' true}}}

'video_rel' takes an additional argument for enabling autoplay and looping.

Note: The max width argument doesn't work with videos yet.

Verifying Style

We have a few checks for both code and content. Rum them as follows:

npm run lint-style  # Check Markdown files for common writing errors
npm run lint-code   # Check JavaScript files for style errors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.