Skip to content

Commit 080ece8

Browse files
committed
Fix double tier badges on release blog posts
The docsFeatureBadges transform was also processing release blog posts that have a features frontmatter array, duplicating badges already injected by the releaseFeatures transform. Skip pages with release frontmatter since those are handled separately.
1 parent 167310a commit 080ece8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.eleventy.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ module.exports = function(eleventyConfig) {
917917
const parentFeature = findFeatureByDocsLink(this.page.url);
918918
const subfeatures = findSubfeaturesForDocsPage(this.page.url);
919919

920-
// Parse frontmatter for features array (same format as changelog posts)
920+
// Parse frontmatter for features array — but skip pages with `release` (handled by releaseFeatures)
921921
let fmFeatures = [];
922922
const inputPath = this.page.inputPath;
923923
if (inputPath && inputPath.endsWith('.md')) {
@@ -926,6 +926,7 @@ module.exports = function(eleventyConfig) {
926926
const fmMatch = source.match(/^---\n([\s\S]*?)\n---/);
927927
if (fmMatch) {
928928
const fm = yaml.load(fmMatch[1]);
929+
if (fm.release) return content;
929930
if (fm.features && Array.isArray(fm.features)) {
930931
fmFeatures = fm.features;
931932
}

0 commit comments

Comments
 (0)