vuepress-theme-hope
Version:
A light vuepress theme with tons of features
16 lines • 511 B
JavaScript
import { resolveRoute } from "vuepress/client";
/**
* Resolve AutoLink props from string
*
*/
export const resolveLinkInfo = (item, preferFull = false, currentPath) => {
const { meta, path, notFound } = resolveRoute(item, currentPath);
return notFound
? { text: path, link: path }
: {
text: !preferFull && meta.shortTitle ? meta.shortTitle : meta.title || path,
link: path,
icon: meta.icon,
};
};
//# sourceMappingURL=resolveLinkInfo.js.map