Skip to content

Commit

Permalink
patch: bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BRAVO68WEB committed Nov 28, 2023
1 parent 3a71390 commit a5a5e8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ hexo.extend.helper.register("post_author", function () {

const authorFiles = fs.readdirSync(authorDir);
const authorData = [];
for (let i = 0; i < authorFiles.length; i++) {
const authorFile = authorFiles[i];
for (const element of authorFiles) {
const authorFile = element;
const authorFileData = fs.readFileSync(authorDir + authorFile, "utf8");
const authorFileJson = jsyml.load(authorFileData);
authorData.push(authorFileJson);
Expand All @@ -25,7 +25,7 @@ hexo.extend.helper.register("post_author", function () {
}
}

const authorTitle = "Author:";
let authorTitle = "Author:";

if (post.author.length > 1) {
authorTitle = "Authors:";
Expand Down

0 comments on commit a5a5e8d

Please sign in to comment.