Writing docs

Get started with writing docs.

Get started

Firstly create a markdown file (.md or .mdx) and name it so it corresponds to the SidebarSchema we covered earlier. It must be in kebab-case.

Let’s create a markdown file called get-started.mdx

Inside every markdown file you must put title, description, and layout.

In each markdown file put this frontmatter at the top of the file:

src/pages/en/getting-started.mdx
---
layout: '@/layouts/Markdown.astro'
title: Getting Started
description: Learn how to get started with Stellar
---

Layout value should always be the same.

The title and description should be translated into the same language as the language of the folder in which they are located.

e.g.

English translation

src/pages/en/getting-started.mdx
---
layout: '@/layouts/Markdown.astro'
title: Getting Started
description: Learn how to get started with Stellar
---

Serbian translation

src/pages/sr/getting-started.mdx
---
layout: '@/layouts/Markdown.astro'
title: Pocnimo
description: Nauci kako da pocnes korisiti Stellar.
---

Now just start writing below that frontmatter.

Headings

I suggest you to only use h2 (##) or smaller since there is already a h1 at the top of the page (title).

Code

This project uses expressive-code for code blocks.

Syntax highlighting

If you want to add syntax highlighting to the codeblock add language code next to the opening tics:

```ts

const name: string = ‘John’

```

It will look like this:

const name: string = 'John'

Code block file name

If you want to add file name to the top of the code block type title=“file-name.js” next to the language code at the opening tics:

```ts title=“index.ts”

const name: string = ‘John’

```

It will look like this:

index.ts
const name: string = 'John'
Edit this page