New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Docs Generator #12
Conversation
916177c
to
a89cdf8
Compare
258f0f5
to
5da8ba3
Compare
{ | ||
private static List<string> BlackList = new List<string> | ||
{ | ||
"index.xml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a short comment on why this needs to be blacklisted
public static string CompoundNameToRelativePath(string compoundName) | ||
{ | ||
var targetNamespace = Options.Instance.TargetNamespace.Replace(".", "::") + "::"; | ||
var markdownSplitPath = compoundName.Replace(targetNamespace, "").Split("::") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use string.Empty
/// <returns>The type name.</returns> | ||
public static string GetTypeFromFullyQualified(string fullyQualified) | ||
{ | ||
return fullyQualified.Split(".").Reverse().First(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just use Last()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - yes
|
||
private static void BuildTableOfContents(DoxygenDatabase database, string outputDirectory) | ||
{ | ||
// Build the table of contents at {{outputDirectory}}/.toc/toc.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is the toc just for the API docs right? how would this work together with the rest of the documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and you can use the include macro in the main ToC.
|
||
private static void BuildDocs(DoxygenDatabase database, string outputDirectory) | ||
{ | ||
foreach (var details in database.TypeDetails) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those loops could potentially be factored out into a method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah agreed.
5ddc01c
to
5f096b1
Compare
Moved to another repo |
Okay this is probably ready for a preliminary review.
I've tried to break it down into logical commits, but some parts reference future commits but it should be fine to just look at the API call name and infer what it does. Otherwise it needs a better name!