• Authorised with
  • Robin Radic

    Github
    robin@radic.nl

    Title

    First Line
    Second Line

    star
  • Available Providers
  • Github
  • Bitbucket
  • Google
  • Welcome
  • Document
  • Error
  • PHPDoc
  • Projects Bash Blade Extensions Codex Core PHPDoc Git Auth Theme Core PHPDoc Git Auth Laradic Icon Generator Support Git Service Provider
  • Versions
  • master
  • v1
  • Codex Documentation

    Overview

    PHPDOC

    c:pd-type(type="string")
    o:
    c:pd-type(type="\Codex\Codex")
    o:
    c:pd-type(:query="true", type="\Codex\Codex")
    o:

    Custom signatureuse-signature signature-hide-modifiers signature-hide-argument-types signature-hide-argument-defaults signature-hide-argument-return signature-hide-return

    Selectableselectable

    hide-icon use-signature signature-hide-argument-types

    Default

    :merge-settings="{ show: { inherited: true } }", selectable

    use-icon

    Processors

    You can access the API by either using the binding, contract or facade.

    Check out theProcessors & Hooks documentaiton.

    Inlinecode

    Api access

    Using injection
    use Codex\Codex;
    public function __construct(Codex $codex){
        $dir = $codex->getRootDir();
    }

    Direct access
    app('codex')->getDocsPath();
    codex()->getDocsPath();
    Codex::getDocsPath();

    Binding
    $codex->log($level, $message, $context = [ ]);
    $codex->stack($viewName, $data = null, $appendTo = 'codex::layouts.default');
    
    # @var string $path
    $path       = $codex->getRootDir();
    
    # @var string $url
    $url        = $codex->url($project = null, $ref = null, $doc = null);
    
    # @var boolean $hasProject
    $hasProject = $codex->projects->has('codex-core');
    
    /** @var \Codex\Projects\Project $project */
    $project    = $codex->projects->get('codex-core');
    
    # @var \Codex\Core\Components\Factory\Projects $projects
    $projects   = $codex->projects;
    
    # @var \Codex\Core\Projects[] $projects
    $projects = ->all()
    $projects   = $codex->projects->toArray();
    foreach($projects as $project){
        $url = $project->url($doc = 'index', $ref = null);
        $project->path($path = null);           # string
        $project->hasEnabledProcessor($filter);    # bool
        $project->hasEnabledHook($hook);        # bool
        $project->getRef();                     # string
        $project->getDefaultRef();              # string
        $project->getRefs();                    # array[string]
        $project->getSortedRefs();              # array[string]
        $project->getName();                    # string
        $project->getPath();                    # string
        $project->getBranches();                # array[string]
        $project->getVersions();                # array[string]
    
        $project->documents->setExtensions(['md']);
        $project->documents->has($path); // without extension
        $project->documents->get($path); // without extension
        $documents = $project->documents->all();
    }
    
    
    # @var \Codex\Core\Projects[] $projects
    $documents = $codex->projects->get('codex-core')->documents->all()
    
    # @var \Codex\Core\Projects[] $projects
    $document = $codex->projects->get('codex-core')->documents->get('api-uasge')
    
    $document->render();
    $document->attr($key = null, $default = null)
    $document->url()
    $document->getBreadcrumb()
    $document->getPath()
    $document->getContent()
    $document->setContent($content)
    $document->getAttributes((
    $document->setAttributes(array $attr = [])
    $document->mergeAttributes(array $attr = [])
    $document->getProject()
    $document->setPath($path)

    Overview

    For details on the specific methods, check the API documentation

    # core
    CODEX_DEV_ENABLED=false
    CODEX_BASE_ROUTE=
    CODEX_DEFAULT_PROJECT=codex
    
    # addon-git
    CODEX_GIT_GITHUB_SECRET=
    CODEX_GIT_GITHUB_WEBHOOK_SECRET=tester
    CODEX_GIT_BITBUCKET_KEY=
    CODEX_GIT_BITBUCKET_SECRET=
    
    # addon-auth
    CODEX_AUTH_BITBUCKET_ID=
    CODEX_AUTH_BITBUCKET_SECRET=
    CODEX_AUTH_GITHUB_ID=
    CODEX_AUTH_GITHUB_SECRET=
    
    # addon-jira
    CODEX_JIRA_USERNAME=
    CODEX_JIRA_PASSWORD=
    CODEX_JIRA_LOG_LEVEL=

    Introduction

    Codex is a file-based documentation platform built on top of Laravel. It's completely customizable and dead simple to use to create beautiful documentation.

    Codex is able to do things like transforming markdown or automaticaly fetching documentation from a Bitbucket/Github repositories. Most of it's features are provided by addons. Codex is extenable, themeable, hackable and simple to setup and use.

    Features

    • Laravel 5
    • Markdown, Creole or custom document parsers
    • Host a unlimited number ofprojects/manuals with accompanyingversions
    • Extenable, themeable, hackable
    • Simple to setup and use
    • Syntax Highlighting
    • Easy navigation defined in YAML
    • SEO Friendly URLs
    • Default theme build on Laravels theme
    • Multiple storage methods (local, dropbox, amazon, etc)
    • Can be installed as stand-alone or sub-component in your own (Laravel) project.
    • (Addon Feature) Github/Bitbucket (auto webhook) synchronisation based on tags/branches.
    • (Addon Feature) Smooth working, custom PHPDoc integration
    • (Addon Feature) Access restriction on projects using Github/Bitbucket login
    • Much, much more!

    How it works

    Codex >Projects >Refs (versions) >Documents >Processors

    • Codex can provide documentation for multipleProjects.
    • EachProject has one or moreRefs (versions) containing yourDocuments.
    • Documents are passed troughProcessors, modifying it's content before displaying.

    Addons

    Theaddon-* packages are a collection ofPlugins,Hooks andProcessors.

    Plugins

    Plugins are used to alter Codex. They are capable of doing something very minor or completely alter the way Codex works.

    • Adding routes/controllers
    • Define custom document types
    • Adding/changing views
    • Adding/chaning assets
    • Many more things.
    • Extend the Codex API and structure with new features and functionality

    Processors

    Processors are used to alter the output of documents.

    • Reading document attributes
    • Parsing Markdown/Creole/Anything to HTML
    • Adding tooltips
    • Inject HTML/Javascript
    • Generate table of contents
    • Altering links
    • Many more things.

    Hooks

    Hooks are able to execute when Codex executes code which have hook-points defined. This could be seen as a event dispatcher/listener.

    • Allows minor or major modifications to Codex its inner workings.
    • Codex is full of hook points with getters/setters to adjust class properties.
    • Ensures code that doesn't have to be executed, won't be executed.

    Example

    The data is provided by thePHPDoc Addon . It uses the to alter the links based on the information provided by PHPDoc Addon.

    Example Code Codex [Codex](#codex:phpdoc:Codex\Codex) Codex [Codex](https://whatever.url#codex:phpdoc:popover:Codex\Codex) Codex::url [Codex::url](#codex:phpdoc:popover:Codex\Codex:url)

    File Structure

    A example file structure for Codex might look similar to:

    
              

    footer