From 17469e7d52a90fa249fa8f315ac96716a294adb8 Mon Sep 17 00:00:00 2001 From: Frans Bouma Date: Wed, 10 Feb 2016 14:00:21 +0100 Subject: [PATCH] Fixes and additions Added documentation about automatic H2 item addition to ToC Fixed issue when copying files which already existed (are now overwritten) Bumped version to v0.7.2 --- readme.md | 3 +++ src/Constants.cs | 2 +- src/Utils.cs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 5ddc65c..e66ed41 100644 --- a/readme.md +++ b/readme.md @@ -55,6 +55,9 @@ Each level, starting with the root, has a special page defined, `__index`. This ### Levels without __index defined If a level has no `__index` defined, `DocNet` will create a `__index` entry for the level and will specify as target `/nameoflevel.md`. If the page exists it will be loaded as the content for the index of the level, if it doesn't exist, the HTML will simply contain the topictitle and a list of all the sub topics in the level. This guarantees the tree can always be navigated in full. +## Automatic H2 level ToC entry discovery +`Docnet` will automatically add all H2 (`##` marked) headers to the ToC as sub navigation elements below a page ToC item. It will automatically add anchors to these H2 headers in the HTML output for the page as well. This makes it very easy to create a fine-grained ToC for easy discovery. + ## Themes `Docnet` uses themes to produce output in a certain form. A theme is a folder within the `Themes` folder which contains a `PageTemplate.htm` file and a `Destination` folder which contains zero or more folders and files which have to be copied to the `Destination` folder specified in the `docnet.json` file. diff --git a/src/Constants.cs b/src/Constants.cs index 7e5cec9..6370713 100644 --- a/src/Constants.cs +++ b/src/Constants.cs @@ -30,6 +30,6 @@ namespace Docnet { public class Constants { - public const string Version = "0.7.1"; + public const string Version = "0.7.2"; } } diff --git a/src/Utils.cs b/src/Utils.cs index 4ec96d4..cb053a0 100644 --- a/src/Utils.cs +++ b/src/Utils.cs @@ -68,7 +68,7 @@ namespace Docnet // Get the files in the directory and copy them to the new location. foreach(FileInfo file in sourceFolder.GetFiles()) { - file.CopyTo(Path.Combine(destinationFolderName, file.Name), false); + file.CopyTo(Path.Combine(destinationFolderName, file.Name), true); } if(copySubFolders) {