wrapture
Version: 
Wrapture lets you go from a Python-trained model to deployable JavaScript with a single command. It generates TypeScript bindings and a Web/Node-compatible wrapper, using WebGPU/WASM-ready ONNX runtimes.
56 lines (40 loc) • 1.81 kB
JavaScript
/* eslint-disable import/no-unused-modules */
import { MarkdownTheme, MarkdownThemeContext } from 'typedoc-plugin-markdown';
/**
 * @param {import('typedoc-plugin-markdown').MarkdownApplication} app
 */
export function load(app) {
  app.renderer.defineTheme('custom-markdown-theme', MyMarkdownTheme);
  app.renderer.markdownHooks.on(
    'content.begin',
    () => `> Last updated ${new Date().toISOString()}`
  );
  const footerText = `***
**Contributing**
Want to contribute? Please read the [CONTRIBUTING.md](https://github.com/phun-ky/wrapture/blob/main/CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](https://github.com/phun-ky/wrapture/blob/main/CODE_OF_CONDUCT.md)
**Sponsor me**
I'm an Open Source evangelist, creating stuff that does not exist yet to help get rid of secondary activities and to enhance systems already in place, be it documentation or web sites.
The sponsorship is an unique opportunity to alleviate more hours for me to maintain my projects, create new ones and contribute to the large community we're all part of :)
[Support me on GitHub Sponsors](https://github.com/sponsors/phun-ky).
***
This project created by [Alexander Vassbotn Røyne-Helgesen](http://phun-ky.net) is licensed under a [MIT License](https://choosealicense.com/licenses/mit/).
`;
  app.renderer.markdownHooks.on('page.end', () => footerText);
  app.renderer.markdownHooks.on('index.page.end', () => footerText);
}
class MyMarkdownTheme extends MarkdownTheme {
  /**
   * @param {import('typedoc-plugin-markdown').MarkdownPageEvent} page
   */
  getRenderContext(page) {
    return new MyMarkdownThemeContext(this, page, this.application.options);
  }
}
class MyMarkdownThemeContext extends MarkdownThemeContext {
  partials = {
    ...this.partials,
    header: () => {
      return '';
    }
  };
}