Giter VIP home page Giter VIP logo

node-slate's Introduction

logo

A Node.js port of lord/slate

Slate helps you create beautiful, intelligent, responsive API documentation.

screenshot

The example above was created with Slate. Check it out at: node-slate.js.org

License npm Build

Features

  • Clean, intuitive design โ€” With Slate, the description of your API is on the left side of your documentation, and all the code examples are on the right side. Inspired by Stripe's and PayPal's API docs. Slate is responsive, so it looks great on tablets, phones, and even in print.

  • Everything on a single page โ€” Gone are the days when your users had to search through a million pages to find what they wanted. Slate puts the entire documentation on a single page. We haven't sacrificed linkability, though. As you scroll, your browser's hash will update to the nearest header, so linking to a particular point in the documentation is still natural and easy.

  • Slate is just Markdown โ€” When you write docs with Slate, you're just writing Markdown, which makes it simple to edit and understand. Everything is written in Markdown โ€” even the code samples are just Markdown code blocks.

  • Write code samples in multiple languages โ€” If your API has bindings in multiple programming languages, you can easily put in tabs to switch between them. In your document, you'll distinguish different languages by specifying the language name at the top of each code block, just like with Github Flavored Markdown.

  • Out-of-the-box syntax highlighting for 150 languages, no configuration required.

  • Automatic, smoothly scrolling table of contents on the far left of the page. As you scroll, it displays your current position in the document. It's fast, too. TripIt uses Slate to build documentation for their new API, where their table of contents has over 180 entries. They've made sure that the performance remains excellent, even for larger documents.

  • Let your users update your documentation for you โ€” By default, your Slate-generated documentation is hosted in a public Github repository. Not only does this mean you get free hosting for your docs with Github Pages, but it also makes it simple for other developers to make pull requests to your docs if they find typos or other problems. Of course, if you don't want to use GitHub, you're also welcome to host your docs elsewhere.

Getting started with Slate is super easy! Simply fork this repository and follow the instructions below. Or, if you'd like to check out what Slate is capable of, take a look at the sample docs.

Getting Started with Slate

Prerequisites

You're going to need:

  • Node.js

Getting Set Up

  1. Fork this repository on Github.
  2. Clone your forked repository (not this original one) to your hard drive with git clone https://github.com/YOURUSERNAME/node-slate.git
  3. cd node-slate
  4. Initialize and start Slate:
npm install
npm run build
npm start

You can now see the docs at http://localhost:4567. Whoa! That was fast!

Commands

Compile documentation to static site in ./build:

npm run build

Run a dev server that live-reloads at http://localhost:4567:

npm start

Publish your docs to origin/gh-pages branch:

npm run deploy


MIT License

node-slate's People

Contributors

blackxored avatar bootstraponline avatar chrissrogers avatar cvkef avatar djpowers avatar dlackty avatar dpilafian avatar floorlamp avatar kevin-buttercoin avatar lord avatar maks3w avatar marcguyer avatar matteocrippa avatar mattes avatar mdlima avatar moizjv avatar niksamokhvalov avatar pbechu avatar pomier avatar prayagverma avatar readmecritic avatar realityking avatar rezanachmad avatar rlord avatar sibartlett avatar sobstel avatar sprql avatar stetzer avatar styloa avatar victorquinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-slate's Issues

Build causing file already exists error

$ npm run build

> [email protected] build /Users/dem/projects/node-slate
> gulp

[10:07:54] Using gulpfile ~/projects/node-slate/gulpfile.js
[10:07:54] Starting 'clean'...
[10:07:54] Starting 'fonts'...
[10:07:54] Starting 'images'...
[10:07:54] Starting 'highlightjs'...
[10:07:54] Starting 'js'...
[10:07:54] Starting 'sass'...
[10:07:54] Starting 'html'...
[10:07:54] Finished 'clean' after 300 ms
[10:07:54] 'highlightjs' errored after 290 ms
[10:07:54] Error: EEXIST: file already exists, mkdir '/Users/dem/projects/node-slate/build/stylesheets'

Documentation on the index.yml file?

I want to build all the files in the include folder but it seems as if only the ones listed in the includes section of the index.yml folder are being used. How do I use all the files in the includes folder and subdirectories of it instead? It's too many to go through and list one by one. Can you provide documentation on what settings are available in general?

Hot reloading not working

Just forked the latest and hot reloading is not working.

I tried live-reload extension in chrome and no luck.

Am I missing something? It's been a while since i used gulp. I remember using this a few years ago and it worked well.

Now not so much.

Thanks.

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.