Writing posts
All posts must go in one of the sections in the src/content/posts
directory. If none of the sections match the content of your post, open an issue and I'll try to help out.
Frontmatter
Posts
Each post must have the following frontmatter properties:
title
: stringThe title of the post.
description
: stringA short description of what the post is about.
date
: ISO dateWhen the post was initially published.
lastmod
: ISO date (optional)When the post was last modified after publishing.
Frontmatter must be in YAML format.
Example:
---
title: "Google: A Misrepresented Evil"
description: Don't be evil, sometimes.
date: 2022-08-12
lastmod: 2022-11-26 # Optional
---
Content
Headings
You should only use headings 2 to 6 in posts
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Text
If paragraphs are getting too long, they should be split up into multiple paragraphs. A good estimate would be if the paragraph exceeds 4-5 lines in your code editor (with soft wrapping enabled). Do not use <br>
to split up paragraphs, use normal Znak paragraph spacing.
HTML elements should be avoided if a Znak equivalent is available. The blog uses Znak syntax, so you should follow that.
Instead of >
blockquotes, the quote
container should be used.
Adding files
Files that support your text, such as code, should go in public/files/
and can be accessed using /files/[your-file]
. If you're linking a code file, you should do so with:
<a href="/files/[your-file]" download="[your-file]">Download the file (you can write whatever you want here)</a>
Images should go in the content
directory with your files, and can be accessed relative to the post. For example, the notes/mozilla
post references images in notes/mozilla/[image].png
with ![Alt text](./mozilla/[image].png)
. Images in the notes
collection should not be accessed by posts in the posts
collection, and vice versa. All images should have alt text.
Containers
Note
::: note [note title]
[note content]
:::
The note title is optional, and the default title is "NOTE".
Quote
::: quote [quote title] {href="[quote link]"}
[quote content]
:::
The quote title and link are both optional, but highly recommended. The default title is "QUOTE".
Warning
::: warning [warning title]
[warning content]
:::
The warning title is optional, and the default title is "WARNING".