Andy Stark 5fc05da7aa [ADF-4152] Updated folder structure of core docs (#4415)
* [ADF-4152] Moved core library docs into subfolders

* [ADF-4152] Moved core library docs into subfolders

* [ADF-4152] Manual fixes to core doc file links

* [ADF-4152] Further automatic + manual link tidying
2019-03-12 14:20:20 +00:00

39 lines
1.1 KiB
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']) %>) -%>
<% if (document['status'] && document['status'] !== 'Active') { -%>
![<%= document['status'] %>](docassets/images/<%= document['status'] %>Icon.png) <% } -%>
| <%= 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');
-%>