Skip to content

Commit

Permalink
Merge pull request #9650 from sm1990/templates
Browse files Browse the repository at this point in the history
Remove invalid template pages
  • Loading branch information
sm1990 authored Dec 12, 2024
2 parents f6f5caa + 7673c00 commit 0e9585e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion pages/downloads/1.2.x-release-notes/[...slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ var traverseFolder = function (dir) {
} else {
/* Is a file */
filex = filex.replace(/downloads\/1.2.x-release-notes\//g, "");
results.push(filex);
if (filex.indexOf("template") === -1) {
results.push(filex);
}
}
});

Expand Down
14 changes: 8 additions & 6 deletions pages/downloads/swan-lake-release-notes/[...slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ import GenerateHeadingComponent from "../../../components/common/heading/RenderH

String.prototype.hashCode = function () {
var hash = 0,
i, chr;
i, chr;
if (this.length === 0) return hash;
for (i = 0; i < this.length; i++) {
chr = this.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0;
chr = this.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0;
}
return hash;
}
Expand All @@ -63,7 +63,9 @@ var traverseFolder = function (dir) {
filex = filex
.replace(/downloads\/swan-lake-release-notes\//g, "")
.replace(/\/RELEASE_NOTE.md/g, "");
results.push(filex);
if (filex.indexOf("template") === -1) {
results.push(filex);
}
}
});

Expand Down Expand Up @@ -242,7 +244,7 @@ export default function PostPage({ frontmatter, content, id, codeSnippets }) {
</code>
</pre>
},
table({node, className, children, ...props}) {
table({ node, className, children, ...props }) {
return <div className='mdTable'><table {...props}>{children}</table></div>
}
}}
Expand Down

0 comments on commit 0e9585e

Please sign in to comment.