mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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
This commit is contained in:
committed by
Eugenio Romano
parent
75b90c5e08
commit
e74f545aa8
35
tools/doc/templates/gqIndex.ejs
vendored
Normal file
35
tools/doc/templates/gqIndex.ejs
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<%
|
||||
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');
|
||||
-%>
|
Reference in New Issue
Block a user