File tree 4 files changed +9
-37
lines changed
4 files changed +9
-37
lines changed Original file line number Diff line number Diff line change 16
16
" *.css"
17
17
],
18
18
"dependencies" : {
19
- "@mdxeditor/editor" : " ^2.3.2 " ,
19
+ "@mdxeditor/editor" : " ^2.12.1 " ,
20
20
"@mdxeditor/gurx" : " ^1.1.1" ,
21
21
"@trussworks/react-uswds" : " ^6.2.0" ,
22
22
"@uswds/uswds" : " ^3.7.1" ,
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ export const getYamlBlogHeaderNew = (fields: BlogFrontMatterFields): string => {
74
74
return `# Page template info (DO NOT EDIT)
75
75
layout: default
76
76
blog_page: true
77
+
77
78
# Carousel (Edit this)
78
79
carousel_title: "${ fields . carousel_title } "
79
80
carousel_summary: "${ fields . carousel_summary } "
@@ -350,8 +351,9 @@ export const saveDataToZip = async (markdownstr: string) => {
350
351
} ;
351
352
352
353
export const getDefaultMarkdown = ( ) : string => {
353
- const yamlHeader = getYamlBlogHeader ( BLANK_BLOG_FRONTMATTER_FIELDS ) ;
354
- return `---\n${ yamlHeader } \n---\n\n \n` ;
354
+ // it causes issue to auto-insert the frontmatter 100% of the time. (when cancelling edit dialog)
355
+ //const yamlHeader = getYamlBlogHeader(BLANK_BLOG_FRONTMATTER_FIELDS);
356
+ return `\n` ;
355
357
}
356
358
357
359
export const getBlogTemplateMarkdown = ( ) : string => {
Original file line number Diff line number Diff line change @@ -43,36 +43,6 @@ export const BLANK_BLOG_FRONTMATTER_FIELDS: BlogFrontMatterFields = {
43
43
tags : [ ] ,
44
44
} ;
45
45
46
- /*
47
- ---
48
- # Page template info (DO NOT EDIT)
49
- layout: default
50
- blog_page: true
51
-
52
- # Carousel (Edit this)
53
- carousel_title: "Test page"
54
- carousel_summary: "This is a test page template, it include problematic markdown to make checking it easier"
55
- # partial path to image e.g /news-and-blog/2024-03-01-test-page-img/
56
- # images should be 800x600 jpg
57
- carousel_image: /news-and-blog/2024-03-01-test-page-img/icon-512x512.png
58
- # accessibility text for image
59
- carousel_image_alt_text: "Test image"
60
- # should show on news and blog page. ordered by date prefix in filename
61
- carousel_show: true
62
-
63
- # Blog detail page (Edit this)
64
- title: "Test page"
65
- dateline_str: "Feb 30, 2024"
66
- readtime_str: "1"
67
- author: "U.S. Digital Service"
68
- permalink: /news-and-blog/test-page-slpm7
69
- basename: "test-page"
70
- tags: [[]]
71
-
72
- ---
73
-
74
- Image found in a Projects posting.
75
- * */
76
46
export const STARTER_BLOG_FRONTMATTER_FIELDS : BlogFrontMatterFields = {
77
47
title : "New news and blog page" ,
78
48
date : getShortDate ( new Date ( ) . toDateString ( ) ) ,
Original file line number Diff line number Diff line change 830
830
" @lezer/common" " ^1.0.0"
831
831
" @lezer/highlight" " ^1.0.0"
832
832
833
- " @mdxeditor/editor@^2.3.2 " :
834
- version "2.9 .1"
835
- resolved "https://registry.yarnpkg.com/@mdxeditor/editor/-/editor-2.9 .1.tgz#e6922d475fe37cc6b7810f60844b35bafab59ebd "
836
- integrity sha512-YrKFmB/6gJid4CgssCy+TU1YyFfOOGv71WB2JYzi+41ZNAnMtSiEuXGv6jzQNtyp8t3i/Z5KfZl4KtHp9/14Lg ==
833
+ " @mdxeditor/editor@^2.12.1 " :
834
+ version "2.12 .1"
835
+ resolved "https://registry.yarnpkg.com/@mdxeditor/editor/-/editor-2.12 .1.tgz#fea16bfbd7a9de553ce0f9f86d995d9c8166cc72 "
836
+ integrity sha512-8+QDABGA1pCYQUioyDIsOMum2W8riqVoolZfbiFI1nSeE1afNLk8FOALaVyAvzeoobGnSYnqD2nEUUMdHT6HtQ ==
837
837
dependencies :
838
838
" @codemirror/lang-markdown" " ^6.2.3"
839
839
" @codemirror/merge" " ^6.4.0"
You can’t perform that action at this time.
0 commit comments