Skip to content

Commit 061bd76

Browse files
committed
Add docs site
1 parent e6ffe32 commit 061bd76

24 files changed

Lines changed: 12834 additions & 357 deletions

.github/workflows/docs.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy-docs:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
environment:
16+
name: github-pages
17+
url: ${{ steps.deployment.outputs.page_url }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 22
28+
29+
- name: Clean npm cache and dependencies
30+
run: |
31+
rm -rf node_modules package-lock.json
32+
npm cache clean --force
33+
working-directory: docs
34+
35+
- name: Install dependencies
36+
run: npm install --force
37+
working-directory: docs
38+
39+
- name: Build documentation
40+
run: npm run build
41+
working-directory: docs
42+
43+
- name: Setup Pages
44+
uses: actions/configure-pages@v4
45+
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: docs/.vitepress/dist
50+
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

README.md

Lines changed: 89 additions & 357 deletions
Large diffs are not rendered by default.

docs/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
.vitepress/cache/
3+
.vitepress/dist/
4+
*.local
5+
.DS_Store
6+
*.log

docs/.vitepress/config.ts

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
import { defineConfig } from 'vitepress'
2+
import llmstxt from 'vitepress-plugin-llms'
3+
4+
export default defineConfig({
5+
title: 'Foundatio',
6+
description: 'Pluggable foundation blocks for building loosely coupled distributed apps',
7+
base: '/',
8+
ignoreDeadLinks: true,
9+
vite: {
10+
plugins: [
11+
llmstxt({
12+
title: 'Foundatio Documentation',
13+
ignoreFiles: ['node_modules/**', '.vitepress/**']
14+
})
15+
]
16+
},
17+
mermaid: {
18+
// Mermaid configuration
19+
},
20+
head: [
21+
['link', { rel: 'icon', href: 'https://raw.githubusercontent.com/FoundatioFx/Foundatio/main/media/foundatio-icon.png', type: 'image/png' }],
22+
['meta', { name: 'theme-color', content: '#3c8772' }]
23+
],
24+
themeConfig: {
25+
logo: {
26+
light: 'https://raw.githubusercontent.com/FoundatioFx/Foundatio/master/media/foundatio.svg',
27+
dark: 'https://raw.githubusercontent.com/FoundatioFx/Foundatio/master/media/foundatio-dark-bg.svg'
28+
},
29+
siteTitle: 'Foundatio',
30+
nav: [
31+
{ text: 'Guide', link: '/guide/what-is-foundatio' },
32+
{ text: 'GitHub', link: 'https://github.com/FoundatioFx/Foundatio' }
33+
],
34+
sidebar: {
35+
'/guide/': [
36+
{
37+
text: 'Introduction',
38+
items: [
39+
{ text: 'What is Foundatio?', link: '/guide/what-is-foundatio' },
40+
{ text: 'Getting Started', link: '/guide/getting-started' },
41+
{ text: 'Why Choose Foundatio?', link: '/guide/why-foundatio' }
42+
]
43+
},
44+
{
45+
text: 'Core Abstractions',
46+
items: [
47+
{ text: 'Caching', link: '/guide/caching' },
48+
{ text: 'Queues', link: '/guide/queues' },
49+
{ text: 'Locks', link: '/guide/locks' },
50+
{ text: 'Messaging', link: '/guide/messaging' },
51+
{ text: 'File Storage', link: '/guide/storage' },
52+
{ text: 'Jobs', link: '/guide/jobs' }
53+
]
54+
},
55+
{
56+
text: 'Advanced Topics',
57+
items: [
58+
{ text: 'Resilience', link: '/guide/resilience' },
59+
{ text: 'Dependency Injection', link: '/guide/dependency-injection' },
60+
{ text: 'Configuration', link: '/guide/configuration' }
61+
]
62+
},
63+
{
64+
text: 'Implementations',
65+
items: [
66+
{ text: 'In-Memory', link: '/guide/implementations/in-memory' },
67+
{ text: 'Redis', link: '/guide/implementations/redis' },
68+
{ text: 'Azure', link: '/guide/implementations/azure' },
69+
{ text: 'AWS', link: '/guide/implementations/aws' }
70+
]
71+
}
72+
]
73+
},
74+
socialLinks: [
75+
{ icon: 'github', link: 'https://github.com/FoundatioFx/Foundatio' },
76+
{ icon: 'discord', link: 'https://discord.gg/6HxgFCx' }
77+
],
78+
footer: {
79+
message: 'Released under the Apache 2.0 License.',
80+
copyright: 'Copyright © 2025 Foundatio'
81+
},
82+
editLink: {
83+
pattern: 'https://github.com/FoundatioFx/Foundatio/edit/main/docs/:path'
84+
},
85+
search: {
86+
provider: 'local'
87+
}
88+
},
89+
markdown: {
90+
lineNumbers: false,
91+
codeTransformers: [
92+
{
93+
name: 'snippet-transformer',
94+
preprocess(code, options) {
95+
return code
96+
}
97+
}
98+
]
99+
}
100+
})

docs/README.md

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# Foundatio Documentation
2+
3+
This is the documentation site for [Foundatio](https://github.com/FoundatioFx/Foundatio), built with [VitePress](https://vitepress.dev).
4+
5+
## Prerequisites
6+
7+
- [Node.js](https://nodejs.org/) 18.x or higher
8+
- npm (comes with Node.js)
9+
10+
## Getting Started
11+
12+
### Install Dependencies
13+
14+
```bash
15+
npm install
16+
```
17+
18+
### Development
19+
20+
Start the development server with hot-reload:
21+
22+
```bash
23+
npm run docs:dev
24+
```
25+
26+
The site will be available at `http://localhost:5173`.
27+
28+
### Build
29+
30+
Build the static site for production:
31+
32+
```bash
33+
npm run docs:build
34+
```
35+
36+
The built files will be in `.vitepress/dist`.
37+
38+
### Preview
39+
40+
Preview the production build locally:
41+
42+
```bash
43+
npm run docs:preview
44+
```
45+
46+
## Project Structure
47+
48+
```
49+
docs/
50+
├── .vitepress/
51+
│ ├── config.ts # VitePress configuration
52+
│ └── dist/ # Built output (generated)
53+
├── guide/
54+
│ ├── what-is-foundatio.md
55+
│ ├── getting-started.md
56+
│ ├── why-foundatio.md
57+
│ ├── caching.md
58+
│ ├── queues.md
59+
│ ├── locks.md
60+
│ ├── messaging.md
61+
│ ├── storage.md
62+
│ ├── jobs.md
63+
│ ├── resilience.md
64+
│ ├── dependency-injection.md
65+
│ ├── configuration.md
66+
│ └── implementations/
67+
│ ├── in-memory.md
68+
│ ├── redis.md
69+
│ ├── azure.md
70+
│ └── aws.md
71+
├── index.md # Home page
72+
├── package.json
73+
└── README.md # This file
74+
```
75+
76+
## Writing Documentation
77+
78+
### Adding New Pages
79+
80+
1. Create a new `.md` file in the appropriate directory
81+
2. Add frontmatter with title:
82+
```yaml
83+
---
84+
title: Your Page Title
85+
---
86+
```
87+
3. Add the page to the sidebar in `.vitepress/config.ts`
88+
89+
### Code Blocks
90+
91+
Use triple backticks with language identifier:
92+
93+
````markdown
94+
```csharp
95+
var cache = new InMemoryCacheClient();
96+
await cache.SetAsync("key", "value");
97+
```
98+
````
99+
100+
### Admonitions
101+
102+
VitePress supports custom containers:
103+
104+
```markdown
105+
::: info
106+
Informational message
107+
:::
108+
109+
::: tip
110+
Helpful tip
111+
:::
112+
113+
::: warning
114+
Warning message
115+
:::
116+
117+
::: danger
118+
Critical warning
119+
:::
120+
```
121+
122+
### Internal Links
123+
124+
Use relative paths for internal links:
125+
126+
```markdown
127+
[Getting Started](./getting-started)
128+
[Caching Guide](./caching.md)
129+
```
130+
131+
## Plugins
132+
133+
This documentation site uses:
134+
135+
- **vitepress-plugin-llms**: Generates LLM-friendly documentation at `/llms.txt`
136+
- **vitepress-plugin-mermaid**: Enables Mermaid diagrams in markdown
137+
138+
### Mermaid Diagrams
139+
140+
```markdown
141+
```mermaid
142+
graph LR
143+
A[Client] --> B[Cache]
144+
B --> C[Redis]
145+
```
146+
```
147+
148+
## Deployment
149+
150+
The documentation can be deployed to any static hosting service:
151+
152+
- GitHub Pages
153+
- Netlify
154+
- Vercel
155+
- Azure Static Web Apps
156+
- AWS S3 + CloudFront
157+
158+
### GitHub Pages
159+
160+
1. Build the site: `npm run docs:build`
161+
2. Deploy `.vitepress/dist` to `gh-pages` branch
162+
163+
### Netlify / Vercel
164+
165+
Connect your repository and configure:
166+
- Build command: `npm run docs:build`
167+
- Output directory: `.vitepress/dist`
168+
169+
## Contributing
170+
171+
1. Fork the repository
172+
2. Create a feature branch
173+
3. Make your changes
174+
4. Run the dev server to preview
175+
5. Submit a pull request
176+
177+
## License
178+
179+
This documentation is part of the Foundatio project and is licensed under the same terms.

0 commit comments

Comments
 (0)