| @@ -198,6 +198,15 @@ namespace Docnet | |||||
| return _destinationPath; | return _destinationPath; | ||||
| } | } | ||||
| } | } | ||||
| public string IncludeFolder | |||||
| { | |||||
| get | |||||
| { | |||||
| string rawIncludeFolder = _configData.IncludeSource; | |||||
| return string.IsNullOrWhiteSpace(rawIncludeFolder) ? "Includes" : rawIncludeFolder; | |||||
| } | |||||
| } | |||||
| public string ThemeName | public string ThemeName | ||||
| { | { | ||||
| @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; | |||||
| // You can specify all the values or you can default the Build and Revision Numbers | // You can specify all the values or you can default the Build and Revision Numbers | ||||
| // by using the '*' as shown below: | // by using the '*' as shown below: | ||||
| // [assembly: AssemblyVersion("1.0.*")] | // [assembly: AssemblyVersion("1.0.*")] | ||||
| [assembly: AssemblyVersion("0.10.1.0")] | |||||
| [assembly: AssemblyFileVersion("0.10.1")] | |||||
| [assembly: AssemblyVersion("0.11.0.0")] | |||||
| [assembly: AssemblyFileVersion("0.11.0")] | |||||
| @@ -67,7 +67,7 @@ namespace Docnet | |||||
| { | { | ||||
| this.MarkdownFromFile = File.ReadAllText(sourceFile); | this.MarkdownFromFile = File.ReadAllText(sourceFile); | ||||
| // Check if the content contains @@include tag | // Check if the content contains @@include tag | ||||
| content = Utils.IncludeProcessor(this.MarkdownFromFile, Path.Combine(activeConfig.Source, "Includes")); | |||||
| content = Utils.IncludeProcessor(this.MarkdownFromFile, Utils.MakeAbsolutePath(activeConfig.Source, activeConfig.IncludeFolder)); | |||||
| content = Utils.ConvertMarkdownToHtml(content, Path.GetDirectoryName(destinationFile), activeConfig.Destination, _relativeH2LinksOnPage); | content = Utils.ConvertMarkdownToHtml(content, Path.GetDirectoryName(destinationFile), activeConfig.Destination, _relativeH2LinksOnPage); | ||||
| } | } | ||||
| else | else | ||||
| @@ -212,9 +212,9 @@ namespace Docnet | |||||
| /// into the output. | /// into the output. | ||||
| /// </summary> | /// </summary> | ||||
| /// <param name="content">content to be scanned for include tags</param> | /// <param name="content">content to be scanned for include tags</param> | ||||
| /// <param name="includePath">Directory containing the include files</param> | |||||
| /// <param name="includeFolder">Directory containing the include files (absolute folder)</param> | |||||
| /// <returns>String with @@include replaced with the actual content from the partial.</returns> | /// <returns>String with @@include replaced with the actual content from the partial.</returns> | ||||
| public static string IncludeProcessor(String content, string includePath) | |||||
| public static string IncludeProcessor(String content, string includeFolder) | |||||
| { | { | ||||
| Match m = includeRegex.Match(content); | Match m = includeRegex.Match(content); | ||||
| while (m.Success) | while (m.Success) | ||||
| @@ -223,7 +223,8 @@ namespace Docnet | |||||
| { | { | ||||
| string tagToReplace = m.Groups[0].Value; | string tagToReplace = m.Groups[0].Value; | ||||
| string fileName = m.Groups[1].Value; | string fileName = m.Groups[1].Value; | ||||
| string filePath = Path.Combine(includePath, fileName); | |||||
| fileName = fileName.Replace("\"", ""); | |||||
| string filePath = Path.Combine(includeFolder, fileName); | |||||
| if (File.Exists(filePath)) | if (File.Exists(filePath)) | ||||
| { | { | ||||
| content = content.Replace(tagToReplace, File.ReadAllText(filePath)); | content = content.Replace(tagToReplace, File.ReadAllText(filePath)); | ||||