Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit bd295f9

Browse files
committed
guides layout wip
1 parent a5b2b42 commit bd295f9

File tree

8 files changed

+72
-29
lines changed

8 files changed

+72
-29
lines changed

contentlayer.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ const Doc = defineDocumentType(() => ({
3232
type: 'boolean',
3333
description: 'Disable the github edit button',
3434
},
35+
tags: {
36+
type: 'list',
37+
of: {
38+
type: 'string',
39+
},
40+
description: 'The tags of the post, used by guides',
41+
},
3542
},
3643
computedFields: {
3744
slug: {

docs/guides/deploying/azure-pipelines.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
export const description =
2-
'Deploy to AWS, Google Cloud or Microsoft Azure using Azure DevOps and the Nitric CLI'
1+
---
2+
description: Deploy to AWS, Google Cloud or Microsoft Azure using Azure DevOps and the Nitric CLI
3+
tags:
4+
- CI/CD
5+
---
36

47
# Deployment Automation with Azure Pipelines and Nitric
58

docs/guides/deploying/github-actions.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
export const description =
2-
'Deploy to AWS, Google Cloud or Microsoft Azure using GitHub Actions and the Nitric CLI'
1+
---
2+
description: Deploy to AWS, Google Cloud or Microsoft Azure using GitHub Actions and the Nitric CLI
3+
tags:
4+
- CI/CD
5+
---
36

47
# Deployment Automation with GitHub Actions and Nitric
58

docs/guides/deploying/gitlab-ci.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
description: Deploy to AWS, Google Cloud or Microsoft Azure using GitLab CI and the Nitric CLI
3+
tags:
4+
- CI/CD
35
---
46

57
# Deployment Automation with GitLab CI and Nitric

docs/guides/deploying/google-cloud-build.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
export const description =
2-
'Deploy to AWS, Google Cloud or Microsoft Azure using Google Cloud Build and the Nitric CLI'
1+
---
2+
description: Deploy to AWS, Google Cloud or Microsoft Azure using Google Cloud Build and the Nitric CLI
3+
tags:
4+
- CI/CD
5+
---
36

47
# Deployment Automation with Google Cloud Build and Nitric
58

docs/guides/python/serverless-rest-api-example.mdx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
export const description =
2-
'Use the Nitric framework to easily build and deploy Python REST APIs for AWS, Azure or GCP'
3-
4-
export const title_meta = 'Building your first API with Python and Nitric'
1+
---
2+
title_seo: Building your first API with Python and Nitric
3+
description: Use the Nitric framework to easily build and deploy Python REST APIs for AWS, Azure or GCP
4+
tags:
5+
- API
6+
- Key Value Store
7+
---
58

69
# Building your first API with Nitric
710

docs/guides/python/text-prediction.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
export const description =
2-
'Use the Nitric framework and Tensorflow to easily train a prediction model and deploy to AWS, Google Cloud, or Azure'
1+
---
2+
description: Use the Nitric framework and Tensorflow to easily train a prediction model and deploy to AWS, Google Cloud, or Azure
3+
tags:
4+
- AI & Machine Learning
5+
---
36

47
# Building serverless text prediction from training to deployment
58

src/app/guides/page.tsx

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,42 @@ import Link from 'next/link'
1515
export default function GuidesPage() {
1616
const allGuides = allDocs.filter((doc) => doc.slug.startsWith('guides/'))
1717

18+
const allTags = allGuides
19+
.reduce((acc: string[], guide) => {
20+
if (guide.tags) {
21+
guide.tags.forEach((tag) => {
22+
if (!acc.includes(tag)) {
23+
acc.push(tag)
24+
}
25+
})
26+
}
27+
return acc
28+
}, [])
29+
.sort()
30+
1831
return (
19-
<div className="mx-auto flex h-full max-w-7xl flex-col gap-y-10 px-4 pb-10 pt-16">
20-
<Breadcrumb>
21-
<BreadcrumbList>
22-
<BreadcrumbItem>
23-
<BreadcrumbLink asChild>
24-
<Link href={'/'}>Docs</Link>
25-
</BreadcrumbLink>
26-
</BreadcrumbItem>
27-
<BreadcrumbSeparator />
28-
<BreadcrumbItem>
29-
<BreadcrumbPage>Guides</BreadcrumbPage>
30-
</BreadcrumbItem>
31-
</BreadcrumbList>
32-
</Breadcrumb>
33-
<Heading level={1}>Guides</Heading>
34-
<GuideList guides={allGuides} allTags={[]} />
35-
</div>
32+
<>
33+
<div className="mx-auto flex h-full max-w-7xl flex-col gap-y-10 px-4 py-16">
34+
<Breadcrumb>
35+
<BreadcrumbList>
36+
<BreadcrumbItem>
37+
<BreadcrumbLink asChild>
38+
<Link href={'/'}>Docs</Link>
39+
</BreadcrumbLink>
40+
</BreadcrumbItem>
41+
<BreadcrumbSeparator />
42+
<BreadcrumbItem>
43+
<BreadcrumbPage>Guides</BreadcrumbPage>
44+
</BreadcrumbItem>
45+
</BreadcrumbList>
46+
</Breadcrumb>
47+
<Heading level={1}>Guides</Heading>
48+
</div>
49+
<div className="-mx-2 border-t px-4 sm:-mx-6 lg:-mx-8">
50+
<div className="mx-auto max-w-7xl px-4">
51+
<GuideList guides={allGuides} allTags={allTags} />
52+
</div>
53+
</div>
54+
</>
3655
)
3756
}

0 commit comments

Comments
 (0)