Skip to content

Commit fbaaebe

Browse files
committed
Migrate GitHub Pages from Jekyll to a VitePress hub-and-spoke site
Replaces the single-page Jekyll (cayman theme) landing page with a VitePress site modeled on directtrust-tools.github.io: shared theme, hand-maintained sidebar, local search. Component repos (starting with agent, migrated in this pass) keep their own docs/ folder on their main branch as the source of truth, authored and reviewed via normal PRs in that repo. scripts/fetch-docs.mjs clones each component listed in scripts/components.json and copies its docs/ into docs/<slug>/ here at build/dev time (predocs:build / predocs:dev), so the site renders as one coherent whole while content ownership stays with each project. Homepage/Overview links to the five not-yet-migrated components (gateway, direct-msg-monitor, direct-policy, dns, direct-project-stock) remain external for now; each future migration pass flips one more link to internal and adds its section to the sidebar.
1 parent f63181a commit fbaaebe

14 files changed

Lines changed: 3026 additions & 32 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy VitePress site to Pages
2+
3+
on:
4+
push:
5+
branches: [master]
6+
repository_dispatch:
7+
types: [docs-updated]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0 # needed for lastUpdated in VitePress
27+
28+
- name: Setup Node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22
32+
cache: npm
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Fetch component docs and build
38+
run: npm run docs:build
39+
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v5
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: docs/.vitepress/dist
47+
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
needs: build
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
# Compiled class file
2-
*.class
1+
# Node
2+
node_modules/
3+
npm-debug.log*
34

4-
# Log file
5-
*.log
5+
# VitePress build output and cache (built by CI, not committed)
6+
docs/.vitepress/dist/
7+
docs/.vitepress/cache/
68

7-
# BlueJ files
8-
*.ctxt
9+
# Component docs fetched at build/dev time (scripts/fetch-docs.mjs) — the
10+
# source of truth lives in each component repo's own docs/ folder, not here
11+
docs/agent/
912

10-
# Mobile Tools for Java (J2ME)
11-
.mtj.tmp/
13+
# Local override for scripts/fetch-docs.mjs during development, so a
14+
# not-yet-pushed component repo can be pointed at a local filesystem path
15+
scripts/components.local.json
1216

13-
# Package Files #
14-
*.jar
15-
*.war
16-
*.nar
17-
*.ear
18-
*.zip
19-
*.tar.gz
20-
*.rar
21-
22-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23-
hs_err_pid*
17+
# IDE metadata
18+
.project
19+
.settings/
20+
.classpath
21+
.idea/
22+
.vscode/

Gemfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

_config.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/.vitepress/config.mts

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
export default defineConfig({
4+
title: 'DirectProject Java Reference Implementation',
5+
description: 'Documentation for the DirectProject Java Reference Implementation',
6+
base: '/',
7+
cleanUrls: true,
8+
9+
themeConfig: {
10+
logo: '/logo.png',
11+
siteTitle: false,
12+
13+
nav: [
14+
{ text: 'Overview', link: '/overview' },
15+
{ text: 'Security And Trust Agent', link: '/agent/' }
16+
],
17+
18+
// Hand-maintained: adding a page in a component repo's docs/ folder also
19+
// requires a sidebar entry here in the hub repo — the two live in
20+
// different repos, so this coupling can't be enforced automatically.
21+
sidebar: [
22+
{ text: 'Overview', link: '/overview' },
23+
{
24+
text: 'Security And Trust Agent',
25+
link: '/agent/',
26+
collapsed: true,
27+
items: [
28+
{
29+
text: 'Development Guide',
30+
link: '/agent/dev-guide',
31+
collapsed: true,
32+
items: [
33+
{ text: 'Agent Architecture', link: '/agent/agent-architecture' },
34+
{ text: 'NHINDAgent Component', link: '/agent/nhind-agent' },
35+
{ text: 'Cryptographer Component', link: '/agent/cryptographer' },
36+
{ text: 'Certificate Resolvers', link: '/agent/cert-resolver' },
37+
{ text: 'Trust', link: '/agent/trust' },
38+
{ text: 'Mail Library', link: '/agent/mail-lib' }
39+
]
40+
},
41+
{
42+
text: 'Tools',
43+
link: '/agent/tools',
44+
collapsed: true,
45+
items: [
46+
{ text: 'Certificate Generation', link: '/agent/cert-gen' },
47+
{ text: 'DNS Certificate Dumper', link: '/agent/dns-dumper' },
48+
{ text: 'LDAP Certificate Dumper', link: '/agent/ldap-dumper' }
49+
]
50+
}
51+
]
52+
}
53+
],
54+
55+
search: {
56+
provider: 'local'
57+
},
58+
59+
outline: {
60+
level: [2, 3]
61+
}
62+
}
63+
})

