756 words
4 minutes
Writing Guide for Marrakesh Sentinel

Where to Place the Post Files#

They should be placed in src/content/posts/ directory. You can also create sub-directories to better organize your posts and assets.

src/content/posts/
├── post-1.md
└── post-2/
├── cover.png
└── index.md

Front-matter of Posts#

Each post in Marrakesh Sentinel starts with a front-matter section written in YAML format. This section contains metadata about the post, such as its title, publication date, description, tags, and more.

Example#

---
title: Title of the publication
published: 2026-10-01
description: Description of the publication.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
---

Supported Attributes#

AttributeDescription
titleThe title of the post.
publishedThe date the post was published.
descriptionA short description of the post. Displayed on index page.
imageThe cover image path of the post.
1. Start with http:// or https://: Use web image
2. Start with /: For image in public dir
3. With none of the prefixes: Relative to the markdown file
tagsThe tags of the post.
categoryThe category of the post.
draftIf this post is still a draft, which won’t be displayed.

Syntax Overview#

This document defines the complete syntax supported by Marrakesh Sentinel and demonstrates how each element renders.

Headings#

# Heading 1
## Heading 2
### Heading 3
#### Heading 4

Text Formatting#

Source#

*italic* **bold** ~~strikethrough~~ __underline__ <mark>highlighted</mark> `inline code`

Preview#

italic bold strikethrough underline highlighted inline code

Source#

