Skip to content

Commit bf83f9e

Browse files
authored
Merge pull request #144 from deploystackio/feat/domain-hosting
Feat/domain hosting
2 parents f809ac1 + bc48414 commit bf83f9e

60 files changed

Lines changed: 3870 additions & 239 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import type { Metadata } from 'next';
2+
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
23
import { DocsPage, DocsBody } from 'fumadocs-ui/page';
34
import { notFound } from 'next/navigation';
45
import { source } from '@/lib/source';
56
import { generatePageMetadata, getCanonicalUrl } from '@/lib/seo-utils';
6-
import { CustomNavbar } from '@/lib/components/CustomNavbar';
77
import { getFinalPageTitle } from '@/lib/h1-extractor';
88
import { readFile } from 'fs/promises';
99
import { getMDXComponents } from '@/mdx-components';
10+
import { baseOptions } from '../layout.config';
1011

1112
export default async function Page({
1213
params,
@@ -23,12 +24,23 @@ export default async function Page({
2324
const MDX = page.data.body;
2425

2526
return (
26-
<DocsPage toc={page.data.toc} full={page.data.full}>
27-
<CustomNavbar />
28-
<DocsBody>
29-
<MDX components={getMDXComponents()} />
30-
</DocsBody>
31-
</DocsPage>
27+
<DocsLayout
28+
{...baseOptions}
29+
tree={source.pageTree}
30+
nav={{
31+
title: 'DeployStack Docs',
32+
url: '/',
33+
}}
34+
sidebar={{
35+
defaultOpenLevel: 1
36+
}}
37+
>
38+
<DocsPage toc={page.data.toc} full={page.data.full}>
39+
<DocsBody>
40+
<MDX components={getMDXComponents()} />
41+
</DocsBody>
42+
</DocsPage>
43+
</DocsLayout>
3244
);
3345
}
3446

app/docs/layout.tsx

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

app/docs/sitemap.xml/route.ts

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

app/layout.config.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
22

33
export const baseOptions: BaseLayoutProps = {
4-
// Navigation bar configuration (now handled by CustomNavbar)
4+
// Navigation bar configuration
55
nav: {
66
title: 'DeployStack Docs',
7-
url: '/docs',
7+
url: '/',
88
},
99

1010
// GitHub repository for edit links

check-links.js

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,35 @@ const extractLinks = (content) => {
2525

2626
// Check if a local file exists
2727
const checkLocalFile = (linkPath, filePath) => {
28-
if (linkPath.startsWith('/docs/')) {
28+
// Check for internal links (starting with / but not external URLs)
29+
if (linkPath.startsWith('/') && !linkPath.startsWith('//') && !linkPath.startsWith('http')) {
2930
// Remove hash fragment before checking file existence
3031
const [baseUrl] = linkPath.split('#');
31-
const localPath = path.join(process.cwd(), baseUrl);
3232

33-
try {
34-
fs.accessSync(localPath, fs.constants.F_OK);
35-
console.log(` ✅ ${linkPath}`);
36-
return true;
37-
} catch (err) {
38-
console.log(` ❌ ${linkPath} → File not found`);
39-
return false;
33+
// Map the URL to the actual file location
34+
// Since our URLs are now root-level but files are in docs/
35+
const actualFilePath = path.join(process.cwd(), 'docs', baseUrl.substring(1));
36+
37+
// Try both .mdx and .md extensions
38+
const possiblePaths = [
39+
actualFilePath + '.mdx',
40+
actualFilePath + '.md',
41+
path.join(actualFilePath, 'index.mdx'),
42+
path.join(actualFilePath, 'index.md')
43+
];
44+
45+
for (const possiblePath of possiblePaths) {
46+
try {
47+
fs.accessSync(possiblePath, fs.constants.F_OK);
48+
console.log(` ✅ ${linkPath}`);
49+
return true;
50+
} catch (err) {
51+
// Continue to next possible path
52+
}
4053
}
54+
55+
console.log(` ❌ ${linkPath} → File not found (checked: ${possiblePaths.map(p => path.relative(process.cwd(), p)).join(', ')})`);
56+
return false;
4157
}
4258
return null; // not a local file
4359
};
@@ -79,7 +95,8 @@ const processFile = async (filePath) => {
7995

8096
let allValid = true;
8197
for (const link of links) {
82-
if (link.url.startsWith('/docs/')) {
98+
if (link.url.startsWith('/') && !link.url.startsWith('//') && !link.url.startsWith('http')) {
99+
// Internal link (root-level)
83100
const isValid = checkLocalFile(link.url, filePath);
84101
if (!isValid) allValid = false;
85102
} else if (link.url.startsWith('http')) {
@@ -109,7 +126,7 @@ const processDirectory = async (dir) => {
109126
if (stat.isDirectory()) {
110127
const isValid = await processDirectory(filePath);
111128
if (!isValid) allValid = false;
112-
} else if (file.endsWith('.md')) {
129+
} else if (file.endsWith('.md') || file.endsWith('.mdx')) {
113130
const isValid = await processFile(filePath);
114131
if (!isValid) allValid = false;
115132
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: Application Logo Configuration
3+
description: DeployStack logo configuration guide. Add a custom logo to your application with automatic WebP conversion, CDN delivery, and square format optimization.
4+
---
5+
6+
# Application Logo Configuration
7+
8+
Add a custom logo to make your application stand out in the DeployStack catalog. Your logo will be automatically optimized and served through our CDN for the best performance.
9+
10+
## Adding Your Logo
11+
12+
Configure your logo in `.deploystack/config.yml` - [DeployStack Configuration File Reference](/docs/deploystack/deploystack-config-file):
13+
14+
```yaml
15+
application:
16+
logo: "https://example.com/path/to/logo.png"
17+
```
18+
19+
## Logo Requirements
20+
21+
### Supported Formats
22+
23+
- PNG (`.png`)
24+
- JPEG (`.jpg`, `.jpeg`)
25+
- WebP (`.webp`)
26+
- SVG (`.svg`)
27+
28+
### Size Guidelines
29+
30+
- Maximum input: 2 MB.
31+
- Final output will be:
32+
- Square format (1:1 aspect ratio)
33+
- Maximum 500x500 pixels
34+
- Input images will be:
35+
- Resized if larger than 500px in either dimension
36+
- Centered and cropped to maintain 1:1 aspect ratio
37+
- Padded with transparency if needed to achieve square format
38+
39+
## Image Processing
40+
41+
When you configure a logo, DeployStack automatically:
42+
43+
1. Downloads your original image
44+
2. Optimizes it for web delivery
45+
3. Converts it to WebP format
46+
4. Stores it on our CDN
47+
5. Serves it through our global CDN network
48+
49+
### Optimization Process
50+
51+
- Images larger than 500px in either dimension are resized
52+
- Conversion to WebP for optimal compression
53+
- Automatic quality optimization for web delivery
54+
55+
## Notes
56+
57+
- The logo configuration is optional
58+
- You can update your logo at any time by modifying the config file
59+
- Logo changes are processed only when made on the default branch
60+
- Previous logo versions are automatically cleaned up

0 commit comments

Comments
 (0)