You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, it looks like the plugin for vitepress only accepts analytics as a known options field. However, it looks like more options could be added, like schema, searchOptions, etc...
Proposed Solution
Currently, I was expecting this to work (without success) :
vite: {
plugins: [OramaPlugin({
schema: {
title: 'string',
content: 'string',
functionNames: 'string[]',
},
searchOptions: {
boost: {
title: 2,
functionNames: 3,
},
},
contentTransformer: (content) => {
// This regex matches patterns like Name.func1 or Name1.name2.func2
const regex = /(?:^|\s)((?:\w+\.)+(\w+))/g;
const matches = [...content.content.matchAll(regex)];
const functionNames = matches.map(match => match[2]); // Capture the last word after the period
return {
...content,
functionNames: [...new Set(functionNames)], // Remove duplicates
}
},
})],
},
any hints on how to achieved this? maybe a workaround?
Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Problem Description
At the moment, it looks like the plugin for vitepress only accepts
analytics
as a known options field. However, it looks like more options could be added, likeschema
,searchOptions
, etc...Proposed Solution
Currently, I was expecting this to work (without success) :
any hints on how to achieved this? maybe a workaround?
Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: