Skip to content

Commit

Permalink
fix: doc metadata search logic fix (#123 by @Jpoliachik)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jpoliachik authored Feb 13, 2024
1 parent 6d7c612 commit 3a0d0a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ const config = {
let recordContents = false;
for await (const line of rl) {
// extract author
if (/author:/.test(line)) {
if (!author && /author:/.test(line)) {
author = line.split(":")[1].trim();
continue;
}

// extract title
if (/title:/.test(line)) {
if (!title && /title:/.test(line)) {
title = line.split(":")[1].trim();
continue;
}

// extract publish_date
if (/publish_date:/.test(line)) {
if (!publish_date && /publish_date:/.test(line)) {
publish_date = line.split(":")[1].trim();
continue;
}
Expand Down

0 comments on commit 3a0d0a5

Please sign in to comment.