nochso/sami-theme

一个具有内联源代码的Sami主题

安装: 159

依赖项: 1

建议者: 0

安全: 0

星级: 1

关注者: 2

分支: 1

公开问题: 0

语言:HTML

0.2.0 2016-04-17 18:32 UTC

This package is not auto-updated.

Last update: 2024-09-24 03:50:22 UTC


README

Latest Stable Version License

这是一个Sami API文档生成器的主题,增加了些功能。

  • 完整的文件源代码包含在最后。
  • 使用prismjs进行源代码高亮。
  • 显示类的常量值/赋值。
  • 使用wyrihaximus/html-compress对HTML进行压缩。

例如,查看API文档以了解nochso/Benchmark库。

安装

如果你之前没有使用过Sami,请先阅读其安装和基本使用说明。

准备好后,在你的项目中引入该主题

$ composer require nochso/sami-theme

用法

在你的Sami配置文件中,简单地调用Theme::prepare来在返回之前将主题注入到Sami实例中

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

例如:

<?php

use Sami\Sami;
use Symfony\Component\Finder\Finder;

$finder = Finder::create()
    ->files()
    ->name('*.php')
    ->in(__DIR__.'/src');

$config = array(
    'title' => 'Project documentation title',
    'build_dir' => __DIR__.'/build',
    'cache_dir' => __DIR__.'/cache',
);

$sami = new Sami($finder, $config);
$sami = \nochso\SamiTheme\Theme::prepare($sami);
return $sami;

这将在src/中查找PHP文件,并将生成的文档保存到build/中。

这些结果现在可以上传和分享了!

历史

0.2.0 - 2016-04-17

变更

  • 升级nochso/html-compress-twig到1.0.0

0.1.1 - 2015-10-05

变更

0.1.0 - 2015-09-26

第一次公开发布。

贡献

  1. 如果有值得讨论的问题,请提出问题
  2. 在Github上分叉此项目。
  3. 克隆你的分叉:git clone git@github.com:yourname/sami-theme.git
  4. 别忘了运行composer update
  5. 创建你的功能分支:git checkout -b my-new-feature
  6. 提交你的更改:git commit -am 'Add some feature'
  7. 推送到分支:git push origin my-new-feature
  8. 在Github上提交pull request :)

鸣谢

许可

本项目采用ISC许可协议,与MIT/GPL兼容,并获得FSF/OSI批准

Copyright (c) 2015, Marcel Voigt <mv@noch.so>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.