mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
refactor(*): migrate to yaml
This commit is contained in:
@@ -44,8 +44,8 @@
|
||||
"@base-ui/react": "^1.6.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"cnfast": "^0.0.8",
|
||||
"js-yaml": "^5.2.1",
|
||||
"lucide-react": "^1.23.0"
|
||||
"lucide-react": "^1.24.0",
|
||||
"yaml": "^2.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^26.1.1",
|
||||
@@ -53,7 +53,7 @@
|
||||
"fumadocs-core": "workspace:*",
|
||||
"fumadocs-ui": "workspace:@fumadocs/base-ui@*",
|
||||
"tsconfig": "workspace:*",
|
||||
"tsdown": "0.22.4"
|
||||
"tsdown": "0.22.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { OutputFile } from './convert';
|
||||
import * as fs from 'node:fs/promises';
|
||||
import { dump } from 'js-yaml';
|
||||
import { stringify } from 'yaml';
|
||||
import * as path from 'node:path';
|
||||
|
||||
interface WriteOptions {
|
||||
@@ -28,5 +28,5 @@ export async function write(output: OutputFile[], options: WriteOptions = {}) {
|
||||
}
|
||||
|
||||
export function frontmatter(obj: unknown) {
|
||||
return `---\n${dump(obj).trim()}\n---`;
|
||||
return `---\n${stringify(obj, { compat: 'yaml-1.1', singleQuote: true }).trim()}\n---`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user