Skip to content

Commit

Permalink
docs: enable feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonneyx committed Jan 23, 2025
1 parent e22f7b7 commit aedf809
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/site/.dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default defineConfig({
showWxQrcode: true, // 是否显示头部菜单的微信公众号
showChartResize: true, // 是否在 demo 页展示图表视图切换
showAPIDoc: false, // 是否在 demo 页展示API文档
feedback: true, // 是否显示反馈组件
prefersColor: {
default: 'light',
switch: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"dependencies": {
"@ant-design/icons": "^5.5.2",
"@antv/algorithm": "^0.1.26",
"@antv/dumi-theme-antv": "^0.5.5",
"@antv/dumi-theme-antv": "^0.6.0",
"@antv/g": "^6.1.14",
"@antv/g-svg": "^2.0.27",
"@antv/g-webgl": "^2.0.36",
Expand Down
4 changes: 4 additions & 0 deletions packages/site/src/markdown/CustomMarkdownEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ export class CustomMarkdownEmitter extends MarkdownEmitter {
writer.ensureNewLine();
writer.writeLine('order: ' + docPageTitle.order);
}
if (docPageTitle.readonly) {
writer.ensureNewLine();
writer.writeLine('readonly: true');
}
writer.writeLine('---');
break;
}
Expand Down
3 changes: 3 additions & 0 deletions packages/site/src/nodes/DocPageTitle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { CustomDocNodeKind } from './CustomDocNodeKind';
export interface IDocPageTitleParameters extends IDocNodeParameters {
title: string;
order?: number;
readonly?: boolean;
}

/**
Expand All @@ -22,11 +23,13 @@ export interface IDocPageTitleParameters extends IDocNodeParameters {
export class DocPageTitle extends DocNode {
public readonly title: string;
public readonly order?: number;
public readonly readonly?: boolean;

public constructor(parameters: IDocPageTitleParameters) {
super(parameters);
this.title = parameters.title;
this.order = parameters.order;
this.readonly = true;
}

/** @override */
Expand Down

0 comments on commit aedf809

Please sign in to comment.