@canalplus/readme.doc
Version:
Readme's an Extremely Accessible Documentation MakEr
37 lines (36 loc) • 1.58 kB
TypeScript
/**
* Generate HTML page for the given documentation.
* @param {Object} args
* @param {string} args.contentHtml - HTML content for the content of the
* @param {Array.<string>} args.cssUrls - URLs to the CSS files that should
* be imported.
* @param {string|null|undefined} [args.faviconUrl] - Eventual URL to the
* favicon.
* `null` or `undefined` if unset.
* @param {string} options.navBarHtml - HTML strinng for the Navbar (the
* header).
* @param {string} options.pageListHtml - HTML string for the complete list of
* documentation pages with links.
* @param {string} options.rootUrl - Relative URL for the root of the site.
* This value is included in a custom script so it can be accessed from other
* JavaScript files.
* @param {Array.<string>} args.scriptUrls - URLs to the JS files that should
* be imported.
* @param {string} options.sidebarHtml - HTML string for the Sidebar.
* @param {string} args.title - title of the page.
* @param {string} options.tocHtml - HTML string for the Table of content.
* `undefined` if your page has no table of contents.
* @returns {string} - Whole HTML string for the documentation page.
*/
export default function generatePageHtml({ contentHtml, cssUrls, faviconUrl, navBarHtml, pageListHtml, rootUrl, scriptUrls, sidebarHtml, title, tocHtml, }: {
contentHtml: string;
cssUrls: string[];
faviconUrl: string | null | undefined;
navBarHtml: string;
pageListHtml: string;
rootUrl: string;
scriptUrls: string[];
sidebarHtml: string;
title: string;
tocHtml: string;
}): string;