Skip to content

Commit 850334d

Browse files
authored
remove dummy content (#29)
* remove dummy content * do some stuff * add more things * complete as many as possible * remove dummy heading
1 parent bd28ba1 commit 850334d

File tree

31 files changed

+327
-66
lines changed

31 files changed

+327
-66
lines changed

src/components/SectionCards.astro

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
import { getCollection } from 'astro:content';
3+
import { SectionCards as SectionCardsReact } from './SectionCards.tsx';
4+
5+
interface Props {
6+
basePath: string;
7+
title?: string;
8+
customTitles?: Record<string, string>;
9+
useDirectFiles?: boolean;
10+
}
11+
12+
const { basePath, title, customTitles = {}, useDirectFiles = false } = Astro.props;
13+
14+
// Get sections - either index files from subdirectories or direct files
15+
const allSections = await getCollection('docs', ({ id }) => {
16+
// Must start with the base path
17+
if (!id.startsWith(basePath)) {
18+
return false;
19+
}
20+
21+
// Get the path after the base path
22+
const relativePath = id.substring(basePath.length);
23+
24+
// Split into parts and filter out empty strings
25+
const pathParts = relativePath.split('/').filter(part => part !== '');
26+
27+
if (useDirectFiles) {
28+
// For direct files, we should have exactly 1 part: [filename]
29+
// and it should not be an index file
30+
if (pathParts.length === 1) {
31+
const filename = pathParts[0];
32+
return !filename.startsWith('index');
33+
}
34+
} else {
35+
// For index files, we should have exactly 1 part: [subdirectory]
36+
// because index files get the ID of their parent directory in Astro
37+
if (pathParts.length === 1) {
38+
// Accept any single-level subdirectory - let the content collection handle validation
39+
return true;
40+
}
41+
}
42+
43+
return false;
44+
});
45+
46+
const sortedSections = allSections.sort((a, b) => {
47+
const titleA = a.data.title || a.data.linkTitle || '';
48+
const titleB = b.data.title || b.data.linkTitle || '';
49+
return titleA.localeCompare(titleB);
50+
});
51+
52+
const sectionData = sortedSections.map(section => {
53+
// Extract the key name from the section ID
54+
const relativePath = section.id.substring(basePath.length);
55+
const keyName = relativePath.split('/').filter(part => part !== '')[0];
56+
57+
// For direct files, we need to remove the file extension from the key
58+
const cleanKey = useDirectFiles ? keyName.replace(/\.(md|mdx)$/, '') : keyName;
59+
60+
// Use custom title if provided, otherwise fall back to the section title
61+
const sectionTitle = customTitles[cleanKey] || section.data.title || section.data.linkTitle || 'Unknown Section';
62+
const description = section.data.description || `Learn more about ${sectionTitle}`;
63+
64+
const href = `/${section.id}`;
65+
66+
return {
67+
title: sectionTitle,
68+
description,
69+
href
70+
};
71+
});
72+
73+
74+
---
75+
76+
<SectionCardsReact
77+
sections={sectionData}
78+
title={title}
79+
client:load
80+
/>

src/components/SectionCards.tsx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import React from 'react';
2+
import { ServiceBox } from './ServiceBox.tsx';
3+
4+
interface Section {
5+
title: string;
6+
description: string;
7+
href: string;
8+
}
9+
10+
interface SectionCardsProps {
11+
sections: Section[];
12+
title?: string;
13+
}
14+
15+
export const SectionCards: React.FC<SectionCardsProps> = ({
16+
sections,
17+
title
18+
}) => {
19+
return (
20+
<div className="searchable-services">
21+
{title && <h2 className="section-cards-title">{title}</h2>}
22+
23+
<div className="service-grid">
24+
{sections.map((section, index) => (
25+
<ServiceBox
26+
key={`${section.href}-${index}`}
27+
title={section.title}
28+
description={section.description}
29+
href={section.href}
30+
/>
31+
))}
32+
</div>
33+
</div>
34+
);
35+
};
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
---
22
title: Overview
3-
description: This is a dummy description.
3+
description: This section describes the configuration options available for LocalStack, and how to configure them to suit your needs.
44
template: doc
55
---
66

7-
# Config
7+
This section describes the configuration options, internal mechanisms, and other LocalStack-specific features that are available to users. The following figure shows an overview of the covered topics:
8+
9+
10+
11+
![Understanding LocalStack configuration](/images/aws/understanding-localstack-overview.png)

src/content/docs/aws/capabilities/index.md

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Capabilities
3+
description: This section describes the capabilities of LocalStack, that go beyond the core cloud service emulation, and provide additional features and capabilities for LocalStack users.
4+
template: doc
5+
sidebar:
6+
order: 5
7+
---
8+
9+
import SectionCards from '../../../../components/SectionCards.astro';
10+
11+
By emulating cloud services locally, LocalStack enables additional features and workflows that are not feasible on the cloud.
12+
13+
<SectionCards
14+
basePath="aws/capabilities/"
15+
customTitles={{
16+
"web-app": "LocalStack Web App",
17+
"config": "Configuration",
18+
"cloud-sandbox": "Cloud Sandbox",
19+
"networking": "Networking",
20+
"state-management": "State Management",
21+
"chaos-engineering": "Chaos Engineering",
22+
"security-testing": "Security Testing"
23+
}}
24+
/>

src/content/docs/aws/capabilities/networking/accessing-endpoint-url.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Accessing LocalStack via the endpoint URL
3-
description: This is a dummy description
3+
description: This documentation provides step-by-step guidance on how to access LocalStack services via the endpoint URL and troubleshoot common issues.
44
template: doc
55
sidebar:
66
order: 5

src/content/docs/aws/capabilities/networking/accessing-resources-created.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Accessing a resource created by LocalStack
3-
description: This is a dummy description
3+
description: This guide will explore different scenarios and provide detailed instructions on accessing resources created by LocalStack under different scenarios.
44
template: doc
55
sidebar:
66
order: 6
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
---
22
title: Overview
3-
description: This is a dummy description
3+
description: This section describes the networking capabilities of LocalStack, and how to configure them to suit your needs.
44
template: doc
55
sidebar:
66
order: 1
77
---
8-
9-
# Networking
10-

src/content/docs/aws/enterprise/enterprise-support.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Enterprise Support
3-
description: This is a dummy description
3+
description: This page describes the support options available for LocalStack Enterprise customers.
44
template: doc
55
sidebar:
66
order: 6
@@ -67,4 +67,4 @@ You need to fill out the following fields, which are mandatory to open a new tic
6767
- **CI Issue?** - If the query is related to a CI issue, select the one that best fits your query from the dropdown.
6868
- **Operating system** - From the dropdown, select the operating system you are using.
6969
- **Affected Services** - From the dropdown, select the AWS service that is affected in your query.
70-
- **File upload** - Here you can provide any additional files that you believe would be helpful for LocalStack support (e.g., screenshots, log files, etc.).
70+
- **File upload** - Here you can provide any additional files that you believe would be helpful for LocalStack support (e.g., screenshots, log files, etc.).

src/content/docs/aws/enterprise/index.md

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

0 commit comments

Comments
 (0)