màj wiki avec retour MES lot-5 AD
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export const entitiesMapResourceDefinition = {
|
||||
uri: 'wiki://entities-map',
|
||||
name: 'EasyWMS Entities Map',
|
||||
description: 'Entities relationship map: how WMS entities relate to each other.',
|
||||
mimeType: 'text/markdown',
|
||||
};
|
||||
|
||||
export function buildEntitiesMapContent(rawContent) {
|
||||
if (!rawContent) {
|
||||
return '# Entities Map\n\n*(entities-map.md not found)*';
|
||||
}
|
||||
return rawContent;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import { SECTIONS } from '../config/constants.js';
|
||||
|
||||
export const overviewResourceDefinition = {
|
||||
uri: 'wiki://overview',
|
||||
name: 'EasyWMS Wiki Overview',
|
||||
description: 'Overview of the EasyWMS wiki: sections, page counts, and key concepts.',
|
||||
mimeType: 'text/markdown',
|
||||
};
|
||||
|
||||
export function buildOverviewContent(pages, indexContent) {
|
||||
const sectionCounts = {};
|
||||
for (const section of SECTIONS) {
|
||||
sectionCounts[section] = pages.filter(p => p.path.startsWith(section + '/')).length;
|
||||
}
|
||||
|
||||
const total = pages.length;
|
||||
|
||||
const header = [
|
||||
'# EasyWMS Wiki — Overview',
|
||||
'',
|
||||
`**Total pages:** ${total}`,
|
||||
'',
|
||||
'## Sections',
|
||||
'',
|
||||
];
|
||||
|
||||
for (const [section, count] of Object.entries(sectionCounts)) {
|
||||
if (count > 0) {
|
||||
header.push(`- **${section}**: ${count} pages`);
|
||||
}
|
||||
}
|
||||
|
||||
header.push('');
|
||||
header.push('---');
|
||||
header.push('');
|
||||
|
||||
const body = indexContent || '*(index not available)*';
|
||||
|
||||
return header.join('\n') + body;
|
||||
}
|
||||
Reference in New Issue
Block a user