mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-17 12:41:20 +08:00
fix: fix search error & add name field in data.json #105
This commit is contained in:
@ -82,7 +82,14 @@ export function create(str = '', options = {}) {
|
||||
if (iconName) {
|
||||
detailData.icon = iconName;
|
||||
}
|
||||
homeCardIcons(node, parent, options.isHome);
|
||||
const resultHomeCard = homeCardIcons(node, parent, options.isHome);
|
||||
if (options.filename && resultHomeCard[options.filename]) {
|
||||
detailData.rgb = resultHomeCard[options.filename].rgb;
|
||||
detailData.name = resultHomeCard[options.filename].title;
|
||||
if (resultHomeCard[options.filename].tags) {
|
||||
detailData.tags = resultHomeCard[options.filename].tags;
|
||||
}
|
||||
}
|
||||
tooltips(node, index, parent);
|
||||
htmlTagAddAttri(node, options);
|
||||
rehypeUrls(node);
|
||||
@ -111,7 +118,6 @@ export function create(str = '', options = {}) {
|
||||
}
|
||||
node.children.unshift(header(options));
|
||||
node.children.push(footer(options));
|
||||
// node.children.push(search(options));
|
||||
node.children = node.children.concat(search(options));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user