From e4f6b5ae59d955b99faa9b0d088755ca66a26b8b Mon Sep 17 00:00:00 2001
From: Frans Bouma block
```
##Linking
-`Docnet` doesn't transform links. This means that any link to any document in your documentation has to use the url it will get in the destination folder. Example: you want to link to the file `How to\AddEntity.md` from a page. In the result site this should be the link `How%20to/AddEntity.htm`, which you should specify in your markdown. In the future it might be `docnet` will be updated with link transformation, at the moment it doesn't convert any links besides the usual markdown ones. The markdown parser also doesn't allow spaces to be present in the urls. If you need a space in the url, escape it with `%20`.
+`Docnet` doesn't automatically transform links to markdown files by default. To enable automatic link conversion to local markdown files, please specify the `ConvertLocalLinks` option in the [docnet.json file](docnetjson.md) file with the value `true`. If `ConvertLocalLinks` isn't specified or set to `false`, any link to any document in your documentation has to use the url it will get in the destination folder.
+Example: you want to link to the file `How to\AddEntity.md` from a page. If `ConvertLocalLinks` isn't specified or set to `false`, you have to specify in the markdown the url it will need to be in the result site, which is the link `How%20to/AddEntity.htm`. If `ConvertLocalLinks` is set to `true`, you can specify `How%20to/AddEntity.md` and DocNet will convert it to `How%20to/AddEntity.htm`.
+
+@alert important
+The markdown parser also doesn't allow spaces to be present in the urls. If you need a space in the url, escape it with `%20`.
+@end
diff --git a/docnetjson.htm b/docnetjson.htm
index ffded52..05625d3 100644
--- a/docnetjson.htm
+++ b/docnetjson.htm
@@ -89,6 +89,7 @@
"Theme" : "themefolder",
"SourceFoldersToCopy" : ["folder1", "foldern"],
"Footer" : "footer text or HTML",
+ "ConvertLocalLinks: "true" | "false",
"Pages" :
{
"__index" : "index.md",
@@ -112,6 +113,7 @@
IncludeSource specifies the folder where the files specified to be included using @@include directives are located. If IncludeSource isn't specified, the value Includes is assumed. Theme specifies the folder within the Themes folder in the folder the docnet executable is located which is used as the theme for the pages to generate. Docnet expects a file called PageTemplate.htm within the specified Theme folder, which contains the HTML which is used as the wrapper file for the HTML generated from the markdown. It has to contain a couple of marker, which are described later in this document. If Theme isn't specified, Default is assumed.SourceFoldersToCopy. This is an optional directive with, if specified, one or more folder names relative to Source, which contain files to copy to the Destination folder. E.g. image files used in the markdown files, located in an Images folder can be copied this way to the output folder reliably. All folders specified are copied recursively.ConvertLocalLinks. This is an optional directive which, if specified and set to "true", will make DocNet convert all local links to .md suffixed files into .htm files. Example: (local link)[somemarkdownfile.md] will be converted to <a href="somemarkdownfile.htm">local link</a>. Non-local urls are not converted. Default: "false". Footer. This is text and/or HTML which is placed in the footer of each page, using a marker (see below).Pages contains the pages to generate into the output, in the order and structure in which you want them to appear in the navigation. The name given is the value used in the navigation tree and has to be unique per level. The value specified with each name is the markdown file to load, parse and generate as .htm file in the output. The markdown file is relative to the path specified in Source. A file foo.md will be generated as foo.htm in the output. Inclu
specified in the docnet.json file, the folder Includes is assumed.
The directive @@include("somehtmlinclude.htm")
results in the contents of somehtmlinclude.htm being included at the spot where the @@include statement is given, as shown below:
This is an included piece of html
+@@include("includedhtml.htm")
You can also include markdown, which is then processed with the other markdown as if it's part of it.
-This is an included piece of Markdown.
@@include("includedmarkdown.md")
diff --git a/markdownsupport.htm b/markdownsupport.htm index 3dd38d9..b52f758 100644 --- a/markdownsupport.htm +++ b/markdownsupport.htm @@ -183,8 +183,10 @@ If you want to have an image rendered centered with a note below it, simply specTo specify a block of text in a fixed sized font but not specify any language highlighting, specify nohighlight as language name:
this is a simple <pre> block
Docnet doesn't transform links. This means that any link to any document in your documentation has to use the url it will get in the destination folder. Example: you want to link to the file How to\AddEntity.md from a page. In the result site this should be the link How%20to/AddEntity.htm, which you should specify in your markdown. In the future it might be docnet will be updated with link transformation, at the moment it doesn't convert any links besides the usual markdown ones. The markdown parser also doesn't allow spaces to be present in the urls. If you need a space in the url, escape it with %20.
Docnet doesn't automatically transform links to markdown files by default. To enable automatic link conversion to local markdown files, please specify the ConvertLocalLinks option in the docnet.json file file with the value true. If ConvertLocalLinks isn't specified or set to false, any link to any document in your documentation has to use the url it will get in the destination folder.
Example: you want to link to the file How to\AddEntity.md from a page. If ConvertLocalLinks isn't specified or set to false, you have to specify in the markdown the url it will need to be in the result site, which is the link How%20to/AddEntity.htm. If ConvertLocalLinks is set to true, you can specify How%20to/AddEntity.md and DocNet will convert it to How%20to/AddEntity.htm.
The markdown parser also doesn't allow spaces to be present in the urls. If you need a space in the url, escape it with %20.