-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🦄 feature: Add
frontmatter
support (#256)
- Loading branch information
1 parent
f5a9ec4
commit 052b0a6
Showing
17 changed files
with
275 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import tempo from '../../src'; | ||
import tempo from '../../packages/tempo/src'; | ||
|
||
function run() { | ||
return tempo() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import tempo from '../../src'; | ||
import tempo from '../../packages/tempo/src'; | ||
|
||
function run() { | ||
return tempo() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import tempo from '../../packages/tempo/src'; | ||
|
||
function run() { | ||
return tempo() | ||
.frontmatter({ | ||
title: 'Frontmatter Example', | ||
description: 'This is an example of frontmatter', | ||
tags: ['example', 'frontmatter'], | ||
published: true, | ||
version: 1, | ||
}) | ||
.h1('Hello World') | ||
.paragraph('This is a paragraph') | ||
.h2((text) => text.plainText('This is a heading with ').bold('bold text')) | ||
.paragraph((text) => text.bold('This is bold text')) | ||
.paragraph( | ||
(text) => `This is inline text ${text.italic('with italic text')}` | ||
) | ||
.paragraph((text) => | ||
text.plainText('Foobar is a thing').bold('that is bold') | ||
) | ||
.h2('Lists') | ||
.alert('This is an alert', 'caution') | ||
.paragraph('This is a list') | ||
.bulletList(['Item 1', 'Item 2', 'Item 3']) | ||
.paragraph('This is a numbered list') | ||
.numberList(['Item 1', 'Item 2', 'Item 3']) | ||
.toString(); | ||
} | ||
|
||
export default run; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import tempo from '../../src'; | ||
import tempo from '../../packages/tempo/src'; | ||
|
||
function run() { | ||
return tempo() | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: Frontmatter Example | ||
description: This is an example of frontmatter | ||
tags: | ||
- example | ||
- frontmatter | ||
published: true | ||
version: 1 | ||
--- | ||
# Hello World | ||
|
||
This is a paragraph | ||
|
||
## This is a heading with **bold text** | ||
|
||
**This is bold text** | ||
|
||
This is inline text _with italic text_ | ||
|
||
Foobar is a thing **that is bold** | ||
|
||
## Lists | ||
|
||
> [!CAUTION] | ||
> This is an alert | ||
This is a list | ||
|
||
- Item 1 | ||
- Item 2 | ||
- Item 3 | ||
|
||
This is a numbered list | ||
|
||
1. Item 1 | ||
2. Item 2 | ||
3. Item 3 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.