Skip to content

Commit f8f49c1

Browse files
authored
Merge pull request #254 from tidev/htmlLayout
feat: show constants again
2 parents 8225683 + 6cdb99d commit f8f49c1

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/vuepress/vuepress-plugin-apidocs/components/ConstantList.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</h2>
66

77
<div v-for="(constant, index) in constants" :key="constant.name">
8-
<div class="member-header">
9-
<h4 :id="constant.name.toLowerCase()">
8+
<div class="member-header" :id="`${constant.name.toLowerCase()}`">
9+
<h4 :id="`constants_${constant.name.toLowerCase()}`">
1010
<a :href="`#${constant.name.toLowerCase()}`" class="header-anchor">#</a> {{constant.name}} <Badge v-if="constant.deprecated" text="DEPRECATED" type="warn"/>
1111
</h4>
1212
<AvailabilityInfo :platforms="constant.platforms"/>

packages/vuepress/vuepress-plugin-apidocs/lib/metadata/processor.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ class MetadataProcessor {
117117
title: memberType.charAt(0).toUpperCase() + memberType.slice(1),
118118
slug: memberType
119119
})
120-
if (memberType !== 'constants') {
121-
this.additionalHeaders = this.additionalHeaders.concat(headers)
122-
}
120+
this.additionalHeaders = this.additionalHeaders.concat(headers)
123121
}
124122
}
125123

0 commit comments

Comments
 (0)