rafie/gdoc 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rafie/gdoc

Composer 安装命令:

composer require rafie/gdoc

包简介

Documentation generator.

README 文档

README

##Documentation Generator API documentation is important, but an official documentation for your application project is also important. I tried to adapt the Sami documentation generator to help generate official documentation.

##Installation You can require rafie/gdoc in your composer.jsonand do a composer update.

##Usage You can run the documentation generator from the command line.

$ php path/to/rafie.php generate your_config.php

Where the config file must return an instance of RAFIE\Configuration, you may use the config file inside the root of the package, this is an example.

use RAFIE\Configuration;
use Symfony\Component\Finder\Finder;

$dir = __DIR__ . '/doc';

$finder = Finder::create()->files()->in($dir);

$docConf = $dir.'/doc.yml';

$options = [
    'theme'       => 'laravel',
    'build_path'  => __DIR__ . '/build',
    'themesPaths' => [__DIR__ . '/src/themes/']
];

return new Configuration($finder, $docConf, $options);

You can use the Finder to lookup your markdown documentation. The $docConf can be used to describe your documentation navigation structure and it will parsed and passed to your theme file, for example, if you wanted to create the Laravel documentation structure.

navigation:
  Prologue:
    Releases Notes: releases.html
    Upgrade Guide: upgrade.html
    Contribution Guide: contributions.html
  Setup:
    Installation: installation.html
    Configuration: configuration.html
    ...

The options parameter specify three attributes, your theme name, themes paths (where you stored your themes), and the build path where you output the result.

##Using Git You can use versioned documentation by specifying a fourth option.

$dir = __DIR__ . '/doc';

$finder = Finder::create()->files()->in($dir);

$versions = RAFIE\Version\GitVersionCollection::create($dir)
    ->add('master', 'Master')
    ->add('4.2', '4.2');

$options = [
    'theme'       => 'laravel',
    'build_path'  => __DIR__ . '/build/%version%',
    'versions'    => $versions,
    'themesPaths' => [__DIR__ . '/src/themes/']
];

$docConf = $dir . '/doc.yml';

return new Configuration($finder, $docConf, $options);

The GitVersionCollection lets you specify which versions you want to use for the generation, and the result is passed as an option. Note that the build path contains a %version% which indicates the sub directory structure used for the output.

##Creating Themes You can this Github repository to learn more about theme.

##Demo The gDocDemo repository contain a demo for generating a documentation for Laravel framework, I'm using their CSS file and some of their HTML.

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固