@asafarim/simple-md-viewer
Version:
A professional markdown viewer with file tree navigation, directory content browsing, and advanced YAML front matter support
95 lines (94 loc) • 2.99 kB
TypeScript
import React from "react";
import { DirectoryViewStyle } from "./DirectoryView";
interface MarkdownContentProps {
showHomePage?: boolean;
/**
* Whether to hide the file tree sidebar and expand content to full width.
* Useful for mobile or when you want a distraction-free view.
* Default is false, showing the file tree.
*/
hideFileTree?: boolean;
/**
* Whether to hide the header section (including the logo and menu).
* Useful for a more minimalistic view.
* Default is false, showing the header.
*/
hideHeader?: boolean;
/**
* Base URL for the API endpoints.
* Default is "http://localhost:3500".
*/
apiBaseUrl?: string;
/**
* Whether to hide the footer section.
* Useful for a more minimalistic view.
* Default is false, showing the footer.
*/
hideFooter?: boolean;
/**
* Whether to show YAML front matter in markdown files.
* Default is true, showing front matter.
*/
showFrontMatter?: boolean;
/**
* How to display YAML front matter.
* - 'full': Complete metadata display with all fields
* - 'minimal': Basic metadata only (author, date, version)
* - 'header-only': Just title and description
* - 'hidden': Parse but don't display front matter
* Default is 'full'.
*/
frontMatterMode?: 'full' | 'minimal' | 'header-only' | 'hidden';
/**
* Enable directory content view when folders are selected.
* Shows browsable directory contents with list/grid/detailed views.
* Default is true.
*/
directoryViewEnabled?: boolean;
/**
* Default view style for directory content.
* - 'list': Simple list view
* - 'grid': Grid layout with larger icons
* - 'detailed': Table view with file information
* Default is 'list'.
*/
directoryViewStyle?: DirectoryViewStyle;
/**
* Show breadcrumbs navigation in directory view.
* Default is true.
*/
showDirectoryBreadcrumbs?: boolean;
/**
* Enable sorting and filtering in directory view.
* Default is true.
*/
enableDirectorySorting?: boolean;
/**
* Configuration for package links in the header.
* If not provided, default values will be used.
*/
packageLinks?: {
/**
* The name of the npm package.
* Default is "@asafarim/simple-md-viewer".
*/
packageName?: string;
/**
* The GitHub repository path.
* Default is "simple-md-viewer".
*/
githubPath?: string;
/**
* The URL to the demo site.
* Default is "https://alisafari-it.github.io/simple-md-viewer/#/".
*/
demoPath?: string;
/**
* Whether to show the package links section.
* Default is true.
*/
show?: boolean;
};
}
declare const MarkdownContent: React.FC<MarkdownContentProps>;
export default MarkdownContent;