Git Product home page Git Product logo

user-docs's Introduction

Alpaca User Documentation

This repository powers the documentation for Alpaca's users.

Its contents are hosted on Alpaca's site here.

Submitting Improvements

We are accepting pull requests for this repository, so if you'd like to make some improvements to the documentation, we'd certainly appreciate it! To submit a correction or any other sort of improvment, you can fork this repository on GitHub, make your changes, and send them as a pull request.

Building the Site Locally

You can make changes to the markdown files holding site content here on GitHub, but if you'd like to see your changes locally before you submit, you can follow these steps.

  1. Install hugo. If on OSX, install homebrew and run brew install hugo.
  2. In the project directory, run hugo server.
  3. If you follow the link in hugo's output, you'll be taken to a local version of the site with the changes you've made.

On your local version of the site, you can check any pages that will be affected by the changes you've made.

Custom Shortcodes

Hugo supports shortcodes, which allow you to add HTML to a markdown file without making the code too messy. We've added a few custom shortcodes of our own.

code-example

The code-example shortcode allows you to add a code block with tabs that can switch between different languages. This allows us to show readers how to do the same thing in a wider variety of languages without cluttering the page. You will need to add the example code files to the system and then provide the shortcode with a path to them. In order to support multiple code blocks on the same page, all files in the same block should be named the same, only distinguished by their extension, and the name you choose should also be given to the shortcode as exampleId.

Example usage, given a set of files like ex1.py, ex1.js, and ex1.cs stored in an examples/ directory that you want to include on the orders page:

{{< code-example exampleId="ex1" pathURL="/web-api/fun/examples" >}}

(Note that when you only have one example to show and the tabs are unneccessary, you can forego the shortcode and use regular markdown syntax to format it as a code block.)

rest-endpoint

This shortcode lets you show a formatted endpoint description. Descriptions are stored in data/webapi/endpoints as YAML files.

{{< rest-endpoint resource="account" method="GET" path="/v1/account" >}}

rest-entity-desc

This can be used to show a formatted API description. These descriptions should be stored in data/webapi/entities as in the spec field of a YAML file.

{{< rest-entity-desc name="account">}}

rest-entity-example

This can be used to show a formatted API example. These examples should be stored in data/webapi/entities in the example` field of a YAML file.

{{< rest-entity-example name="account">}}

user-docs's People

Contributors

azmisov avatar camelpac avatar crest-s avatar d-e-s-o avatar evanhft avatar excavator20 avatar forestfranzose avatar gajsanders avatar jerwheaton avatar k-kristof avatar kalmant avatar katesegrin avatar mahmoudksherif avatar nancymchen avatar natedonato avatar neal avatar olegra avatar petersoj avatar sc4recoin avatar sebrollen avatar shlomiku avatar suddjian avatar tmaiaroto avatar travishooper avatar ttt733 avatar umitanuki avatar whitnable avatar yoshyoshi avatar zayeemas avatar ztaylor54 avatar

Watchers

 avatar

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.