Writing Basics
Methanol provides native support for Markdown and MDX. Standard Markdown syntax satisfies most structural and content requirements, while JSX components can be introduced for advanced layouts or interactive features.
Page Structure
---
title: My Page
excerpt: Short summary used for meta tags
---
# My Page
Content goes here.
The block at the top, enclosed by ---, is the Frontmatter. It is used to define page configurations and metadata, as detailed below.
Headings and Table of Contents
##, ###, and #### headings are automatically utilized to generate the table of contents. Maintaining a clear hierarchy ensures the sidebar navigation remains readable.
Body Text and Paragraphs
In Markdown, content is primarily composed of paragraphs:
- Separate paragraphs with a blank line.
- Newlines within a single paragraph are typically treated as spaces (no forced line break).
- To force a line break, add two spaces at the end of a line or use the
<br />tag (MDX supports JSX/HTML).
Example:
First paragraph line 1
First paragraph line 2 (typically merges with the previous line)
Second paragraph
This line ends with two spaces
resulting in a line break
Blockquotes
> This is a blockquote.
>
> A line containing only `>` represents a blank line within the same block.
> Consecutive quoted lines are merged into a single block.
> A blank line between `>` blocks renders them as separate quotes.
Rendered result:
This is a blockquote.
A line containing only
>represents a blank line within the same block. Consecutive quoted lines are merged into a single block.
A blank line between
>blocks renders them as separate quotes.
Code Blocks
Use fenced code blocks with language identifiers for syntax highlighting:
```js
export const title = 'Hello'
```
Rendered result:
export const title = 'Hello'
Learning Markdown
This page focuses on the Methanol + MDX integration. For a comprehensive Markdown syntax reference, please consult:
Frontmatter Configuration Tips
Frequently used fields for authors:
title: Page title and navigation label.excerpt: Brief description for Meta tags.date: Publication date (ISO format).weight: Navigation display order.
For a full list of available fields, see the Frontmatter Reference.