Skip to content

Commit 5c20aa9

Browse files
committed
Fine-tuning for path, config, and layout
1 parent b0215a5 commit 5c20aa9

8 files changed

Lines changed: 40 additions & 14 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ jobs:
3131
uses: peaceiris/actions-gh-pages@v4
3232
with:
3333
github_token: ${{ secrets.GITHUB_TOKEN }}
34-
publish_dir: ./build/docs
34+
publish_dir: ./.phpdoc/build
3535
enable_jekyll: false

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ tests/Conformance/sessions
1111
tests/Conformance/logs/*.log
1212

1313
# phpDocumentor
14-
build/
14+
.phpdoc/build/
1515
.phpdoc/cache/
16-
phpDocumentor.phar

.phpdoc/template/base.html.twig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
{% set topMenu = {
44
"menu": [
5-
{ "name": "Guides", "url": "guide/docs/index.html"}
5+
{ "name": "Guides", "url": "docs/index.html"},
6+
{ "name": "Specification", "url": "https://modelcontextprotocol.io/" }
7+
],
8+
"social": [
9+
{ "iconClass": "fab fa-github", "url": "https://github.com/modelcontextprotocol/php-sdk"},
10+
{ "iconClass": "fab fa-discord", "url": "https://discord.gg/6CSzBmMkjX"}
611
]
712
}
813
%}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<h1 class="phpdocumentor-title">
2+
<a href="{{ path('/docs/index.html') }}" class="phpdocumentor-title__link">
3+
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 195 195" fill="none">
4+
<path d="M25 97.8528L92.8823 29.9706C102.255 20.598 117.451 20.598 126.823 29.9706V29.9706C136.196 39.3431 136.196 54.5391 126.823 63.9117L75.5581 115.177" stroke="black" stroke-width="12" stroke-linecap="round"/>
5+
<path d="M76.2653 114.47L126.823 63.9117C136.196 54.5391 151.392 54.5391 160.765 63.9117L161.118 64.2652C170.491 73.6378 170.491 88.8338 161.118 98.2063L99.7248 159.6C96.6006 162.724 96.6006 167.789 99.7248 170.913L112.331 183.52" stroke="black" stroke-width="12" stroke-linecap="round"/>
6+
<path d="M109.853 46.9411L59.6482 97.1457C50.2757 106.518 50.2757 121.714 59.6482 131.087V131.087C69.0208 140.459 84.2168 140.459 93.5894 131.087L143.794 80.8822" stroke="black" stroke-width="12" stroke-linecap="round"/>
7+
</svg>
8+
<span style="margin-left: 0.25em;">{{ project.name }}</span>
9+
</a>
10+
</h1>

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ ci-lowest: deps-low cs phpstan tests
3939

4040
docs:
4141
vendor/bin/phpdoc
42-
@grep -q 'No errors have been found' build/docs/reports/errors.html || \
42+
@grep -q 'No errors have been found' .phpdoc/build/reports/errors.html || \
4343
(echo "Documentation errors found. See build/docs/reports/errors.html" && exit 1)

docs/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# MCP PHP SDK Guides
22

3-
- [MCP Elements](mcp-elements.html) — Core capabilities (Tools, Resources, Resource Templates, and Prompts) with registration methods.
4-
- [Server Builder](server-builder.html) — Fluent builder class for creating and configuring MCP server instances.
5-
- [Transports](transports.html) — STDIO and HTTP transport implementations with guidance on choosing between them.
6-
- [Client Communication](client-communication.html) — Methods for servers to communicate back to clients: sampling, logging, progress, and notifications.
7-
- [Examples](examples.html) — Example projects demonstrating attribute-based discovery, dependency injection, HTTP transport, and more.
3+
- [MCP Elements](mcp-elements.md) — Core capabilities (Tools, Resources, Resource Templates, and Prompts) with registration methods.
4+
- [Server Builder](server-builder.md) — Fluent builder class for creating and configuring MCP server instances.
5+
- [Transports](transports.md) — STDIO and HTTP transport implementations with guidance on choosing between them.
6+
- [Server-Client Communication](server-client-communication.md) — Methods for servers to communicate back to clients: sampling, logging, progress, and notifications.
7+
- [Examples](examples.md) — Example projects demonstrating attribute-based discovery, dependency injection, HTTP transport, and more.
File renamed without changes.

phpdoc.dist.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
>
88
<title>MCP PHP SDK</title>
99
<paths>
10-
<output>build/docs</output>
10+
<output>.phpdoc/build</output>
1111
</paths>
1212
<version number="latest">
13-
<api>
13+
<folder>latest</folder>
14+
<api ignore-packages="true">
1415
<source dsn=".">
1516
<path>src</path>
1617
</source>
@@ -19,14 +20,25 @@
1920
<path>vendor/**/*</path>
2021
<path>tests/**/*</path>
2122
</ignore>
23+
<ignore-tags>
24+
<ignore-tag>phpstan-type</ignore-tag>
25+
<ignore-tag>phpstan-type-import</ignore-tag>
26+
<ignore-tag>template</ignore-tag>
27+
<ignore-tag>template-covariant</ignore-tag>
28+
<ignore-tag>template-extends</ignore-tag>
29+
<ignore-tag>template-implements</ignore-tag>
30+
<ignore-tag>extends</ignore-tag>
31+
<ignore-tag>implements</ignore-tag>
32+
</ignore-tags>
2233
</api>
2334
<guide format="md">
2435
<source dsn=".">
2536
<path>docs</path>
2637
</source>
27-
<output>guide</output>
38+
<output>/</output>
2839
</guide>
2940
</version>
3041
<setting name="guides.enabled" value="true"/>
31-
<setting name="graphs.enabled" value="true"/>
42+
<setting name="graphs.enabled" value="false"/>
43+
<setting name="template.color" value="black"/>
3244
</phpdocumentor>

0 commit comments

Comments
 (0)