Skip to content

Commit 76e6854

Browse files
docs: add GitHub Pages redirect to latest release documentation (#702)
**Context:** I am working on getting documentation up for each MCP SDK at `https://modelcontextprotocol.github.io/*-sdk/`. I realize the Go ecosystem has its own idioms for generating and hosting documentation, so I am proposing we make https://modelcontextprotocol.github.io/go-sdk/ redirect to the latest tag of https://github.com/modelcontextprotocol/go-sdk/blob/v1.1.0/docs/README.md. --- Adds a redirect page at https://modelcontextprotocol.github.io/go-sdk/ that automatically redirects visitors to the `docs/README.md` of the latest release tag. Uses Jekyll templating with `site.github.latest_release` to dynamically resolve the current release version at build time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 875d1d3 commit 76e6854

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/publish-docs.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish Docs to GitHub Pages
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
17+
18+
- name: Deploy to GitHub Pages
19+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
publish_dir: ./docs
23+
publish_branch: gh-pages
24+
enable_jekyll: true

docs/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
---
3+
<!DOCTYPE html>
4+
<html>
5+
<head>
6+
<meta charset="utf-8">
7+
<title>MCP Go SDK Documentation</title>
8+
<meta http-equiv="refresh" content="0; url=https://github.com/modelcontextprotocol/go-sdk/blob/{{ site.github.latest_release.tag_name }}/docs/README.md">
9+
<link rel="canonical" href="https://github.com/modelcontextprotocol/go-sdk/blob/{{ site.github.latest_release.tag_name }}/docs/README.md">
10+
</head>
11+
<body>
12+
<p>Redirecting to <a href="https://github.com/modelcontextprotocol/go-sdk/blob/{{ site.github.latest_release.tag_name }}/docs/README.md">MCP Go SDK documentation ({{ site.github.latest_release.tag_name }})</a>...</p>
13+
<p>For API reference, see <a href="https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk">pkg.go.dev</a>.</p>
14+
</body>
15+
</html>

0 commit comments

Comments
 (0)