PHPackages                             nochso/sami-theme - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. nochso/sami-theme

ActiveLibrary[Templating &amp; Views](/categories/templating)

nochso/sami-theme
=================

A Sami theme with inline source code

0.2.0(10y ago)116211ISCHTML

Since Sep 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/nochso/sami-theme)[ Packagist](https://packagist.org/packages/nochso/sami-theme)[ Docs](https://github.com/nochso/sami-theme)[ RSS](/packages/nochso-sami-theme/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (1)

nochso/sami-theme Theme for the Sami API doc generator
======================================================

[](#nochsosami-theme-theme-for-the-sami-api-doc-generator)

[![Latest Stable Version](https://camo.githubusercontent.com/519dd6ab85b9c7dbfca898eb08a40474851078923983849601020269f16b9199/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6368736f2f73616d692d7468656d652f762f737461626c65)](https://packagist.org/packages/nochso/sami-theme)[![License](https://camo.githubusercontent.com/a33fbb0e49cf8ee592f2d8afd8041c2816cfb220c772e7f2e12c5dcd8eed5b85/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6368736f2f73616d692d7468656d652f6c6963656e7365)](LICENSE)

This is a theme for the [Sami](https://github.com/FriendsOfPHP/Sami) API documentation generator with some added features:

- The complete file source is included at the end.
- Source code highlighting with [prismjs](http://prismjs.com/).
- Show the value / assignment of class constants.
- HTML is minified using [wyrihaximus/html-compress](https://github.com/WyriHaximus/HtmlCompress).

An an example take a look at the [API docs](http://nochso.github.io/Benchmark/docs/) for the [nochso/Benchmark](https://github.com/nochso/Benchmark/) library.

Installation
------------

[](#installation)

If you haven't used [Sami](https://github.com/FriendsOfPHP/Sami) before, please read up on its installation and basic usage first.

When you're ready, require the theme in your project:

```
$ composer require nochso/sami-theme
```

Usage
-----

[](#usage)

In your [Sami configuration file](https://github.com/FriendsOfPHP/Sami#configuration) simply call `Theme::prepare` to inject the theme into your Sami instance right before returning it:

```
return \nochso\SamiTheme\Theme::prepare($sami);
```

e.g.

```
