Files
alfresco-ng2-components/tools/doc/templates/gqIndex.ejs
Andy Stark e74f545aa8 [ADF-4152] Updated doc folder structure and index tool (#4403)
* [ADF-4152] Initial GraphQL implementation

* [ADF-4152] Schema updates

* [ADF-4152] Rounded out basic fields

* [ADF-4152] Added basic template functionality

* [ADF-4152] Added full template generation

* [ADF-4152] Moved proc services doc files to new folders

* [ADF-4152] Updated README.md with section from new template

* [ADF-4152] Fixed another problem with relative URLs

* [ADF-4152] Fixed links and some more bugs

* [ADF-4152] Removed proc services folder README file
2019-03-06 20:23:31 +00:00

36 lines
994 B
Plaintext

<%
function relDocPath(fullPath) {
return fullPath.substring(fullPath.indexOf('docs') + 5).replace('\\', '/')
}
function relSrcPath(fullPath) {
return '../' + fullPath.substring(fullPath.indexOf('lib')).replace('\\', '/')
}
function renderSection(sectionName) {
var sectionDocs = documents.filter(doc => doc.classType === sectionName.toLowerCase());
if (sectionDocs.length > 0) { -%>
### <%= sectionName %>
| Name | Description | Source link |
| -- | -- | --|
<% }
sectionDocs.forEach(document => { -%>
| [<%= document['title'] %>](<%= relDocPath(document['id']) %>) | <%= document['paragraph']['plaintext'] %> | [Source](<%= relSrcPath(document['heading']['link']['url']) %>) |
<% });
}
-%>
<%
renderSection('Components');
renderSection('Directives');
renderSection('Dialogs');
renderSection('Interfaces');
renderSection('Models');
renderSection('Pipes');
renderSection('Services');
renderSection('Widgets');
-%>