Update documentation configuration (#86)
* Docs configuration * Update docs/index.md Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> * Update the configuration * Update docs/docfx.json Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> * Update config * Update icons, use Makefile, remove warnings * Use a link that passes markdown link validation * remove working directory --------- Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
This commit is contained in:
parent
1f8ebee742
commit
2972fd715a
9 changed files with 248 additions and 0 deletions
13
.config/dotnet-tools.json
Normal file
13
.config/dotnet-tools.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"docfx": {
|
||||
"version": "2.78.3",
|
||||
"commands": [
|
||||
"docfx"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
43
.github/workflows/docs.yml
vendored
Normal file
43
.github/workflows/docs.yml
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
actions: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
publish-docs:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: .NET Setup
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 9.x
|
||||
|
||||
- name: Generate documentation
|
||||
run: make generate-docs
|
||||
|
||||
- name: Upload Pages artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: 'artifacts/_site'
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -73,3 +73,7 @@ _NCrunch_*
|
|||
nCrunchTemp_*
|
||||
|
||||
*.orig
|
||||
|
||||
# Auto-generated documentation
|
||||
docs/_site
|
||||
docs/api
|
||||
38
Makefile
Normal file
38
Makefile
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
SOURCE_DIRECTORY := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
ARTIFACT_PATH := $(SOURCE_DIRECTORY)artifacts
|
||||
DOCS_PATH := $(SOURCE_DIRECTORY)docs
|
||||
CONFIGURATION ?= Release
|
||||
|
||||
clean:
|
||||
dotnet clean
|
||||
rm -rf $(ARTIFACT_PATH)/*
|
||||
rm -rf $(DOCS_PATH)/api
|
||||
|
||||
restore:
|
||||
dotnet tool restore
|
||||
dotnet restore
|
||||
|
||||
build: restore
|
||||
dotnet build --no-restore --configuration $(CONFIGURATION)
|
||||
|
||||
test: build
|
||||
dotnet test \
|
||||
--no-build \
|
||||
--configuration $(CONFIGURATION) \
|
||||
--filter '(Execution!=Manual)' \
|
||||
--blame \
|
||||
--diag "$(ARTIFACT_PATH)/diag.txt" \
|
||||
--logger "trx" \
|
||||
--collect "Code Coverage;Format=cobertura" \
|
||||
--results-directory $(ARTIFACT_PATH)/test-results \
|
||||
-- \
|
||||
RunConfiguration.CollectSourceInformation=true
|
||||
|
||||
generate-docs: clean restore
|
||||
dotnet build --no-restore --configuration Release
|
||||
dotnet docfx $(DOCS_PATH)/docfx.json
|
||||
|
||||
serve-docs: generate-docs
|
||||
dotnet docfx serve $(ARTIFACT_PATH)/_site --port 8080
|
||||
|
||||
.DEFAULT_GOAL := build
|
||||
48
docs/docfx.json
Normal file
48
docs/docfx.json
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
|
||||
"metadata": [
|
||||
{
|
||||
"src": [
|
||||
{
|
||||
"src": "../src",
|
||||
"files": [
|
||||
"**/*.csproj"
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": "api"
|
||||
}
|
||||
],
|
||||
"build": {
|
||||
"content": [
|
||||
{
|
||||
"files": [
|
||||
"**/*.{md,yml}"
|
||||
],
|
||||
"exclude": [
|
||||
"_site/**"
|
||||
]
|
||||
}
|
||||
],
|
||||
"resource": [
|
||||
{
|
||||
"files": [
|
||||
"images/**"
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": "../artifacts/_site",
|
||||
"template": [
|
||||
"default",
|
||||
"modern"
|
||||
],
|
||||
"globalMetadata": {
|
||||
"_appName": "MCP C# SDK",
|
||||
"_appTitle": "MCP C# SDK",
|
||||
"_appLogoPath": "images/mcp.svg",
|
||||
"_appFaviconPath": "images/favicon.ico",
|
||||
"_enableSearch": true,
|
||||
"pdf": false
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
docs/images/favicon.ico
Normal file
BIN
docs/images/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
74
docs/images/mcp.svg
Normal file
74
docs/images/mcp.svg
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="51"
|
||||
height="51"
|
||||
viewBox="0 0 51 51"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg3"
|
||||
sodipodi:docname="mcp.svg"
|
||||
inkscape:version="1.4 (86a8ad7, 2024-10-11)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview3"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:export-bgcolor="#ffffffff"
|
||||
inkscape:zoom="22.627417"
|
||||
inkscape:cx="19.357048"
|
||||
inkscape:cy="24.969708"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1351"
|
||||
inkscape:window-x="-9"
|
||||
inkscape:window-y="-9"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g3" />
|
||||
<g
|
||||
clip-path="url(#clip0_19_13)"
|
||||
id="g3"
|
||||
transform="matrix(0.21537223,0,0,0.20523314,6.2187264,6.6601705)">
|
||||
<path
|
||||
d="M 18,84.8528 85.8822,16.9706 c 9.3726,-9.37262 24.5688,-9.37262 33.9408,0 v 0 c 9.373,9.3725 9.373,24.5685 0,33.9411 L 68.5581,102.177"
|
||||
stroke="#000000"
|
||||
stroke-width="12"
|
||||
stroke-linecap="round"
|
||||
id="path1"
|
||||
sodipodi:nodetypes="ccsscc"
|
||||
style="fill:#000000;stroke:#c8c8c8;stroke-opacity:1;fill-opacity:0" />
|
||||
<path
|
||||
d="M 69.2652,101.47 119.823,50.9117 c 9.373,-9.3726 24.569,-9.3726 33.942,0 l 0.353,0.3535 c 9.373,9.3726 9.373,24.5686 0,33.9411 L 92.7248,146.6 c -3.1242,3.124 -3.1242,8.189 0,11.313 l 12.6062,12.607"
|
||||
stroke="#000000"
|
||||
stroke-width="12"
|
||||
stroke-linecap="round"
|
||||
id="path2"
|
||||
style="fill:#000000;stroke:#c8c8c8;stroke-opacity:1;fill-opacity:0" />
|
||||
<path
|
||||
d="M 102.853,33.9411 52.6482,84.1457 c -9.3726,9.3726 -9.3726,24.5683 0,33.9413 v 0 c 9.3726,9.372 24.5685,9.372 33.9411,0 L 136.794,67.8822"
|
||||
stroke="#000000"
|
||||
stroke-width="12"
|
||||
stroke-linecap="round"
|
||||
id="path3"
|
||||
style="fill:#000000;stroke:#c8c8c8;stroke-opacity:1;fill-opacity:0" />
|
||||
</g>
|
||||
<defs
|
||||
id="defs3">
|
||||
<clipPath
|
||||
id="clip0_19_13">
|
||||
<rect
|
||||
width="180"
|
||||
height="180"
|
||||
fill="#ffffff"
|
||||
id="rect3"
|
||||
x="0"
|
||||
y="0" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
23
docs/index.md
Normal file
23
docs/index.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
_layout: landing
|
||||
---
|
||||
|
||||
# Overview
|
||||
|
||||
The official C# SDK for the [Model Context Protocol](https://modelcontextprotocol.io/), enabling .NET applications, services, and libraries to implement and interact with MCP clients and servers. Please visit our [API documentation](https://modelcontextprotocol.github.io/csharp-sdk/api/ModelContextProtocol.html) for more details on available functionality.
|
||||
|
||||
## About MCP
|
||||
|
||||
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It enables secure integration between LLMs and various data sources and tools.
|
||||
|
||||
For more information about MCP:
|
||||
|
||||
- [Official Documentation](https://modelcontextprotocol.io/)
|
||||
- [Protocol Specification](https://spec.modelcontextprotocol.io/)
|
||||
- [GitHub Organization](https://github.com/modelcontextprotocol)
|
||||
|
||||
For how-to guides, tutorials, and additional guidance, refer to the [official MCP documentation](https://modelcontextprotocol.io/).
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the [MIT License](https://github.com/modelcontextprotocol/csharp-sdk/blob/main/LICENSE).
|
||||
5
docs/toc.yml
Normal file
5
docs/toc.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
items:
|
||||
- name: API Docs
|
||||
href: api/ModelContextProtocol.yml
|
||||
- name: Github
|
||||
href: https://github.com/ModelContextProtocol/csharp-sdk
|
||||
Loading…
Reference in a new issue