Skip to content

Commit

Permalink
Merge pull request #70 from omnivore-app/fix/tags
Browse files Browse the repository at this point in the history
fix: use labels names as tags in the front matter
  • Loading branch information
sywhb authored May 23, 2023
2 parents e27b80f + 0341a4e commit 15754a0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/settings/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,7 @@ export const renderArticleContnet = async (
siteName,
originalUrl: article.originalArticleUrl,
author: article.author,
labels: article.labels?.map((l) => {
return {
name: l.name.replaceAll(" ", "_"),
};
}),
labels: renderLabels(article.labels),
dateSaved,
highlights,
content: article.content,
Expand Down Expand Up @@ -255,7 +251,8 @@ export const renderArticleContnet = async (
break;
case "tags":
if (articleView.labels && articleView.labels.length > 0) {
frontMatter[item] = articleView.labels;
// use label names as tags
frontMatter[item] = articleView.labels.map((l) => l.name);
}
break;
case "date_saved":
Expand Down

0 comments on commit 15754a0

Please sign in to comment.