[Visit Marrakesh Sentinel](https://marrakeshsentinel.com)

Preview#

Visit Marrakesh Sentinel

Images#

Source#

![Image Title](https://images.unsplash.com/photo-1768742574399-bf73e164336d?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D )

Preview#

Image Title

Blockquotes#

Source#

> The desert teaches clarity.
>
>> Nested quotes are supported.

Preview#

The desert teaches clarity.

Nested quotes are supported.

Lists#

Unordered List#

Source#
- Alpha
- Beta
- Nested item
Preview#
  • Alpha

  • Beta

    • Nested item

Ordered List#

Source#
1. First
2. Second
3. Third
Preview#
  1. First
  2. Second
  3. Third

Task Lists#

Source#
- [x] Parse input
- [ ] Render output
Preview#
  • Parse input
  • Render output

Tables#

Source#

| Feature | Supported | Notes |
|---------|-----------|-------------|
| Bold | Yes | **Syntax** |
| Code | Yes | Inline & blocks |

Preview#

FeatureSupportedNotes
BoldYesSyntax
CodeYesInline & blocks

Code Blocks#

Source#

```js
function greet(name) {
return `Hello, ${name}`;
}
#``` remove the extra #

Preview#

function greet(name) {
return `Hello, ${name}`;
}

Admonitions#

Following types of admonitions are supported: note tip important warning caution

Source#

:::note
Highlights information that users should take into account, even when skimming.
:::
:::tip
Optional information to help a user be more successful.
:::
:::important
Crucial information necessary for users to succeed.
:::
:::warning
Critical content demanding immediate user attention due to potential risks.
:::
:::caution
Negative potential consequences of an action.
:::

Preview#

NOTE

Highlights information that users should take into account, even when skimming.

TIP

Optional information to help a user be more successful.

IMPORTANT

Crucial information necessary for users to succeed.

WARNING

Critical content demanding immediate user attention due to potential risks.

CAUTION

Negative potential consequences of an action.

Footnotes#

Source#

This sentence needs context.[^1]
[^1]: Footnotes appear at the end of the document.

Preview#

This sentence needs context.1

Spoiler#

You can add spoilers to your text. The text also supports Markdown syntax.

The content is hidden ayyy!

The content :spoiler[is hidden **ayyy**]!

Embedded Videos#

Just copy the embed code from YouTube or other platforms, and paste it in the markdown file.

<iframe width="560" height="315" src="https://www.youtube.com/embed/Ujvy-DEA-UM?si=paJ8jEySsc9MdtqN" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

Advanced Code Block Features#

GitHub Repository Cards#

You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.

Source#
::github{repo="meel-hd/sentinel"}
Preview#
meel-hd
/
sentinel
Waiting for api.github.com...
00K
0K
0K
Waiting...

Rendering ANSI escape sequences#

Terminal window
ANSI colors:
- Regular: Red Green Yellow Blue Magenta Cyan
- Bold: Red Green Yellow Blue Magenta Cyan
- Dimmed: Red Green Yellow Blue Magenta Cyan
256 colors (showing colors 160-177):
160 161 162 163 164 165
166 167 168 169 170 171
172 173 174 175 176 177
Full RGB colors:
ForestGreen - RGB(34, 139, 34)
Text formatting: Bold Dimmed Italic Underline

Code editor frames#

my-test-file.js
console.log('Title attribute example')
src/content/index.html
<div>File name comment example</div>

Terminal frames#

Terminal window
echo "This terminal frame has no title"
PowerShell terminal example
Write-Output "This one has a title!"

Math#

Learn More!

Source#
$$
E = mc^2
$$
$$
\begin{aligned}
E &= mc^2 \\[6pt]
\mathcal{L}(\phi,\partial\phi) &= \tfrac{1}{2}\partial_\mu\phi\,\partial^\mu\phi - \tfrac{1}{2}m^2\phi^2 \\[6pt]
\Box\phi + m^2\phi &= 0
\end{aligned}
$$
$$
\mathbf{A} =
\begin{pmatrix}
1 & 2 & 3 \\
0 & -1 & 4 \\
5 & 6 & 0
\end{pmatrix},
\qquad
\det(\mathbf{A}) = 1\cdot\det\!\begin{pmatrix}-1&4\\6&0\end{pmatrix}
-2\cdot\det\!\begin{pmatrix}0&4\\5&0\end{pmatrix}
+3\cdot\det\!\begin{pmatrix}0&-1\\5&6\end{pmatrix}
$$
$$
\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi},
\qquad
\sum_{n=0}^{\infty}\frac{x^n}{n!}=e^{x}
$$
$$
f(x)=
\begin{cases}
x^2 & x \ge 0\\[4pt]
-x & x < 0
\end{cases}
$$
$$
\begin{aligned}
\nabla\cdot\mathbf{E} &= \frac{\rho}{\varepsilon_0} \\[4pt]
\nabla\times\mathbf{B} - \dfrac{1}{c^2}\dfrac{\partial\mathbf{E}}{\partial t} &= \mu_0 \mathbf{J}
\end{aligned}
$$
Preview#
E=mc2E = mc^2E=mc2L(ϕ,ϕ)=12μϕμϕ12m2ϕ2ϕ+m2ϕ=0\begin{aligned} E &= mc^2 \\[6pt] \mathcal{L}(\phi,\partial\phi) &= \tfrac{1}{2}\partial_\mu\phi\,\partial^\mu\phi - \tfrac{1}{2}m^2\phi^2 \\[6pt] \Box\phi + m^2\phi &= 0 \end{aligned}A=(123014560),det(A)=1det ⁣(1460)2det ⁣(0450)+3det ⁣(0156)\mathbf{A} = \begin{pmatrix} 1 & 2 & 3 \\ 0 & -1 & 4 \\ 5 & 6 & 0 \end{pmatrix}, \qquad \det(\mathbf{A}) = 1\cdot\det\!\begin{pmatrix}-1&4\\6&0\end{pmatrix} -2\cdot\det\!\begin{pmatrix}0&4\\5&0\end{pmatrix} +3\cdot\det\!\begin{pmatrix}0&-1\\5&6\end{pmatrix}ex2dx=π,n=0xnn!=ex\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}, \qquad \sum_{n=0}^{\infty}\frac{x^n}{n!}=e^{x}f(x)={x2x0xx<0f(x)= \begin{cases} x^2 & x \ge 0\\[4pt] -x & x < 0 \end{cases}E=ρε0×B1c2Et=μ0J\begin{aligned} \nabla\cdot\mathbf{E} &= \frac{\rho}{\varepsilon_0} \\[4pt] \nabla\times\mathbf{B} - \dfrac{1}{c^2}\dfrac{\partial\mathbf{E}}{\partial t} &= \mu_0 \mathbf{J} \end{aligned}

Footnotes#

  1. Footnotes appear at the end of the document.

Writing Guide for Marrakesh Sentinel
https://marrakeshsentinel.com/posts/guide/
Author
Marrakesh Sentinel
Published at
2026-10-01
License
CC BY-NC-SA 4.0