Version Notes (Current Version: v2.17)
v2.17(Pre-Release)
Introduce Master page syntax into Template System:
- Mustache:
{{!master('<master_page_name>')}}
- Liquid:
{% master <master_page_name> %}
- Mustache:
[Breaking Change] View model for
ManagedReference.html.primary.tmpl
is updated from{item: model}
tomodel
, if you overwritesManagedReference.html.primary.tmpl
in your own template, make sure to re-export the template file.
v2.16
- Support the latest csproj format
<Project Sdk="Microsoft.NET.Sdk">
- The latest csproj introduces in a new property
TargetFrameworks
, docfx does not support it for now. To make docfx work, please specifyTargetFramework
when calling docfx. A sampledocfx.json
would be as follows. Themerge
command is to merge YAML files generated with differentTargetFramework
into one YAML file.
{ "metadata": [ { "src": "*.csproj", "dest": "temp/api/netstandard1.4", "properties": { "TargetFramework": "netstandard1.4" } }, { "src": "*.csproj", "dest": "temp/api/net46", "properties": { "TargetFramework": "net46" } } ], "merge": { "content": [ { "files": "*.yml", "src": "temp/api/netstandard1.4" }, { "files": "*.yml", "src": "temp/api/net46" } ], "fileMetadata": { "platform": { "temp/api/netstandard1.4/*.yml": [ "netstandard1.4" ], "temp/api/net46/*.yml": [ "net46" ] } }, "dest": "api" }, "build": { "content": [ { "files": [ "api/*.yml", "**.md", "**/toc.yml" ] } ], "dest": "_site" } }
- The latest csproj introduces in a new property
v2.15
- Bug fixes:
- Auto dedent the included code snippet, both when including the whole file and file sections.
- [Breaking Change]For inline inclusion, trim ending white spaces, considering ending white spaces in inline inclusion in most cases are typos.
- Following GitHub markdown behavior changes.
v2.14
- Bug fixes:
- Fix duplicate project references fail GetCompilationAsync. https://github.com/dotnet/docfx/issues/1414
v2.13
- Breaking Change: Create new type for files in manifest.
- Support working folder for dfm include and code.
- Upgrade YamlDotNet to 4.1.
- Support cross file definition reference for swagger.
- Bug fixes:
- Filter config file is expected in working dir instead of project's dir/src dir.
- Create msbuild workspace with release configuration by default. https://github.com/dotnet/docfx/pull/1356
v2.12
- Bug fixes:
default
template: Do not loadsearch-worker.js
when search is disabled indocfx.js
- C# region support for code snippets broken by #endregion with extra text. https://github.com/dotnet/docfx/issues/1200
- Markdown list continue with def.
- Markdown link rule is not allowed in link text.
- Markdown list restore wrong context.
- Metadata
_docfxVersion
can't be overwritten. https://github.com/dotnet/docfx/issues/1251 statictoc
template out of sync withdefault
template. https://github.com/dotnet/docfx/issues/1256- Fix footer covering sidetoc. https://github.com/dotnet/docfx/issues/1222
v2.11
- Export custom href generator.
- Introduce attribute driven data model to Managed Reference
- Bug fixes:
- Generate overload name/fullname form generic method should not contain method parameter.
- Fix href for markdown link to non-exist files in include files.
v2.10
- Bug fixes:
- Markdown table content is misplaced if there is empty column in it.
- Markdown include should not share link context.
- Fix rawTitle when article's first line is HTML comment.
v2.9.3
- hotfix for wrong file link check message.
v2.9.2
- Remove commit id to avoid config hash changed.
v2.9.1
- Enable to show derived classes.
- Add log for config hash.
v2.9
- Breaking Change Using
<span class="xxx">
for languageKeyWord, paramref and typeparamref in generated yml files, instead of using<em>
and<strong>
. Change default template accordingly. - Remove project
Microsoft.DocAsCode.Utility
, move class toMicrosoft.DocAsCode.Common
. - Get documentation's git information with git command instead of
GitSharp
. - REST:
- Support
remarks
to be overwritten. - Support reference in parameters to be overwritten.
- Support DFM syntax in swagger description
- Support
- Bug fixes:
- Fix inherited member's name when xref unresolved.
- Fix missing items in breadcrumb. (https://github.com/dotnet/docfx/issues/944)
- Fix generating overload method names from generic method.
- Fix full text search not work in index page.
- Fix the warning that no highlight function defined.
v2.8.2
- Fix bug: throw error when md contain wrong path..
v2.8.1
- Fix bug: RelativePath.TryParse should not throw error when path contains invalid path characters.
v2.8
- Improve markdown engine:
- Remove paragraph rule.
- Improve parser performance.
- Report bookmarks in template preprocessor, which is used in URL segment when resolving cross reference.
- Support customizing logo and favicon through metadata. (https://github.com/dotnet/docfx/pull/892)
- Refine the warning message of invalid bookmark.
- Improve layout for print. (https://github.com/dotnet/docfx/issues/852)
- Remove the usage of
FileModel.LocalPathFromRepoRoot
. This property is markedObsolete
. - Copy
PathUtility
,RelativePath
,StringExtension
andFilePathComparer
from projectMicrosoft.DocAsCode.Utility
toMicrosoft.DocAsCode.Common
. The copied classes in projectMicrosoft.DocAsCode.Utility
are kept there for bits compatibility and markedObsolete
. - Add command option
docfx -v
to show version of DocFX - Bug fixes:
- concurrency issue of
Logger
. - unable to handle file link with query string.
- unable to resolve uid for in html
<a href="xref:...">
. - display specName wrong for generic type. (https://github.com/dotnet/docfx/issues/896)
- breadcrumb rendered wrong when multiple toc item matched.
- subcommand metadata can't specify DocFX config file
- concurrency issue of
v2.7.3
- Fix bookmark validation failed when link contains illegal characters.
- Fix xref to fall back to uid.
v2.7.2
- Fix xref with query string not resolved.
- Fix relative path when validating bookmark.
v2.7.1
- Search embedded resource prior to local resource.
v2.7
- Improve markdown engine performance.
- Improve regex.
- Add regex timeout.
- Fix bugs in markdown parser.
- Refine xref.
- Provide more options.
- Support options in query string.
- Support query string in toc href.
- Remove debug information in html.
- Add metadata command option to disable rendering triple-slash-comments as markdown.
- Fix bug in merging properties.
- Support extension for preprocessor file in default template. (https://github.com/dotnet/docfx/issues/662)
- Improve error/warning message.
- Support bookmark validation.
v2.6.3
- minor: fix the Renderer
v2.6.2
- Improve markdown engine performance.
- Improve regex.
- Add regex timeout.
- Fix bugs in markdown parser.
- DFM: Support code in table
v2.6.1
- Fix argumentnullexception for generating overload item.
- Add serializable attribute.
- Use mark.js to highlight keywords.
v2.6
- Remove rest resolved cache.
- Fix assert fail in metadata. (https://github.com/dotnet/docfx/issues/741)
- Add new command option: repositoryRoot.
v2.5.4
- Fix isssue #719 that assertion failed.
v2.5.3
- Update documenation
- Remove debug build option in Release configuration
v2.5.2
- Fix error message for invalid file link.
v2.5.1
- Support attribute filter to filter out attributes.
- Support choosing git URL pattern. (https://github.com/dotnet/docfx/issues/677)
- Fix bug for line number is 0.
v2.5
- Add source file and line number for warning invalid file/uid link.
- Fix bugs in markdown table.
v2.4
- Update default template theme.
- Fix resolving properties for swagger.
- Fix bugs in markdown.
- Fix id in title (following GitHub rule).
- Fix strikeout not work in dfm.
- Fix tight list item behavior.
- Fix line number in table.
v2.3
- Support emoji in markdown content.
- Upgrade yamldotnet to 3.9.
- Refine markdown validation.
- Support separated meta json file.
- Change
hightlight.js
theme togithub-gist
. - Support '.json' as supported swagger file extension.
- Support
topicHref
andtocHref
to specify homepage toc. - Support customized contribute repository and branch for "Improve this Doc" button. (https://github.com/dotnet/docfx/issues/482)
- Improve message for
docfx.exe template
command.
v2.2.2
- Fix bug in
.manifest
file.
v2.2.1
- Fix bug when metadata incremental check.
- Move post process out of DocumentBuilder.
v2.2
- Support multi-version site. (https://github.com/dotnet/docfx/issues/396)
- Support loop reference for Swagger Rest API. (https://github.com/dotnet/docfx/issues/223)
- Support plug-in for post processor.
- Support href for see/seealso tags.
- Improve API reference documentation of namespace and enum.
- Update prerequisite to build docfx.
- Update manifest schema.
- Add chocolatey support in CI script.
- Provide with options in build.cmd.
- Bug fixes:
- syntax for static class is incorrect.
- improve warning message about global namespace class. (https://github.com/dotnet/docfx/issues/417)
- fix normalizexml bug for empty
<code></code>
in tripleslashcomment.
v2.1
- Support for xref zip file in relative path.
- Support anchor in toc file.
- Support plug-in for validating markdown input metadata.
- Add output file md5 hashes.
Breaking Url Rename generic type file name in metadata step
E.g.
System.Func<T>
will generateSystem.Func-1.yml
instead ofSystem.Func`1.yml
, and after build the url will beSystem.Func-1.html
instead ofSystem.Func%601.html
.To keep old behavior, please add following option in metadata part in docfx.json:
"useCompatibilityFileName": true
- Display extension methods in API reference documentation
- Provide with option
_displayLangs
in docfx.json to choose which language version you want to show. - Support more Swagger syntax:
- Support
allOf
. (https://github.com/dotnet/docfx/issues/360) - Support $ref with
[
and]
in json pointer. (https://github.com/dotnet/docfx/issues/359) - Support
parameters
applicable for all the operations underpath
. (https://github.com/dotnet/docfx/issues/358)
- Support
v2.0.2
- Support localization tokens in DFM.
v2.0.1
- Fix bug that file links can't be resolved in overwrite file
v2.0
- Breaking Change Add line info for markdown parser.
- Allow Markdown reference at the end of overwrite file.
- Provide more information for API reference documentation
- display inherited members
- display overridden members
- display implemented interface
- separate category for Explicit Interface Implementation
- Rest api - Enable Tag in Swagger file to organize the APIs.
v1.9
Breaking Change Refactor template system:
- The input data model now contains all the properties including system generated metadata starting with underscore
_
and globally shared variables stored in__global
. You can usedocfx build --exportRawModel
to view the data model. - Preprocessor's
transform
function signature changes to:
exports.transform = function (model){ // transform the model return model; }
- The input data model now contains all the properties including system generated metadata starting with underscore
Provide a new embedded template
statictoc
with TOC generated in build time. Webpages generated by this template is PURE static and you can simply open the generated webpage file to take a preview, no local server is needed.- Allow switch markdown engine.
- Allow export metadata to manifest file.
- Improve
exclude
logic to help avoidPathTooLongException
. (https://github.com/dotnet/docfx/issues/156) - Provide with a config file named
search-stopwords.json
to customise full-text search stop-words. (https://github.com/dotnet/docfx/issues/279) - Bug fixes:
- Fix bug when cref contains loop. (https://github.com/dotnet/docfx/issues/289)
- Make sure id is unique for each HTML in markdown transforming. (https://github.com/dotnet/docfx/issues/224)
- Fix index range bugs in
YamlHeaderParser
. (https://github.com/dotnet/docfx/issues/265)
v1.8.4
- Fix bug when outputFolder, basedirectory and destination are all not set
- fix
<a>
tag when href has invalid value with anchor
v1.8.3
- Fix bug for [!include()[]] when multiple articles in different subfolder including one file that v1.8.2 not resolved
v1.8.2
- Fix bug for [!include()[]] when multiple articles in different subfolder including one file
v1.8.1
- Fix bug when serialize attribute argument for type array. (https://github.com/dotnet/docfx/issues/280)
- Fix bug when include file link to an anchor.
- Don't modify link when target file not existed.
v1.8
- Support multiple regions selection, code lines highlight and dedent length setting in Code Snippet. (https://github.com/dotnet/docfx/issues/189)
- Support more tags in triple-slash-comments, e.g.
lang
,list
,code
,paramref
andtypeparamref
. - Add Example section to default template.
- Bug fixes:
- Fix bug when parsing triple-slash-comments. (https://github.com/dotnet/docfx/issues/221)
- Fix syntax generation for VB module. (https://github.com/dotnet/docfx/issues/260)
v1.7
- Behavior change
- For articles not in TOC, it's TOC file is the nearest TOC File in its output folder. Previously we only search the TOC File under the same input folder of the Not-In-Toc article.
- Provide more information for API reference documentation
- Type of events (https://github.com/dotnet/docfx/issues/217)
- Parameters/returns for delegates (https://github.com/dotnet/docfx/issues/218)
- Type parameter description (https://github.com/dotnet/docfx/issues/204)
- Cross-reference is now supporting anchor
#
(https://github.com/dotnet/docfx/issues/190) - C# Code snippet now supports referencing source code using a region
#engion
(https://github.com/dotnet/docfx/issues/160) - Support TOC reference. With this syntax, we can combine multiple TOC files into a single TOC. (https://github.com/dotnet/docfx/issues/161)
- Improve user experience when using
docfx.msbuild
in VS IDE - Code refactor:
- We improved DocFX project structure in this release.
Microsoft.DocAsCode.EntityModel
namespace is no longer in use. Assemblies are separated intoMicrosoft.DocAsCode.Build
,Microsoft.DocAsCode.DataContracts
, andMicrosoft.DocAsCode.Metadata
namespace. All assemblies can be separately referenced through NuGet. In this way, it is much convenient for plugin writers to reference existing data models and utilities.
- We improved DocFX project structure in this release.
v1.6
- Add attribute in c# and vb syntax.
- Support full text search, with pure client side implementation:
- The feature is disabled by default. You can enable it by adding
"_enableSearch": true
to theglobalMetadata
property ofdocfx.json
. - The search engine is powered by lunr.js
- The feature is disabled by default. You can enable it by adding
v1.5
- Add 3 options to
build
subcommand:--rawModelOutputFolder
: to specify the output folder for raw model if--exportRawModel
. If the value is not set, raw model will be in the same folder as the output documenation.--viewModelOutputFolder
: to specify the output folder for view model if--exportViewModel
. If the value is not set, view model will be in the same folder as the output documenation.--dryRun
: if this option is set,docfx
will go through all the build processes for all the documents, however, no documentation will generated.
- Improve markdown:
- Allow paired parentheses in link target, e.g.
[text](paired(parentheses(are)supported)now "title")
.
- Allow paired parentheses in link target, e.g.
- Improve performance for document build.
- Breaking changes:
- modify interface IDocumentBuildStep.
v1.4.2
- Fix bug for encoded link file.
- Fix bug for directory not found.
v1.4.1
Remove newFileRepository
from output metadata
v1.4
Cross-reference related:
- Make @uid rule more strict: if
@
is not followed by'
or"
, it must be followed by word character ([a-zA-Z]
) - Introduce new syntax for cross-reference:
- similar to autolink:
<xref:uid>
- similar to link:
[title](xref:uid)
or[title](@uid)
- similar to autolink:
support
uid
intoc.yml
:- uid: getting-started - uid: manual
support cross reference in
toc.md
# <xref:getting-started> # [Override title](@getting-started)
- Make @uid rule more strict: if
Update yaml serializion: Add ExtensibleMemberAttribute
- Improve
docfx init
, now withdocfx init
, adocfx_project
seed project will will generated. - Several improvements for
default
template:- Provide properties to customize layout:
_disableNavbar
,_disableBreadcrumb
,_disableToc
,_disableAffix
,_disableContribution
,_disableFooter
- Include empty
main.css
andmain.js
tohead.tmpl.partial
partial template so that there is no need to customizehead.tmpl.partial
when you want to customize website style.
- Provide properties to customize layout:
v1.3.8
Fix no link and ref link cannot work issue in table
v1.3.7
- Fix no link and ref link cannot work issue in markdownlite.
- Fix link issue (allow space in link) in markdownlite.
- Fix para for list in markdownlite.
- Fix tokenize bug in dfm.
- Add markdown token validator in dfm.
v1.3.6
- Fix cross domain issue: timeout exception throws when document build takes longer than 15 minutes
- Fix docfx IOException when calling
docfx -l report.txt
v1.3.5
FIX Github pages compatibility issue( Github pages now disallow iframe, however the default template of docfx
uses iframe to load side toc): Update default template to use AJAX to load side toc, the original one is renamed to iframe.html
. So now we have 2 embedded template, one is default
and another is iframe.html
.
v1.3
docfx
improvements- Add subcommand
docfx template
. You can nowdocfx template list
anddocfx template export -A
to list and export all the embeded templates! - Add subcommand
docfx merge
. You can use this subcommand to mergeplatform
from multiple APIs with the sameuid
- Add two options to
build
subcommand,--exportRawModel
and--exportViewModel
.--exportRawModel
exports the data model to apply templates,--exportViewModel
exports the view model after running template's pre-process scripts. - Add
--globalMetadata
, and--globalMetadataFile
options tobuild
subcommand. These options allowglobalMetadata
to be loaded from command line in json format or from a JSON file. - Add
--fileMetadataFile
option tobuild
subcommand. This option allowsfileMeatdata
to be read from an external JSON file. - Support plugins. You can create your own template with a
plugins
folder, inside which, you create your own build steps. Refer to @Microsoft.DocAsCode.EntityModel.Plugins.BaseDocumentBuildStep for a sample plugin implementation.
- Add subcommand
- DFM syntax improvements
- Support note&div syntax
- Support query format in code snippet
[!code-<language>[<name>](<codepath><queryoption><queryoptionvalue> "<title>")]
- Change xref logic:
- If content after
@
is wrapped by'
or"
, it contains any character including white space - If content after
@
is not wrapped by'
or"
, it ends when:- line ends
- meets whitespaces
- line ends with
.
,,
,;
,:
,!
,?
and~
- meets 2 times or more
.
,,
,;
,:
,!
,?
and~
- If content after
- Code improvements
- Add Microsoft.DocAsCode.YamlSerialization This project is based on YamlDotNet. It overrides classes like type converters to improve performance and fix bug existed in YamlDotNet
- Refactor markdown engine Microsoft.DocAsCode.MarkdownLite
- Add IMarkdownRewritable<T>. It provides a way to operate markdown tokens.
- Other improvements
- Add a new property
_path
into_attrs
, it stands for the relative path fromdocfx.json
to current file - Improve missing xref warning message to include containing files.
- Add
data-uid
as attribute to generated html from default template, so that you can now finduid
for API much more easily.
- Add a new property
v1.2
- Support Liquid template, templates ending with
.liquid
are considered as using liquid templating language. Liquid containsinclude
tag to support partials, we follow the ruby partials naming convention to have_<partialName>.liquid
as partial template. A custom tagref
, e.g.{% ref file1 %}
is introduced to specify the resource files that current template depends on. - DFM include syntax is updated to use
[!include[<title>](<filepath>)]
syntax - Disable glob pattern in
docfx metadata
command line option as it is to some extent confusing, consider using a-g
option later to re-enable it.
v1.1
- Rewrite Glob
The syntax of glob is:
**
is called globstar, it matches any number of characters, including/
, as long as it's the only thing in a path part.- If
**
is right behind/
, it is a shortcut for**/*
. *
matches any number of characters, but not/
?
matches 1 characters, but not/
{}
allows for a comma-separated list of "or" expressions, e.g.{a,b}
=>a
andb
!
at the beginning of a pattern will negate the match[...]
matches a range of characters, similar to a RegExp range/
is considered as path separator, while\
is considered as escape character
- Support
fileMetadata
. You can specify different metadata value using glob pattern - Improve overwrite functionality. Now you can overwrite not only summary/remarks, but also descriptions for parameters. You can even add exceptions.
- Now the latest project.json projects are also supported in DNX version.
- Simple code snippet is now supported, syntax is
[!code-REST-i[title](path "optionalTitle")]
- Url is now encoded in markdown link.
v1.0
- Add section syntax in DFM
- Fix several bugs in DFM
- Update default template: rename css/js file
- Fix several display issue in default template
v0.3
- Support Static Website Templates
- Schema change to docfx.json