@rm-industries/create-forge 0.4.0-beta.3 → 0.4.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,14 +18,14 @@ tags:
|
|
|
18
18
|
draft: false
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
# My first article
|
|
22
|
-
|
|
23
21
|
Write the article body here.
|
|
24
22
|
```
|
|
25
23
|
|
|
26
24
|
The file name becomes the article slug. Use a unique lowercase, hyphenated file
|
|
27
25
|
name. Required fields, dates, defaults, and body content are validated during
|
|
28
|
-
development, type checking, and builds.
|
|
26
|
+
development, type checking, and builds. Do not repeat the title as a top-level
|
|
27
|
+
Markdown heading: the front matter `title` is the article's document title, and
|
|
28
|
+
the article layout renders it as the page heading.
|
|
29
29
|
|
|
30
30
|
Set `draft: true` while writing. Draft articles appear during local development
|
|
31
31
|
but are omitted from production article pages and RSS output. Before publishing:
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
|
|
3
|
+
import { describe, expect, it } from 'vitest';
|
|
4
|
+
|
|
5
|
+
describe('documentation examples', () => {
|
|
6
|
+
it('does not duplicate the article title as a Markdown heading', async () => {
|
|
7
|
+
const guide = await readFile(new URL('../docs/guides/content-and-cms.md', import.meta.url), 'utf8');
|
|
8
|
+
const articleExample = /```md\n([\s\S]*?)\n```/u.exec(guide)?.[1];
|
|
9
|
+
|
|
10
|
+
expect(articleExample).toContain('title: My first article');
|
|
11
|
+
expect(articleExample).not.toMatch(/^# /mu);
|
|
12
|
+
});
|
|
13
|
+
});
|