docs/.vitepress/theme/custom.css

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
/**
2+
* Palette carried over from the site's previous jekyll-theme-cayman header
3+
* gradient (#159957 teal -> #155799 blue) so the migrated site keeps a
4+
* familiar look and feel.
5+
*/
6+
:root {
7+
--vp-font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
8+
sans-serif;
9+
10+
--vp-c-brand-1: #155799;
11+
--vp-c-brand-2: #124a82;
12+
--vp-c-brand-3: #1e5faa;
13+
--vp-c-brand-soft: rgba(21, 87, 153, 0.14);
14+
15+
--doc-accent-teal: #159957;
16+
--doc-callout-bg: #f2faf6;
17+
18+
/* VitePress defaults the sidebar to --vp-c-bg-alt (a slightly different shade
19+
than the main content's --vp-c-bg), which reads as a visible seam between
20+
the nav pane and the page. Match it to the content background instead. */
21+
--vp-sidebar-bg-color: var(--vp-c-bg);
22+
}
23+
24+
.dark {
25+
--vp-c-brand-1: #5b9bd5;
26+
--vp-c-brand-2: #4a87bd;
27+
--vp-c-brand-3: #cfe3f7;
28+
--vp-c-brand-soft: rgba(91, 155, 213, 0.16);
29+
30+
--doc-callout-bg: rgba(21, 153, 87, 0.08);
31+
}
32+
33+
/* h2 underline accent, matching the original site's teal/green gradient rule */
34+
.vp-doc h2 {
35+
border-bottom: 2px solid var(--doc-accent-teal);
36+
padding-bottom: 8px;
37+
}
38+
39+
.vp-doc h3 {
40+
color: var(--vp-c-brand-3);
41+
}
42+
43+
.vp-doc li strong {
44+
color: var(--vp-c-brand-3);
45+
}
46+
47+
/* :::tip container for callouts */
48+
.vp-doc .custom-block.tip {
49+
border-color: var(--doc-accent-teal);
50+
background-color: var(--doc-callout-bg);
51+
}
52+
53+
.vp-doc .custom-block.tip .custom-block-title {
54+
color: var(--vp-c-brand-3);
55+
}
56+
57+
/* figure/figcaption styling for documentation screenshots */
58+
.vp-doc figure {
59+
margin: 18px 0 24px;
60+
}
61+
62+
.vp-doc figure img,
63+
.vp-doc p > img {
64+
display: block;
65+
max-width: 100%;
66+
height: auto;
67+
margin: 0 auto;
68+
border: 1px solid var(--vp-c-divider);
69+
border-radius: 8px;
70+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
71+
}
72+
73+
/* italic caption paragraph directly beneath a standalone image */
74+
.vp-doc p:has(> img:only-child) + p:has(> em:only-child) {
75+
margin-top: -8px;
76+
font-size: 13px;
77+
color: var(--vp-c-text-2);
78+
text-align: center;
79+
font-style: normal;
80+
}
81+
82+
/* table header matches the site's solid brand-blue header row */
83+
.vp-doc table th {
84+
background-color: var(--vp-c-brand-1);
85+
color: #ffffff;
86+
}
87+
88+
/* Drop the divider line VitePress puts above the Previous/Next page footer */
89+
.VPDocFooter .prev-next {
90+
border-top: none;
91+
}
92+
93+
/* Home page hero: index.md is a plain doc page (not VitePress's special
94+
layout: home) so the sidebar shows there like every other page. This is a
95+
hand-built lookalike of VitePress's VPHero component, styled with the same
96+
button/brand CSS variables the theme already defines. */
97+
.home-hero {
98+
text-align: center;
99+
padding: 32px 0 40px;
100+
}
101+
102+
.home-hero-logo {
103+
display: block;
104+
margin: 0 auto 20px;
105+
max-width: 320px;
106+
width: auto;
107+
height: auto;
108+
border-radius: 8px;
109+
}
110+
111+
.home-hero-title {
112+
display: flex;
113+
flex-direction: column;
114+
align-items: center;
115+
gap: 4px;
116+
border: none;
117+
margin: 0;
118+
padding: 0;
119+
line-height: 1.2;
120+
}
121+
122+
.home-hero-name {
123+
color: var(--vp-c-brand-1);
124+
font-size: clamp(28px, 5vw, 40px);
125+
font-weight: 700;
126+
}
127+
128+
.home-hero-text {
129+
color: var(--vp-c-text-1);
130+
font-size: clamp(28px, 5vw, 40px);
131+
font-weight: 700;
132+
}
133+
134+
.home-hero-tagline {
135+
margin: 12px 0 0;
136+
color: var(--vp-c-text-2);
137+
font-size: 18px;
138+
font-weight: 500;
139+
}
140+
141+
.home-hero-actions {
142+
display: flex;
143+
justify-content: center;
144+
gap: 12px;
145+
margin-top: 24px;
146+
}
147+
148+
.home-hero-btn {
149+
display: inline-block;
150+
border: 1px solid transparent;
151+
border-radius: 20px;
152+
padding: 0 20px;
153+
line-height: 38px;
154+
font-size: 14px;
155+
font-weight: 600;
156+
text-decoration: none;
157+
transition: color 0.25s, border-color 0.25s, background-color 0.25s;
158+
}
159+
160+
.home-hero-btn.brand {
161+
border-color: var(--vp-button-brand-border);
162+
color: var(--vp-button-brand-text);
163+
background-color: var(--vp-button-brand-bg);
164+
}
165+
166+
.home-hero-btn.brand:hover {
167+
border-color: var(--vp-button-brand-hover-border);
168+
color: var(--vp-button-brand-hover-text);
169+
background-color: var(--vp-button-brand-hover-bg);
170+
}
171+
172+
.home-hero-btn.alt {
173+
border-color: var(--vp-button-alt-border);
174+
color: var(--vp-button-alt-text);
175+
background-color: var(--vp-button-alt-bg);
176+
}
177+
178+
.home-hero-btn.alt:hover {
179+
border-color: var(--vp-button-alt-hover-border);
180+
color: var(--vp-button-alt-hover-text);
181+
background-color: var(--vp-button-alt-hover-bg);
182+
}
183+
184+
/* The nav logo lockup is wider than VitePress's default square-icon sizing
185+
assumes, plus it carries its own blue backdrop rather than a transparent
186+
background, so it already reads fine on both light and dark chrome. */
187+
:root {
188+
--vp-nav-logo-height: 28px;
189+
}
190+
191+
.VPNavBarTitle .logo {
192+
border-radius: 4px;
193+
}

docs/.vitepress/theme/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
import './custom.css'
3+
import type { Theme } from 'vitepress'
4+
5+
export default {
6+
extends: DefaultTheme
7+
} satisfies Theme

docs/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: The DirectProject
3+
---
4+
5+
<div class="home-hero">
6+
<img class="home-hero-logo" src="/logo.png" alt="the Direct Project" />
7+
<h1 class="home-hero-title">
8+
<span class="home-hero-name">DirectProject</span>
9+
<span class="home-hero-text">Java Reference Implementation</span>
10+
</h1>
11+
<p class="home-hero-tagline">Open source reference implementation of the Direct specifications</p>
12+
<div class="home-hero-actions">
13+
<a class="home-hero-btn brand" href="/overview">Overview</a>
14+
<a class="home-hero-btn alt" href="/agent/">Security And Trust Agent</a>
15+
</div>
16+
</div>

0 commit comments

Comments
 (0)