Coder Social home page Coder Social logo

morethemesbaby / phpdocumentor-wordpress-theme Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 151 KB

A phpDocumentor template for Wordpress themes

License: GNU General Public License v3.0

HTML 6.04% CSS 93.26% JavaScript 0.71%
wordpress wordpress-theme phpdocumentor documentation-tool documentation-generator

phpdocumentor-wordpress-theme's Introduction

phpDocumentor template for Wordpress themes

Generate phpDocumentor style documentation for Wordpress themes

Idea

Current phpDocumentor templates spit documentation for APIs. For Wordpress it would be nice to have a documentation following the recommended file and folder structure.

A documentation organized in the same way as theme files in the editor would offer a better understanding and reading experience.

How it works ?

All PHP files of the theme are collected into three sections: Templates, Template parts, and Template tags. When clicking on a file the DocBlock associated to the file is displayed, and in plus all other DocBlocks for all Structural Elements inside of the file (Functions, Constants, Classes etc)

List of DocBlock items supported

https://github.com/morethemesbaby/phpdocumentor-wordpress-theme/tree/master/parts/docblock

List of Structural Elements supported

https://github.com/morethemesbaby/phpdocumentor-wordpress-theme/tree/master/parts/structural-element

Running

If you add the --title="Project Title" param it will be used as the site title. Otherwise the site title will be the default like 'API documentation'

Compiling

SCSS

gulp

Because scss/template.scss contains css globbing declarations like @import 'framework/design/**/*.scss'; and cannot be compiled simply by the scss command.

Twig

phpDocumentor uses the cache extensively when compiling documentation. Due caching sometimes (when only minor changes are made to the template?) the compilation is unsuccessful in terms of nothing new is generated. It's good to empty the cache before compiling the theme:

rm -Rf /tmp/phpdoc-twig-cache/
phpdoc -d . -t doc -i vendor/,wpcs/ --template=phpdocumentor-wordpress-theme

Gotchas

Markers and Deprecated elements

  • Only the Abstract (XSL) template displays markers and deprecated elements correctly
  • The Clean (Twig) doesn't display them all, the Responsive (XSL) displays only the deprecated elements, the Responsive-Twig display nothing

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.