FransBouma / DocNet

Your friendly static documentation generator, using markdown files to build the content.
http://fransbouma.github.io/DocNet/
248 stars 36 forks source link

Implement Projbook's Snippet include feature #38

Closed FransBouma closed 7 years ago

FransBouma commented 7 years ago

Projbook supports inclusion of snippets from external files. This is particularly helpful if you e.g. want to include a method or class from a C# file into documentation: by using the inclusion of a snippet, the original text is included as a fenced codeblock and it's not a burden to keep things in-sync.

The proposed syntax is:

@snippet language [filename] pattern

As Projbook is MIT licensed, we can include their extractors for C#, XML and plain text, and use that. The C# extractor is particularly helpful as it's based on Roslyn and supports some neat syntax. See: http://defrancea.github.io/Projbook/projbook.html#Pageextractormd-c--pattern

In the syntax above:

Tasks:

FransBouma commented 7 years ago

Implemented