handle string tags
This commit is contained in:
		
							parent
							
								
									f7bf4038dc
								
							
						
					
					
						commit
						05d1ca01c3
					
				
					 2 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -23,6 +23,10 @@ export const FrontMatter: QuartzTransformerPlugin<Partial<Options> | undefined>
 | 
				
			||||||
          return (_, file) => {
 | 
					          return (_, file) => {
 | 
				
			||||||
            const { data } = matter(file.value, opts)
 | 
					            const { data } = matter(file.value, opts)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (typeof data.tags === 'string') {
 | 
				
			||||||
 | 
					              data.tags = data.tags.split(" ")
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // fill in frontmatter
 | 
					            // fill in frontmatter
 | 
				
			||||||
            file.data.frontmatter = {
 | 
					            file.data.frontmatter = {
 | 
				
			||||||
              title: file.stem ?? "Untitled",
 | 
					              title: file.stem ?? "Untitled",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue