mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
25 lines
607 B
JavaScript
25 lines
607 B
JavaScript
import docs from '@dynamic/api.js';
|
|
|
|
export default ({Vue, options, router, siteData}) => {
|
|
|
|
['props', 'events', 'slots', 'methods'].map(section => {
|
|
const page = siteData.pages.find(({path}) => path.includes(section));
|
|
|
|
if( ! page.hasOwnProperty('title') ) {
|
|
page.title = section.charAt(0).toUpperCase() + section.slice(1)
|
|
}
|
|
|
|
if (page && docs[section]) {
|
|
if( ! page.hasOwnProperty('headers') ) {
|
|
page.headers = [];
|
|
}
|
|
|
|
docs[section].forEach(({name}) => page.headers.push({
|
|
level: 2,
|
|
slug: name,
|
|
title: name,
|
|
}));
|
|
}
|
|
});
|
|
}
|