Skip to content

Commit

Permalink
use diff characters to fix frontmatter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JackDevAU authored Nov 1, 2023
1 parent 5bb8502 commit d90045d
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
–––
type: rule
title: Do you know the best practices for Frontmatter in markdown?
uri: do-you-know-the-best-practices-for-frontmatter-in-markdown
Expand All @@ -9,7 +9,7 @@ authors:
url: https://www.ssw.com.au/people/ozair-ashfaque/
created: 2023-10-30T23:25:28.835Z
guid: 7c0bb2bb-06b7-45a7-a3a5-5b1b27f7fef2
---
–––

Frontmatter is a critical component in markdown files, especially when generating static sites or handling content management. It allows authors and developers to embed metadata directly at the beginning of a markdown document. This metadata can include information about the document's title, author, date, and other attributes. A well-structured Frontmatter ensures that the markdown processor can quickly extract the necessary metadata and use it for various purposes, like generating page titles or categorizing posts.

Expand All @@ -29,10 +29,10 @@ However, avoid non-standard practices like mixing data types or adding unnecessa

::: greybox
```
---
–––
title+author: My Article by John
2023-10-31
---
–––
```
:::

Expand All @@ -42,11 +42,11 @@ Figure: Bad Example {Non-standard practices can lead to parsing errors and incon

::: greybox
```
---
–––
title: My Article
author: John Doe
date: 2023-10-31
---
–––
```
:::

Expand All @@ -71,9 +71,9 @@ However, avoid the common mistake of listing values in a continuous string. This

::: greybox
```
---
–––
authors: John Doe, Jane Smith, Bob Johnson
---
–––
```
:::

Expand All @@ -85,12 +85,12 @@ Here's how you can effectively use arrays:

::: greybox
```
---
–––
authors:
- John Doe
- Jane Smith
- Bob Johnson
---
–––
```
:::

Expand Down

0 comments on commit d90045d

Please sign in to comment.