Color mode

Writing content

This guide covers the basics of writing articles for a Riebeckite site. It is aimed at users who are new to Markdown or static publishing.

Where articles live

By default, articles live in the content/ folder.

text
my-site/
`- content/
   |- index.md
   `- first-post.md

first-post.md is shown at /first-post. index.md is a useful name for the top page.

The smallest article

A published article starts with frontmatter.

md
---
title: First post
publish: true
---
 
# First post
 
Write the article body here.
  • title: the article title used by the site
  • publish: true: marks the article as published

Files without publish: true can be kept as drafts.

Common Markdown

md
# Main heading
 
## Section heading
 
Body text. Use a blank line to start a new paragraph.
 
- List item
- Another item
 
[External link](https://example.com)
 
![Image description](/images/photo.jpg)

Heading levels are controlled by the number of # characters. Whether to repeat the article title as a top-level heading in the body depends on your site design.

File names and URLs

File names become URL paths.

File URL
content/index.md /
content/about.md /about
content/posts/first.md /posts/first

For readable URLs, use lowercase letters, numbers, and hyphens in file names.

Published articles and drafts

Published article:

md
---
title: Published article
publish: true
---

Draft:

md
---
title: Draft article
---

Drafts are not emitted as public pages.

Normal Markdown links work.

md
[Profile](/about)

Obsidian-style WikiLinks can also be used when the configured plugins support them.

md
[[about]]
[[about|Profile]]

Images

A nearby image folder is easy to manage.

text
content/
|- first-post.md
`- images/
   `- photo.jpg

Reference the image from the article.

md
![Photo](/images/photo.jpg)

Check before publishing

After adding articles, run these commands from the site folder.

sh
npm exec riebeckite check
npm exec riebeckite doctor
npm exec riebeckite dev

Use dev to preview the site in a browser. When it looks good, build it.

sh
npm exec riebeckite build

Next steps

History

1 changesCollapseExpand
1 + # Writing content
2 +
3 + This guide covers the basics of writing articles for a Riebeckite site. It is aimed at users who are new to Markdown or static publishing.
4 +
5 + ## Where articles live
6 +
7 + By default, articles live in the `content/` folder.
8 +
9 + ```text
10 + my-site/
11 + `- content/
12 + |- index.md
13 + `- first-post.md
14 + ```
15 +
16 + `first-post.md` is shown at `/first-post`. `index.md` is a useful name for the top page.
17 +
18 + ## The smallest article
19 +
20 + A published article starts with frontmatter.
21 +
22 + ```md
23 + ---
24 + title: First post
25 + publish: true
26 + ---
27 +
28 + # First post
29 +
30 + Write the article body here.
31 + ```
32 +
33 + - `title`: the article title used by the site
34 + - `publish: true`: marks the article as published
35 +
36 + Files without `publish: true` can be kept as drafts.
37 +
38 + ## Common Markdown
39 +
40 + ```md
41 + # Main heading
42 +
43 + ## Section heading
44 +
45 + Body text. Use a blank line to start a new paragraph.
46 +
47 + - List item
48 + - Another item
49 +
50 + [External link](https://example.com)
51 +
52 + ![Image description](/images/photo.jpg)
53 + ```
54 +
55 + Heading levels are controlled by the number of `#` characters. Whether to repeat the article title as a top-level heading in the body depends on your site design.
56 +
57 + ## File names and URLs
58 +
59 + File names become URL paths.
60 +
61 + |File|URL|
62 + |---|---|
63 + |`content/index.md`|`/`|
64 + |`content/about.md`|`/about`|
65 + |`content/posts/first.md`|`/posts/first`|
66 +
67 + For readable URLs, use lowercase letters, numbers, and hyphens in file names.
68 +
69 + ## Published articles and drafts
70 +
71 + Published article:
72 +
73 + ```md
74 + ---
75 + title: Published article
76 + publish: true
77 + ---
78 + ```
79 +
80 + Draft:
81 +
82 + ```md
83 + ---
84 + title: Draft article
85 + ---
86 + ```
87 +
88 + Drafts are not emitted as public pages.
89 +
90 + ## Internal links
91 +
92 + Normal Markdown links work.
93 +
94 + ```md
95 + [Profile](/about)
96 + ```
97 +
98 + Obsidian-style WikiLinks can also be used when the configured plugins support them.
99 +
100 + ```md
101 + [[about]]
102 + [[about|Profile]]
103 + ```
104 +
105 + ## Images
106 +
107 + A nearby image folder is easy to manage.
108 +
109 + ```text
110 + content/
111 + |- first-post.md
112 + `- images/
113 + `- photo.jpg
114 + ```
115 +
116 + Reference the image from the article.
117 +
118 + ```md
119 + ![Photo](/images/photo.jpg)
120 + ```
121 +
122 + ## Check before publishing
123 +
124 + After adding articles, run these commands from the site folder.
125 +
126 + ```sh
127 + npm exec riebeckite check
128 + npm exec riebeckite doctor
129 + npm exec riebeckite dev
130 + ```
131 +
132 + Use `dev` to preview the site in a browser. When it looks good, build it.
133 +
134 + ```sh
135 + npm exec riebeckite build
136 + ```
137 +
138 + ## Next steps
139 +
140 + - [Fast path to publishing a site](../getting-started/deployment.en.md)
141 + - [Publishing Obsidian notes](./obsidian.en.md)
142 + - [Configuration](../reference/configuration.en.md)
143 +