docs + various polish
This commit is contained in:
		@@ -5,10 +5,11 @@ import path from "path"
 | 
			
		||||
 | 
			
		||||
import style from '../styles/listPage.scss'
 | 
			
		||||
import { PageList } from "../PageList"
 | 
			
		||||
import { clientSideSlug } from "../../path"
 | 
			
		||||
 | 
			
		||||
function FolderContent(props: QuartzComponentProps) {
 | 
			
		||||
  const { tree, fileData, allFiles } = props
 | 
			
		||||
  const folderSlug = fileData.slug!
 | 
			
		||||
  const folderSlug = clientSideSlug(fileData.slug!)
 | 
			
		||||
  const allPagesInFolder = allFiles.filter(file => {
 | 
			
		||||
    const fileSlug = file.slug ?? ""
 | 
			
		||||
    const prefixed = fileSlug.startsWith(folderSlug)
 | 
			
		||||
@@ -23,12 +24,9 @@ function FolderContent(props: QuartzComponentProps) {
 | 
			
		||||
    allFiles: allPagesInFolder
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  const desc = props.fileData.description
 | 
			
		||||
 | 
			
		||||
  // @ts-ignore
 | 
			
		||||
  const content = toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: 'html' })
 | 
			
		||||
  return <div class="popover-hint">
 | 
			
		||||
    {desc && <p>{desc}</p>}
 | 
			
		||||
    <article>{content}</article>
 | 
			
		||||
    <p>{allPagesInFolder.length} items under this folder.</p>
 | 
			
		||||
    <div>
 | 
			
		||||
 
 | 
			
		||||
@@ -17,12 +17,9 @@ function TagContent(props: QuartzComponentProps) {
 | 
			
		||||
      allFiles: allPagesWithTag
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const desc = props.fileData.description
 | 
			
		||||
 | 
			
		||||
    // @ts-ignore
 | 
			
		||||
    const content = toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: 'html' })
 | 
			
		||||
    return <div class="popover-hint">
 | 
			
		||||
      {desc && <p>{desc}</p>}
 | 
			
		||||
      <article>{content}</article>
 | 
			
		||||
      <p>{allPagesWithTag.length} items with this tag.</p>
 | 
			
		||||
      <div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user