mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-06 09:51:29 +02:00
#291 - Hierarchy field support
This commit is contained in:
@@ -30,6 +30,13 @@ export const Item: React.FunctionComponent<IItemProps> = ({ fmFilePath, date, ti
|
||||
}
|
||||
|
||||
const tagField = settings.dashboardState.contents.tags;
|
||||
|
||||
if (tagField === "tags") {
|
||||
return pageData.fmTags;
|
||||
} else if (tagField === "categories") {
|
||||
return pageData.fmCategories;
|
||||
}
|
||||
|
||||
const tagsValue = pageData[tagField] || [];
|
||||
|
||||
if (Array.isArray(tagsValue)) {
|
||||
|
||||
@@ -51,7 +51,7 @@ export const TaxonomyLookup: React.FunctionComponent<ITaxonomyLookupProps> = ({
|
||||
if (taxonomy === "tags" || taxonomy === "categories") {
|
||||
return (
|
||||
<button
|
||||
className={total ? `text-teal-900 hover:text-teal-600` : ``}
|
||||
className={total ? `text-teal-900 hover:text-teal-600 font-bold` : ``}
|
||||
title={total ? `Show contents with ${value} in ${taxonomy}` : ``}
|
||||
onClick={onNavigate}>
|
||||
{total || `-`}
|
||||
|
||||
Reference in New Issue
Block a user