Interface IDocumentBuildContext
Namespace:Microsoft.DocAsCode.Plugins
Assembly:Microsoft.DocAsCode.Plugins.dll
Syntax
public interface IDocumentBuildContext
Properties
RootTocPath
The Root Toc Path of current version
Declaration
string RootTocPath { get; }
Property Value
Type | Description |
---|---|
String |
VersionFolder
Current file's version root path from ~ ROOT
Declaration
string VersionFolder { get; }
Property Value
Type | Description |
---|---|
String |
VersionName
Current file's version name
Declaration
string VersionName { get; }
Property Value
Type | Description |
---|---|
String |
Methods
GetFilePath(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 | The xref spec to be registered |
RegisterInternalXrefSpecBookmark(String, String)
Register internal xref spec bookmark
Declaration
void RegisterInternalXrefSpecBookmark(string uid, string bookmark)
Parameters
Type | Name | Description |
---|---|---|
String | uid | The uid of the xref spec to be registered the bookmark |
String | bookmark | The bookmark to be registered |
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 |