Skip to content

Commit 445630e

Browse files
authored
add azure navigation to docs site (#451)
1 parent f3bd07b commit 445630e

File tree

13 files changed

+270
-2
lines changed

13 files changed

+270
-2
lines changed

astro.config.mjs

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export default defineConfig({
186186
starlightLlmsTxt({
187187
projectName: 'LocalStack',
188188
description:
189-
'LocalStack is a cloud service emulator that runs in a single container on your laptop or in your CI environment. It provides an easy-to-use test/mocking framework for developing cloud applications, with support for AWS services and Snowflake.',
189+
'LocalStack is a cloud service emulator that runs in a single container on your laptop or in your CI environment. It provides an easy-to-use test/mocking framework for developing cloud applications, with support for AWS services, Snowflake, and Azure.',
190190
customSets: [
191191
{
192192
label: 'AWS',
@@ -198,8 +198,13 @@ export default defineConfig({
198198
description: 'Documentation for LocalStack Snowflake emulation',
199199
paths: ['snowflake/**'],
200200
},
201+
{
202+
label: 'Azure',
203+
description: 'Documentation for LocalStack Azure emulation',
204+
paths: ['azure/**'],
205+
},
201206
],
202-
exclude: ['aws/changelog', 'snowflake/changelog'],
207+
exclude: ['aws/changelog', 'snowflake/changelog', 'azure/changelog'],
203208
rawContent: true,
204209
}),
205210
starlightImageZoom({
@@ -547,6 +552,38 @@ export default defineConfig({
547552
},
548553
],
549554
},
555+
{
556+
label: 'Azure',
557+
collapsed: true,
558+
items: [
559+
{
560+
label: 'Welcome',
561+
slug: 'azure',
562+
},
563+
{
564+
label: 'Getting Started',
565+
autogenerate: { directory: '/azure/getting-started' },
566+
collapsed: true,
567+
},
568+
{
569+
label: 'Local Azure Services',
570+
slug: 'azure/services',
571+
},
572+
{
573+
label: 'Sample Apps',
574+
slug: 'azure/sample-apps',
575+
},
576+
{
577+
label: 'Integrations',
578+
autogenerate: { directory: '/azure/integrations' },
579+
collapsed: true,
580+
},
581+
{
582+
label: 'Changelog',
583+
slug: 'azure/changelog',
584+
},
585+
],
586+
},
550587
],
551588
}),
552589
markdoc(),

public/js/icon-loader.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
Welcome: 'cube-icon',
88
'Getting Started': 'rocket-icon',
99
'Local AWS Services': 'cube-icon',
10+
'Local Azure Services': 'cube-icon',
1011
Features: 'cube-icon',
1112
'Feature Coverage': 'buildings-icon',
1213
'Sample Apps': 'file-icon',
@@ -101,6 +102,8 @@
101102
window.location.href = '/aws/';
102103
} else if (selectedValue === 'Snowflake') {
103104
window.location.href = '/snowflake/';
105+
} else if (selectedValue === 'Azure') {
106+
window.location.href = '/azure/';
104107
}
105108

106109
setTimeout(() => {

src/components/LanguageSelectWithGetStarted.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ import Default from '@astrojs/starlight/components/LanguageSelect.astro';
44
// Get the current page route
55
const route = Astro.locals.starlightRoute;
66
const isSnowflakePage = route.id.startsWith('snowflake');
7+
const isAzurePage = route.id.startsWith('azure');
78
89
let getStartedUrl = 'https://app.localstack.cloud/sign-up';
910
1011
if (isSnowflakePage) {
1112
getStartedUrl += '?emulator=snowflake';
13+
} else if (isAzurePage) {
14+
getStartedUrl += '?emulator=azure';
1215
}
1316
---
1417

src/components/PageTitleWithCopyButton.astro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ const hiddenPaths = [
2222
'snowflake/sample-apps',
2323
'snowflake/capabilities',
2424
'snowflake/integrations',
25+
'azure',
26+
'azure/services',
27+
'azure/sample-apps',
28+
'azure/integrations',
2529
];
2630
2731
// Check if copy page should be hidden (via frontmatter or path match)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
import { getCollection } from 'astro:content';
3+
import { SearchableAzureServices } from './SearchableAzureServices.tsx';
4+
5+
const allServices = await getCollection('docs', ({ id }) => {
6+
return id.startsWith('azure/services/') && !id.includes('/index');
7+
});
8+
9+
const sortedServices = allServices.sort((a, b) => {
10+
const titleA = a.data.title || a.data.linkTitle || '';
11+
const titleB = b.data.title || b.data.linkTitle || '';
12+
return titleA.localeCompare(titleB);
13+
});
14+
15+
const serviceData = sortedServices.map((service) => {
16+
const title = service.data.title || service.data.linkTitle || 'Unknown Service';
17+
const description = service.data.description || `Implementation details for ${title} API`;
18+
const href = `/${service.id}`;
19+
20+
return {
21+
title,
22+
description,
23+
href,
24+
};
25+
});
26+
---
27+
28+
<SearchableAzureServices services={serviceData} client:load />
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import React, { useMemo, useState } from 'react';
2+
import { ServiceBox } from './ServiceBox.tsx';
3+
4+
interface Service {
5+
title: string;
6+
description: string;
7+
href: string;
8+
}
9+
10+
interface SearchableAzureServicesProps {
11+
services: Service[];
12+
}
13+
14+
export const SearchableAzureServices: React.FC<SearchableAzureServicesProps> = ({
15+
services,
16+
}) => {
17+
const [searchTerm, setSearchTerm] = useState('');
18+
19+
const filteredServices = useMemo(() => {
20+
if (!searchTerm.trim()) {
21+
return services;
22+
}
23+
24+
const lowercaseSearch = searchTerm.toLowerCase();
25+
return services.filter(
26+
(service) =>
27+
service.title.toLowerCase().includes(lowercaseSearch) ||
28+
service.description.toLowerCase().includes(lowercaseSearch)
29+
);
30+
}, [services, searchTerm]);
31+
32+
return (
33+
<div className="searchable-services">
34+
<div className="search-container">
35+
<div className="search-input-wrapper">
36+
<svg
37+
className="search-icon"
38+
fill="none"
39+
stroke="currentColor"
40+
viewBox="0 0 24 24"
41+
xmlns="http://www.w3.org/2000/svg"
42+
>
43+
<path
44+
strokeLinecap="round"
45+
strokeLinejoin="round"
46+
strokeWidth={2}
47+
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
48+
/>
49+
</svg>
50+
<input
51+
type="text"
52+
placeholder="Search for Azure Service Name ..."
53+
value={searchTerm}
54+
onChange={(e) => setSearchTerm(e.target.value)}
55+
className="search-input"
56+
/>
57+
</div>
58+
</div>
59+
60+
{filteredServices.length === 0 && searchTerm.trim() ? (
61+
<div className="no-results">
62+
<p>No services found matching "{searchTerm}"</p>
63+
</div>
64+
) : (
65+
<div className="service-grid">
66+
{filteredServices.map((service, index) => (
67+
<ServiceBox
68+
key={`${service.href}-${index}`}
69+
title={service.title}
70+
description={service.description}
71+
href={service.href}
72+
/>
73+
))}
74+
</div>
75+
)}
76+
</div>
77+
);
78+
};

src/config/docsearch.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ export default {
2020
boostFilter = "hierarchy.lvl0:LocalStack for AWS";
2121
} else if (pathname.startsWith('/snowflake/')) {
2222
boostFilter = "hierarchy.lvl0:LocalStack for Snowflake";
23+
} else if (pathname.startsWith('/azure/')) {
24+
boostFilter = "hierarchy.lvl0:LocalStack for Azure";
2325
}
2426

2527
if (!boostFilter) {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Changelog
3+
description: Changelog for LocalStack for Azure.
4+
template: doc
5+
editUrl: false
6+
---
7+
8+
This changelog will track updates to LocalStack's Azure support, including new services, enhancements, and compatibility fixes.
9+
10+
### Upcoming
11+
12+
- Initial Azure documentation navigation and service discovery pages.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Installation
3+
description: Installation guide to get started with LocalStack for Azure.
4+
template: doc
5+
sidebar:
6+
order: 0
7+
---

src/content/docs/azure/index.mdx

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: Welcome to LocalStack for Azure Docs
3+
description: Get started with LocalStack for Azure docs.
4+
template: doc
5+
editUrl: false
6+
sidebar:
7+
label: Welcome
8+
order: 1
9+
---
10+
11+
import { OverviewCards, HeroCards } from '../../../components/OverviewCards';
12+
import rocketIcon from '../../../assets/images/GettingStarted_Color.svg';
13+
import connectionsIcon from '../../../assets/images/Integrations_Color.svg';
14+
import cubeIcon from '../../../assets/images/LSAWS_Color.svg';
15+
import fileIcon from '../../../assets/images/file.svg';
16+
import changeIcon from '../../../assets/images/change.svg';
17+
18+
<HeroCards
19+
cards={[
20+
{
21+
title: "Emulate Azure Services",
22+
href: "/azure/services"
23+
},
24+
{
25+
title: "Connect Azure Tooling",
26+
href: "/azure/integrations"
27+
}
28+
]}
29+
client:load
30+
/>
31+
32+
## What would you like to do today?
33+
34+
<OverviewCards
35+
cards={[
36+
{
37+
title: "Getting Started",
38+
description: "Install and run LocalStack for Azure on your machine.",
39+
href: "/azure/getting-started",
40+
icon: rocketIcon.src
41+
},
42+
{
43+
title: "Local Azure Services",
44+
description: "Browse the Azure services currently documented for LocalStack.",
45+
href: "/azure/services",
46+
icon: cubeIcon.src
47+
},
48+
{
49+
title: "Sample Apps",
50+
description: "Find and contribute end-to-end Azure sample apps for local development.",
51+
href: "/azure/sample-apps",
52+
icon: fileIcon.src
53+
},
54+
{
55+
title: "Integrations",
56+
description: "Use LocalStack for Azure with frameworks, SDKs, and developer tooling.",
57+
href: "/azure/integrations",
58+
icon: connectionsIcon.src
59+
},
60+
{
61+
title: "Changelog",
62+
description: "Track Azure emulator updates and release highlights.",
63+
href: "/azure/changelog",
64+
icon: changeIcon.src
65+
}
66+
]}
67+
client:load
68+
/>

0 commit comments

Comments
 (0)