Skip to content

Commit

Permalink
Merge pull request #31 from MarketDataApp/customize-phpdoc-template
Browse files Browse the repository at this point in the history
Try custom docs
  • Loading branch information
KerryJones authored Sep 24, 2024
2 parents 029ed73 + 4121c25 commit c788c78
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .phpdoc/template/base.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends 'layout.html.twig' %}

{%
set topMenu = {
"menu": [
{ "name": "PHP Documentation", "url": "https://www.marketdata.app/docs/sdk-php/"},
]
}
%}
3 changes: 3 additions & 0 deletions .phpdoc/template/components/header-title.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h1 class="phpdocumentor-title">
<a href="https://www.marketdata.app/docs/sdk" class="phpdocumentor-title__link">MarketData SDK</a>
</h1>
22 changes: 22 additions & 0 deletions .phpdoc/template/index.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends 'base.html.twig' %}

{% block content %}
<section>
<h2>PHP Documentation</h2>

{% set node = project.namespace %}

{{
include(
'components/table-of-contents.html.twig',
{
'node': project.namespace,
'namespaces': usesNamespaces or not usesPackages ? node.children : [],
'packages': usesPackages ? project.package.children : []
}
)
}}
{{ include('components/constants.html.twig', {'node': project.namespace}) }}
{{ include('components/functions.html.twig', {'node': project.namespace}) }}
</section>
{% endblock %}
10 changes: 10 additions & 0 deletions .phpdoc/template/template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<template>
<name>MarketData - PHPDoc Template</name>
<author>Kerry Jones</author>
<email>kerryjones21@gmail.com</email>
<version>1.0.0</version>
<extends>default</extends>
<transformations>
</transformations>
</template>
1 change: 1 addition & 0 deletions phpdoc.dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
</source>
</api>
</version>
<template name=".phpdoc/template" />
</phpdocumentor>

0 comments on commit c788c78

Please sign in to comment.