Interface IDocumentBuildContext
Namespace:Microsoft.DocAsCode.Plugins
Assembly:Microsoft.DocAsCode.Plugins.dll
Syntax
public interface IDocumentBuildContext
Methods
| Improve this Doc View SourceGetFilePath(String)
Get final file path from working folder, starting with ~/
Declaration
string GetFilePath(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | Key is the original file path from working folder, starting with ~/ |
Returns
Type | Description |
---|---|
String | The final file path for current file |
GetTocFileKeySet(String)
Get a set of file key for the toc files that current file belongs to
Declaration
IImmutableList<string> GetTocFileKeySet(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of current file |
Returns
Type | Description |
---|---|
System.Collections.Immutable.IImmutableList<String> | The set of file key for the toc files that current file belongs to |
GetTocInfo()
Get all the registered toc information
Declaration
IImmutableList<TocInfo> GetTocInfo()
Returns
Type | Description |
---|---|
System.Collections.Immutable.IImmutableList<TocInfo> | All the registered toc information |
GetXrefSpec(String)
Get internal xref spec for current uid
Declaration
XRefSpec GetXrefSpec(string uid)
Parameters
Type | Name | Description |
---|---|---|
String | uid | The uid of the file |
Returns
Type | Description |
---|---|
XRefSpec | The file key of current file |
RegisterInternalXrefSpec(XRefSpec)
Register internal xref spec
Declaration
void RegisterInternalXrefSpec(XRefSpec xrefSpec)
Parameters
Type | Name | Description |
---|---|---|
XRefSpec | xrefSpec |
RegisterToc(String, String)
Register the relationship between current toc file and the article
Declaration
void RegisterToc(string tocFileKey, string fileKey)
Parameters
Type | Name | Description |
---|---|---|
String | tocFileKey | The key of the toc file that the file belongs to |
String | fileKey | The key of the file that belongs to the toc |
RegisterTocInfo(TocInfo)
Register the toc file to context with its information provided
Declaration
void RegisterTocInfo(TocInfo toc)
Parameters
Type | Name | Description |
---|---|---|
TocInfo | toc | The information for the toc, containing the homepage of the toc |
SetFilePath(String, String)
Set the final file path for current file
Declaration
void SetFilePath(string key, string filePath)
Parameters
Type | Name | Description |
---|---|---|
String | key | The file key of current file |
String | filePath | The final file path for current file |