Permalink
Browse files

Fix seealso path for function docs

  • Loading branch information...
LadyCailin committed Dec 21, 2018
1 parent c5c3087 commit 16d1c45e868db9a30ef0d81fde523966a045b2b7
@@ -1357,10 +1357,10 @@ private void generateFunctionDocs(Function f, DocGen.DocInfo docs) {
first = false;
if(Function.class.isAssignableFrom(c)) {
Function f2 = (Function) ReflectionUtils.newInstance(c);
seeAlsoText += "<code>[[" + f2.getName() + "|" + f2.getName() + "]]</code>";
seeAlsoText += "<code>[[API/functions/" + f2.getName() + ".html|" + f2.getName() + "]]</code>";
} else if(Template.class.isAssignableFrom(c)) {
Template t = (Template) ReflectionUtils.newInstance(c);
seeAlsoText += "[[" + t.getName() + "|Learning Trail: " + t.getDisplayName() + "]]";
seeAlsoText += "[[" + t.getPath() + t.getName() + "|Learning Trail: " + t.getDisplayName() + "]]";
} else {
throw new Error("Unsupported class found in @seealso annotation: " + c.getName());
}
@@ -22,4 +22,14 @@ public String getDisplayName() {
return getName();
}

/**
* If the template should be located at a different path on the website, then this should be overridden
* to provide the path. By default, empty string is returned, which means the root path. If this is not
* the empty string, the path returned should end with {@code /}
* @return
*/
public String getPath() {
return "";
}

}

0 comments on commit 16d1c45

Please sign in to comment.