mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
13 lines
318 B
TypeScript
13 lines
318 B
TypeScript
|
import { unistUtilVisit } from 'dumi';
|
||
|
|
||
|
export default function remarkMeta() {
|
||
|
return (tree, vFile) => {
|
||
|
// read frontmatter
|
||
|
unistUtilVisit.visit(tree, 'yaml', (node) => {
|
||
|
if (!/(^|[\n\r])description:/.test(node.value)) {
|
||
|
vFile.data.frontmatter.__autoDescription = true;
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
}
|