MIIS Release History
MIIS uses semantic versioning. That means it only changes the major version when there're breaking changes. A change in the minor version means new features. A change in the third number means no new features, just bug fixes.
You can check all the releases, including the minor ones, at Github.
Version 3.0.0
Released, March 30th 2020
Version 3.0 is here (at last)!
It's rebuilt almost from scratch to add tons of new features and enhancements.
I've been using it for several real web sites for the last 6 months, some of them with hundreds of thousands of unique users per month, so it's thoroughly tested in real life conditions.
Unfortunately I didn't have the time yet to document everything on the main site, but I'll do it as soon as I can. Anyway you can see almost all the features in action in the Tests
folder of the main repository. Just copy that folder to your MIIS site and you can play and test with it.
This is a, more or less, exhaustive list of new features:
Support for Liquid Tags and syntax. Mostly compatible with Jekyll and the likes for the simple migration of templates (note that advanced templates that use Ruby extensions and other specific things would need a more laborious adaptation).
You can easily create your own liquid tags and filters in .NET asseblies (DLLs). Automatic detection and use.
Templates:
- Added inheritance support to template's layouts. Just add a
Layout
property in the front-matter of the layout. Prevents circular references. - If you specify
TemplateName: raw
in the Front-Matter, then no template will be used and you'll get the final raw HTML for the requested page. useful for debugging and to return raw information, for example for returning JSON or XML files (RSS, Atom). - When you use
TemplateName:raw
you can also add a newmime
field in the page (it's a Front-Mater only field) that allows you to specify the MIME type of the raw content that is going to be returned from the current page. This parameter can be useful to return formatted text that gets generated from a raw.mdh
file (for example, to create special kinds of files, such as RSS, JSON... directly from MIIS). - Now you can disable the current template in a page by specifying
TemplateName: none
in the Front-Matter (orweb.config
in any folder). This will use the default HTML5 basic template that only includes de basic tags, a CSS file and the content. This is useful for testing purposes or to create some basic pages for special purposes.
- Added inheritance support to template's layouts. Just add a
Front-Matter sources (FMS): they're a way to create data sources for your Front-Matter fields. The work in global fields in
web.config
too. I've included several useful FMS out of the box:FilesFromFolder
: processes and retrieves information form files in any folder for a lot of different uses: you can have aposts
collection for a blog (with automatic tags and categories), you can create language resources for multilingual templates and sites, maintain and reuse information for authors...PaginatorForFolder
: a FMS that eases the creation of paged content from files, compatible with the one in Jekyll.CategsFromFolder
: retrieves the categories for files in a folder. Useful to work with documentation, blogs... Compatible with the paginator FMS.TagsFromFolder
: retrieves the tags for files in a folder. Useful to work with documentation, blogs... Compatible with the paginator FMS.
File Processing Fields now can act as components too, being wrapped in specific layouts for reuse, using the new
component
field.Many new possibilities for inserting files in your content or in templates:
- Insert a sub-file in the data context of the current file (using the Front-Matter data of the current file).
- Insert a sub-file in its own data context (keeping its Front-Matter data).
- Insert a sub-file without using any context (no data used for the processing of the file and therefore all the placeholders are deleted in the final HTML).
- Insert a sub-file using the data context of another file. Useful for keeping data-only files that can be resused all over the place.
Now you can use any parameter received form field, cookie or server variable in your content through a conventional placeholder. For example
{{HTTP_USER_AGENT}}
or the name of a field sent in the GET or POST methods. The use of placeholders that refer to any of those parameters (query string, form data, cookies or server variables) automatically disable the caching mechanism because they vary on each request. So use them carefully if caching is important for you. For security reasons if you don't include any of them in your content they are dismissed, so never mind. If you create a custom Front-Matter Source and want to take advantage of query or form parameters in cached pages, generating an individual cache for them, you must declare them accordingly (see examples).New standard fields available to use in templates and content pages:
{{FileExt}}
: current content file extension.{{Url}}
: current file absolute URL from the root folder (not including domain, i.e:/folder/file.md
).{{UrlNoExt}}
: current file absolute URL without the file extension (i.e: `/folder/file).{{Domain}}
: current domain that is serving the site, including the port if it's not the default one (80 or 443) (ie:www.mydomain.com
).{{BaseUrl}}
: protocol + domain (i.e: https://www.mydomain.com){{Now}}
and{{Today}}
: return the server's current date and time in the short form for the current user's locale (i.e.:30/03/2020 18:27:17
). You can format dates using thedate
filter. By default it uses the .NET formatting instead of Ruby formatting (typical of Liquid), but you can change that (see theDateFormat
global parameter below).{{Time}}
: Just the time (i.e.:18:27:07
).- ``: The final HTML content, WITHOUT the template and WITH liquid tags processed. Now, you can reuse this field in any content, not just in templates. Useful for processing files with Front-Matter Sources.
{{Date}}
: the date for a file. You can manually specify it in the Front-Matter or it will use the creation date for the file.{{DateCreated}}
: the creation date for the file.{{DateModified}}
: the modification date for the file.{{dir}}
: the current directory absolute path from the root where the file is located (i.e.:/midir/muSubDir/
).{{TemplateName}}
: sets or gets the name of the template used for the current file.{{Layout}}
: sets or gets the name of the current layout of the template used for the current file.{{excerpt}}
,{{description}}
,{{summary}}
: fields that can be used to specify a summary for the current file (read in the content or template, and write in the Front-Matter). If more than one is used, the precedence is:{{excerpt}}
,{{description}}
and{{summary}}
.{{UniqueId}}
:{{isauthenticated}}
:true
if the current user has been authenticated in the site using any of the supported methods (Forms, Windows, OAuth...) orfalse
if not.{{authtype}}
: the type of authentication performed.{{username}}
: the name of the currently authenticated user.
Enable or disable caching per file, not only globally as in 2.x. You can have caching enabled globally in
web.config
and at the same time disable it only for specific files, or the other way around. The parameter to enable/disable caching is now calledCaching
. The oldUseMDCaching
parameter has been deprecated. It still works, but it can disappear in future updates. UseCaching
instead.More advanced Markdown extensions enabled by default (if in doubt about their function, see Markdig's documentation to know more about them):
- Abbreviations
- AutoIdentifiers
- Citations
- CustomContainers
- DefinitionLists
- EmphasisExtras
- Figures
- Footers
- Footnotes
- GridTables
- Mathematics
- MediaLinks
- PipeTables
- ListExtras
- TaskLists
- Diagrams
- AutoLinks
- GenericAttributes
You can now use the new
EnableMDExtensions
field (globally or per file) to enable some more Markdown extensions if needed. Just add them in a parameter with a "+" sign to separate them (case insensitive). For example:<add key="MIIS:EnableMDExtensions" value="hardlinebreak+bootstrap+smartypants"/>
. The available extra extensions are- hardlinebreak: Use softline breaks in Markdown as Hardline breaks in HTML
- bootstrap: Adds some Bootstrap classes to the resulting HTML. See this
- smartypants: Translates plain ASCII punctuation characters into “smart” typographic punctuation HTML entities. See this
- nofollowlinks: Adds
rel=nofollow
to all links rendered to HTML - nohtml: Disables the HTML support in the markdown processor (for constraint/safe parsing), so you couldn't mix HTML into your Markdown content.
- globalization: Adds support for right-to-left content by adding appropriate html attributes.
- nonascii-noescape: Disable URI escape with
%
characters for non-US-ASCII characters in order to workaround a bug under IE/Edge with local file links containing non US-ASCII chars. DO NOT USE OTHERWISE.
Added the
naming
anddateformat
global parameters.- They allow to change the default behavior of Liquid tags when processing placeholders and dates.
- The valid values for both parameters are
csharp
andruby
. The default values if not specified areruby
for naming (allows to be more compatible with jkyll templates) andcsharp
for dates (C# developers are much more comfortable with .NET formatting than with Ruby`s which in fact is C's). - They only work if set in the root
web.config
file. They're stablished once for the whole application on the first page load. - C# date formatting reference
- Ruby date formatting reference
Added support for non-ASCII header autolinks.
Fixed extra new line added at the beginning of the content because of Front-Matter removal. No extra new line is added now.
If you want to invalidate a field you can use
null
(C#) ornil
(Ruby). Both will do. However, if a field is not defined anywhere (does not exit), it's default value is neithernull
nornil
but an empty string""
. Anyway you can check for the existence of a field in a template (or directly in the content) with, but if you explicitly want to check for the inexistence of the field you must write:
.
Breaking changes
- Indented code blocks not supported in this new version due to the new pipeline for processing and rendering the contents and templates. This enables safely mixing Markdown and HTML without you needing to take into account the indented code block rules. Anyway, I'm not a huge fan of indented code blocks anyway because they are not explicit and it's easy to create one inadvertently so, IMHO, they should be removed from the Markdown specification altogether. In MIIS' case, however, it's now a mandatory exclusion, so take it into account.
- The File Processing Fields (FPF) (files included in other files by referring them in the Front-Matter) now resolve the tags before injecting the content. They resolve the tags in the injected file context (using the fields in their Front-Matter, not in the mother file Front-Matter).
- Removed the
allowDownloading
global option and the corresponding "download" query string parameter. Now you can't download the original files.
Version 2.3.0
Released, April 6th 2019
- Removed the
allowDownloading
option and the corresponding "download" query string parameter. - Now you can disable the current template in a page by specifying `TemplateName: none´ in the Front-Matter. This will use the default HTML5 basic template that only includes de basic tags, a CSS file and the content. This is useful for testing purposes or to create some basic pages for special purposes.
- If you specify `TemplateName: raw´ in the Front-Matter, then no template will be used and you'll get the final raw HTML for the requested page. useful for debugging and to return raw information.
- When you use the "raw" template to get raw contents from a file, you can also add a new
{{mime}}
parameter in the page (it's a Front-Mater only field) that allows you to specify the MIME type of the raw content that is going to be returned from the current page. This parameter can be useful to return formatted text that gets generated from a raw.mdh
file. - 6 new standard fields available to use in templates and content pages:
{{Url}}
{{NoExtUrl}}
{{Domain}}
{{BaseUrl}}
{{Now}}
{{Time}}
- Fixed extra new line added at the begnining of the content because of Front-Matter removed. No extra new line is added now.
Version 2.2.0
Released, August 20th 2018
- Added the new "HttpStatusCode" property that allows pages to send an specific status code to the client, such as 404, 410, 500, etc... in order to create special pages with specific purposes.
Version 2.1.0
Released, March 24th 2018
- Added the new "Published" property that allows you to prevent certain files or entire folders to be rendered when requested.
- Squashed a bug with templates' caching preventing some files to invalidate their cache
Version 2.0
Released, March 2018
- Breaking changes
- New app DLL name:
MIISHandler.dll
instead of the old oneIISMarkdownHandler.dll
. Make sure you delete the old one before updating! You must change the handlers section in yourweb.config
file. Just copy it from the downloaded MISS released files. - Placeholders now use double curly-braces (
{{field}}
) instead of just one. Upgrade your templates before updating. - The
Markdown-Template
parameter doesn't exist anymore. Now it uses two independent parameters for the template location and the layout, being much more flexible. See configuration/settings. - the
BaseFolder
field is deprecated. Use~/
instead. - The
BaseFolder
andTemplateBaseFolder
fields do not include a slash/
at the end. This makes the paths more readable. - The
UseMDCaching
andAllowEmojis
parameter's value are"1"
by default (enabled), so you don't need to specifcy them most of the time.
- What's new
- Includes in templates. Now you can reuse any part of your template to define different layouts using the same base code. The include files can include other files too (no circular-references allowed).
- "Fragments". This powerful new concept allows you to define several contents to be located in the same layout to form a single page, even with optional parts.
- Front-Matter: Define any parameter in the Front-Matter of a file and use it inside the content or in the current template. Re-define any global parameter or field to be applied differently in any page. For example, you can define something as simple as the title or author of the page, or even change the layout it uses to render itself. Front-Matter values take precedence over values defined globally.
MIIS:
prefix to define global parameters & fields inweb.config
files. To avoid conflict with parameters of the same name in other software you may be using. The use of this prefix is optional but recommended. It'll take precedence over the non-prefixed parameters with the same name in case of conflict.
Version 1.1
Released September 2017
- Added support for plain HTML content through the special
.mdh
extension. If you access a file with the.mdh
extension it will be used with the current template and/or styles un-transformed. In this way you can use plain-old HTML with your current template for special pages that need a finer control of the contents. Useful for front pages, for example. - New fields for templates:
{isauthenticated}
: boolean that shows if the current user is authenticated or not. Useful with scripts.{authtype}
: the type of authentication used.{username}
: the name of the current authenticated user.
Version 1.0
Released March 2017