UNPKG

san-cli-docit-theme

Version:

san-cli-docit-theme 是 [San](https://github.com/baidu/san) CLI 工具中 Markdown 文档建站中的主题模板部分,可以作为[自定义模板](https://ecomfe.github.io/san-cli/)的参考例子。

24 lines (22 loc) 583 B
import './styles/index.less'; import {Component} from 'san'; import Content from './components/Content'; /* global $content, $toc, $navbar, $link, $sidebar, $config, $matter */ class Index extends Component { static template = /*html*/ ` <div id="single"> <content content="{{content}}" toc="{{toc}}"/> </div> `; static components = { content: Content }; initData() { return { content: $content, toc: $toc }; } } const app = new Index(); app.attach(document.getElementById('app'));