Giter Club home page Giter Club logo

zamm's Introduction

Zamm is a documentation tool

Latest Stable Version License Scrutinizer Code Quality Code Coverage

Quick Install

composer require maslosoft/zamm

Documentation

Full Zamm Documentation

Working examples

It is quite important for examples or code snippets to actually work. When writing documentation in Markdown, Tex or other documentation tools, one could easy omit some important code fragments and create broken example. When using advanced IDE's like NetBeans Eclipse many early code problems are avoided. This also takes care of refactoring - which need to be also applied to documentation. It is also very important to have good php docs on classes.

Basically it means that there are three aspects of coding which need to be in sync, while order of creating is somewhat like this:

PHP Code PHP doc blocks Documentation

It would be good to have as much as possible to be reused from code or doc blocks in documentation.

Documentation written in PHP

To make documentation more consistent with Zamm, documentation can contain PHP code snippets, source code fragments or phpdoc comments extracted from source code. Then theese fragments can be rendered according to context, usually wrapped with pre tags, or Markdown fences.

Zamm can capture code fragments of inline php, to allow in-place php execution while grabbing it's source at once. Very usefull for user interface demos.

zamm's People

Contributors

pmaselkowski avatar

Watchers

 avatar James Cloos avatar  avatar

zamm's Issues

Wrapper should have defaults per file

Wrapper should have mechanism to set defaults per-file basis. So subsequent calls do not need to get/call raw/html etc.

Current:

<?= $name->title->raw->html ?>

Expected:

Wrapper::defaults()->raw->html;
<?= $name->title ?>

Add links to known symbols on Capture

Scenario:
I create Capture block for my documentation:

$model = new ExampleDate();
echo ActiveForm::widget([
    'model' => $model,
    'fields' => [
        'issueDate'
    ]
]);

Current:
The code is highlighted, but there is no link to class:
image

Expected:
Known class should be linked to API documentation:
image

Extra informations:

To avoid changing colors of highlighting, the links should be styled as follows:

color: inherit !important;
text-decoration: underline !important;

To create link, the ApiUrl class should be used or ApiLink with styles taking into account that it is wrapped with pre tags.

Inline wrapper should link to API

Inline wrapper should link to API. There is need for some setup first. Possibly some callback to create link. Or by #2.

This should create code like:

<a href="/link/to/api/of/EnumBase"><code>Maslosoft\Ilmatar\Components\Helpers\EnumBase</code></a>
<a href="/link/to/api/of/EnumBase#testMethod"><code>Maslosoft\Ilmatar\Components\Helpers\EnumBase::test</code></a>

Create link class

This should expose (configurable) links to other doc files or api.

ie:

Link::to('QuickStart');

Link::api($class/$SourceAccessor, [method/field/constant]);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.