Skip to content

docs: add missing docs for meta configuration option #379

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

Merged
merged 1 commit into from
Oct 18, 2024
Merged
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
30 changes: 30 additions & 0 deletions docs/tutorialkit.dev/src/content/docs/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,36 @@ type TemplateType = "html" | "node" | "angular-cli" | "create-react-app" | "java

```

##### `meta`

Configures `<meta>` tags for Open Graph protocole and Twitter.
TutorialKit will use your logo as the default image.
<PropertyTable inherited type="MetaTagsSchema" />

The `MetaTagsSchema` type has the following shape:

```ts
type MetaTagsSchema = {
image?: string;
description?: string;
title?: string;
}

```

Example value:
```yaml
meta:
image: /cover.png
title: Title shown on social media and search engines
description: Description shown on social media and search engines
```

:::tip
If your logo uses the SVG format, it may not display on most social platforms.
Use a raster format instead, such as WEBP or PNG.
:::

##### `custom`

Assign custom fields to a chapter/part/lesson.
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/schemas/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export type EditorSchema = z.infer<typeof editorSchema>;
export type CustomSchema = z.infer<typeof customSchema>;

export const webcontainerSchema = commandsSchema.extend({
meta: metaTagsSchema.optional(),
meta: metaTagsSchema.optional().describe('Configures `<meta>` tags for Open Graph protocole and Twitter.'),

custom: customSchema.optional().describe('Assign custom fields to a chapter/part/lesson in the Astro collection'),

Expand Down