mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3198] Index and tutorial content review (#3500)
* [ADF-3198] Fixed glitches in doc index files and tools * [ADF-3198] Reviewed new tutorial content and fixed index glitches * [ADF-3198] Fixed host settings component brief description
This commit is contained in:
committed by
Eugenio Romano
parent
737becd51f
commit
58522d0722
@@ -22,6 +22,11 @@
|
||||
"index"
|
||||
]
|
||||
},
|
||||
"statusIcons": {
|
||||
"Deprecated": "docassets/images/DeprecatedIcon.png",
|
||||
"Experimental": "docassets/images/ExperimentalIcon.png",
|
||||
"Internal": "docassets/images/InternalIcon.png"
|
||||
},
|
||||
"externalNameLinks": {
|
||||
"Blob": "https://developer.mozilla.org/en-US/docs/Web/API/Blob",
|
||||
"Promise": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises",
|
||||
|
@@ -31,11 +31,17 @@ var maxBriefDescLength = 180;
|
||||
|
||||
var adfLibNames = ["core", "content-services", "insights", "process-services"];
|
||||
|
||||
/*
|
||||
var deprecatedIconURL = "docassets/images/DeprecatedIcon.png";
|
||||
var experimentalIconURL = "docassets/images/ExperimentalIcon.png";
|
||||
var internalIconURL = "docassets/images/InternalIcon.png"
|
||||
*/
|
||||
|
||||
var statusIcons;
|
||||
|
||||
function initPhase(aggData) {
|
||||
statusIcons = aggData.config["statusIcons"] || {};
|
||||
|
||||
aggData.stoplist = makeStoplist(aggData.config);
|
||||
aggData.srcData = {};
|
||||
aggData.mdFileDesc = [];
|
||||
@@ -288,21 +294,40 @@ function makeMDDocumentedTableRow(docItem, forSubFolder) {
|
||||
|
||||
var linkCellItems = [mdFileLink];
|
||||
|
||||
/*
|
||||
var finalDepIconURL = deprecatedIconURL;
|
||||
var finalExIconURL = experimentalIconURL;
|
||||
var finalIntIconURL = internalIconURL;
|
||||
|
||||
if (forSubFolder) {
|
||||
finalDepIconURL = "../" + finalDepIconURL;
|
||||
finalExIconURL = "../" + finalExIconURL;
|
||||
}
|
||||
*/
|
||||
|
||||
var pathPrefix = "";
|
||||
|
||||
if (forSubFolder) {
|
||||
pathPrefix = "../";
|
||||
}
|
||||
|
||||
if (docItem.status) {
|
||||
/*
|
||||
if (docItem.status === "Deprecated") {
|
||||
linkCellItems.push(unist.makeText(" "));
|
||||
linkCellItems.push(unist.makeImage(finalDepIconURL, "Deprecated"));
|
||||
} else if (docItem.status === "Experimental") {
|
||||
linkCellItems.push(unist.makeText(" "));
|
||||
linkCellItems.push(unist.makeImage(finalExIconURL, "Experimental"));
|
||||
} else if (docItem.status === "Internal") {
|
||||
linkCellItems.push(unist.makeText(" "));
|
||||
linkCellItems.push(unist.makeImage(finalIntIconURL, "Internal"));
|
||||
}
|
||||
*/
|
||||
|
||||
if (statusIcons[docItem.status]) {
|
||||
linkCellItems.push(unist.makeText(" "));
|
||||
linkCellItems.push(unist.makeImage(pathPrefix + statusIcons[docItem.status], docItem.status));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
var remark = require("remark");
|
||||
var path = require("path");
|
||||
|
||||
//var remark = require("remark");
|
||||
var tocGenerator = require("mdast-util-toc");
|
||||
var replaceSection = require("mdast-util-heading-range");
|
||||
|
||||
@@ -73,6 +75,10 @@ function establishContentsSection(mdTree) {
|
||||
}
|
||||
|
||||
function updatePhase(tree, pathname, aggData) {
|
||||
if (path.basename(pathname, ".md").match(/README|versionIndex/)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we need a contents section then add one or update the existing one.
|
||||
var numTocHeadings = establishContentsSection(tree);
|
||||
|
||||
|
Reference in New Issue
Block a user