Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added initial code for handbook #684

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 59 additions & 1 deletion contentlayer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,64 @@ export const Newsroom = defineDocumentType(() => ({
},
}))

export const Handbook = defineDocumentType(() => ({
name: 'Handbook',
filePathPattern: 'handbook/**/*.mdx',
contentType: 'mdx',
fields: {
title: { type: 'string', required: true },
date: { type: 'date', required: true },
tags: { type: 'list', of: { type: 'string' }, default: [] },
lastmod: { type: 'date' },
draft: { type: 'boolean' },
summary: { type: 'string' },
description: { type: 'string' },
images: { type: 'json' },
image: { type: 'string' },
authors: { type: 'list', of: { type: 'string' } },
layout: { type: 'string' },
bibliography: { type: 'string' },
canonicalUrl: { type: 'string' },
keywords: { type: 'list', of: { type: 'string' }, required: false },
slug: { type: 'string', required: false },
hide_table_of_contents: { type: 'boolean', required: false },
toc_min_heading_level: { type: 'number', required: false },
toc_max_heading_level: { type: 'number', required: false },
},
computedFields: {
...computedFields,
structuredData: {
type: 'json',
resolve: (doc) => ({
'@context': 'https://schema.org',
'@type': 'BlogPosting',
mainEntityOfPage: {
'@type': 'WebPage',
'@id': `https://signoz.io/handbook/${doc.slug}`,
},
author: {
'@type': 'Organization',
name: 'SigNoz',
},
publisher: {
'@type': 'Organization',
name: 'SigNoz',
logo: {
'@type': 'ImageObject',
url: 'https://signoz.io/img/SigNozLogo-orange.svg',
},
},
headline: doc.title,
datePublished: doc.date,
dateModified: doc.lastmod || doc.date,
description: doc.description,
image: `${siteMetadata.siteUrl}${doc.image || (doc.images ? doc.images[0] : siteMetadata.socialBanner)}`,
url: `${siteMetadata.siteUrl}/${doc._raw.flattenedPath}`,
}),
},
},
}))

export const Comparison = defineDocumentType(() => ({
name: 'Comparison',
filePathPattern: 'comparisons/*.mdx',
Expand Down Expand Up @@ -510,7 +568,7 @@ export const CaseStudy = defineDocumentType(() => ({

export default makeSource({
contentDirPath: 'data',
documentTypes: [Blog, Authors, Comparison, Guide, Opentelemetry, Doc, Newsroom, CaseStudy],
documentTypes: [Blog, Authors, Comparison, Guide, Opentelemetry, Doc, Newsroom, Handbook, CaseStudy],
mdx: {
cwd: process.cwd(),
remarkPlugins: [
Expand Down
19 changes: 19 additions & 0 deletions data/handbook/introduction.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Company Handbook
slug: introduction
date: 2024-07-31
tags: [OpenTelemetry, SigNoz]
authors: [pranay]
description: Welcome to SigNoz Handbook
image: /img/events/launch-week-1/launch-week-day-1-cover.webp
hide_table_of_contents: false
toc_min_heading_level: 2
toc_max_heading_level: 2
keywords:
- handbook
- signoz
- observability
---

👋 Welcome!
This handbook simply explains how we work.