We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ec1bcd5 + c95f60c commit 9eb325aCopy full SHA for 9eb325a
plugins/blog.mjs
@@ -11,7 +11,7 @@ const blogPostsDirective = {
11
},
12
run(data, vfile, ctx) {
13
const size = data.options.limit ?? 3;
14
- const paths = globSync("posts/*.md");
+ const paths = globSync("posts/*.md").sort(); // For now, string sort
15
const nodes = paths.map((path) => {
16
const ext = extname(path);
17
const content = readFileSync(path, { encoding: "utf-8" });
0 commit comments