2017 © Pedro Peláez
 

symfony-bundle slate-bundle

This bundle provides a configurable Slate documentation for your REST APIs.

image

soltys/slate-bundle

This bundle provides a configurable Slate documentation for your REST APIs.

  • Wednesday, December 13, 2017
  • by hugosoltys
  • Repository
  • 1 Watchers
  • 2 Stars
  • 30 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

SoltysSlateBundle

This bundle provides a configurable Slate documentation for your REST APIs., (*1)

Step 1: Download the Bundle

Add SoltysSlateBundle to your project via Composer:, (*2)

$ composer require soltys/slate-bundle "~1"

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:, (*3)

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Soltys\Bundle\SoltysSlateBundle\SoltysSlateBundle(),
        );

        // ...
    }

    // ...
}

Step 3: Configure the Bundle

In your routing.yml file add the following lines:, (*4)

# app/config/routing.yml
SoltysSlateBundle:
    resource: "@SoltysSlateBundle/Resources/config/routing.yml"
    prefix:   /api/documentation

Then configure the bundle by adding the following in your config.yml:, (*5)

# app/config/config.yml
soltys_slate:
    language_tabs: ["shell", "ruby", "python", "javascript"]
    includes: ["SoltysSlateBundle:Slate/Includes:_errors.md.twig"]
    toc_footers: ["SoltysSlateBundle:Slate/Footers:_footer.html.twig"]

The full bundle configuration reference is below:, (*6)

# app/config/config.yml
soltys_slate:
    title: "API Documentation"                            # Your documentation title
    navbar_path: "bundles/soltysslate/images/navbar.png"  # Your navbar image path
    logo_path: "bundles/soltysslate/images/logo.png"      # Your logo path
    with_search: true                                     # Enable/Disable the search bar
    page_classes: "index"                                 # Add this CSS class to the HTML <body> tag
    language_tabs: ["shell", "ruby", "python", "javascript"] # List the languages in which you want to write your examples
    includes: ["SoltysSlateBundle:Slate/Includes:_errors.md.twig"] # Additional templates
    toc_footers: ["SoltysSlateBundle:Slate/Footers:_footer.html.twig"] # Footer template

You can now install your assets with the following command:, (*7)

$ bin/console assets:install web --symlink

Then clear your cache:, (*8)

$ bin/console cache:clear

Step 4: Usage

To write your own documentation (unless if you like kittens), create an index.md.twig file under the app/Resources/SoltysSlateBundle/views/Slate/MarkDown directory to override the default one., (*9)

The Versions

13/12 2017

dev-master

9999999-dev https://github.com/hugosoltys/SoltysSlateBundle

This bundle provides a configurable Slate documentation for your REST APIs.

  Sources   Download

MIT

The Requires

 

The Development Requires

api rest bundle symfony slate soltys

12/12 2017

1.0.2

1.0.2.0 https://github.com/hugosoltys/SoltysSlateBundle

This bundle provides a configurable Slate documentation for your REST APIs.

  Sources   Download

MIT

The Requires

 

api rest bundle symfony slate soltys

12/12 2017

1.0.1

1.0.1.0 https://github.com/hugosoltys/SoltysSlateBundle

This bundle provides a configurable Slate documentation for your REST APIs.

  Sources   Download

MIT

The Requires

 

api rest bundle symfony slate soltys

12/12 2017

1.0.0

1.0.0.0 https://github.com/hugosoltys/SoltysSlateBundle

This bundle provides a configurable Slate documentation for your REST APIs.

  Sources   Download

MIT

The Requires

 

api rest bundle symfony slate soltys