This commit is contained in:
Timothy Jaeryang Baek
2026-05-19 20:19:23 +04:00
parent d310a0777c
commit ef975649b2
3 changed files with 33 additions and 45 deletions
@@ -4,7 +4,7 @@
const i18n = getContext('i18n');
import { nameToId } from '$lib/utils';
import { extractFrontmatter, formatSkillName, nameToId } from '$lib/utils';
import CodeEditor from '$lib/components/common/CodeEditor.svelte';
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
import Badge from '$lib/components/common/Badge.svelte';
@@ -375,6 +375,16 @@ class Pipe:
{boilerplate}
onChange={(e) => {
_content = e;
if (!edit) {
const fm = extractFrontmatter(e);
if (fm.title && !name) {
name = formatSkillName(fm.title);
id = nameToId(fm.title);
}
if (fm.description && !meta.description) {
meta = { ...meta, description: fm.description };
}
}
}}
onSave={async () => {
if (formElement) {