+ + {useImagetools ? ( + + + ) : ( + + + + + + )} + + + + + + {breadcrumb && !isInParentFolder && ( + + + + + + + {breadcrumb} + + + )} + + + + {translatedTitle} + + + + + + + {translatedDescription} + + + + {tags.length > 0 && ( + + + {tags.slice(0, 3).map((tag) => ( + + #{tag} + + ))} + {tags.length > 3 && ( + + +{tags.length - 3} + + )} + + + )} + + + + + {pubDate} + + + + + {author && author.toLowerCase() !== 'unknown' && ( + + + By {translatedAuthor} + + + )} + +
+ + + {frontmatter.title} + + {/* Reading time and metadata */} + {(frontmatter.author && frontmatter.author.toLowerCase() !== 'unknown') || formattedDate || frontmatter.minutesRead ? ( + + {frontmatter.minutesRead && ( + + + + + {frontmatter.minutesRead} + + )} + {frontmatter.author && frontmatter.author.toLowerCase() !== 'unknown' && By {frontmatter.author}} + {formattedDate && {formattedDate}} + + ) : null} + {frontmatter.description} + {frontmatter.tags && frontmatter.tags.length > 0 && ( + + {frontmatter.tags.map((tag: string) => ( + + {tag} + + ))} + + )} + + {/* Top-level Table of Contents for long articles */} + {shouldShowTopToc && topToc && ( + + + Table of Contents + + + {topToc.length >= 10 ? ( + /* 2-column layout for 10+ items with even distribution */ + + {/* Debug info */} + + {/* Left column: first half of items */} + + {topToc.slice(0, Math.floor(topToc.length / 2)).map((item, index) => ( + + {index + 1}. + {item.text} + + ))} + + {/* Right column: second half of items */} + + {topToc.slice(Math.floor(topToc.length / 2)).map((item, index) => ( + + {Math.floor(topToc.length / 2) + index + 1}. + {item.text} + + ))} + + + ) : ( + /* Single column for fewer items */ + + {topToc.map((item, index) => ( + + + {index + 1}. + {item.text} + + + ))} + + )} + + + )} + + + {frontmatter.image?.url && ( + + )} + + + + + + {/* Tags at bottom of article */} + {frontmatter.tags && frontmatter.tags.length > 0 && ( + + Tags: + + {frontmatter.tags.map((tag: string) => ( + + {tag} + + ))} + + + )} + + {/* Bottom Navigation */} + {showBottomNav && ( + + {isPrevNext ? ( + + + {prevArticle ? ( + + + + + ← {prevArticle.data.title} + + ) : ( + + First Article ← + + )} + + + {nextArticle ? ( + + {nextArticle.data.title} → + + + + + ) : ( + + Last Article → + + )} + + + ) : isTop ? ( + + + + + + + Back to Top + + + + ) : null} + + )} +