Skip to content

Commit c788c78

Browse files
authored
Merge pull request #31 from MarketDataApp/customize-phpdoc-template
Try custom docs
2 parents 029ed73 + 4121c25 commit c788c78

5 files changed

Lines changed: 45 additions & 0 deletions

File tree

.phpdoc/template/base.html.twig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{% extends 'layout.html.twig' %}
2+
3+
{%
4+
set topMenu = {
5+
"menu": [
6+
{ "name": "PHP Documentation", "url": "https://www.marketdata.app/docs/sdk-php/"},
7+
]
8+
}
9+
%}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<h1 class="phpdocumentor-title">
2+
<a href="https://www.marketdata.app/docs/sdk" class="phpdocumentor-title__link">MarketData SDK</a>
3+
</h1>

.phpdoc/template/index.html.twig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% extends 'base.html.twig' %}
2+
3+
{% block content %}
4+
<section>
5+
<h2>PHP Documentation</h2>
6+
7+
{% set node = project.namespace %}
8+
9+
{{
10+
include(
11+
'components/table-of-contents.html.twig',
12+
{
13+
'node': project.namespace,
14+
'namespaces': usesNamespaces or not usesPackages ? node.children : [],
15+
'packages': usesPackages ? project.package.children : []
16+
}
17+
)
18+
}}
19+
{{ include('components/constants.html.twig', {'node': project.namespace}) }}
20+
{{ include('components/functions.html.twig', {'node': project.namespace}) }}
21+
</section>
22+
{% endblock %}

.phpdoc/template/template.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<template>
3+
<name>MarketData - PHPDoc Template</name>
4+
<author>Kerry Jones</author>
5+
<email>kerryjones21@gmail.com</email>
6+
<version>1.0.0</version>
7+
<extends>default</extends>
8+
<transformations>
9+
</transformations>
10+
</template>

phpdoc.dist.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
</source>
1616
</api>
1717
</version>
18+
<template name=".phpdoc/template" />
1819
</phpdocumentor>

0 commit comments

Comments
 (0)