Skip to content

Commit

Permalink
Small documentation modifications for v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalarcon committed Sep 10, 2017
1 parent fb0f105 commit 2b8615a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/Managing-File-Extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,23 @@ Just open the `web.config` file and locate the `system.webServer/handlers` secti

You can add or remove extensions as needed.

## The `.mdh` special extension
By default (if not changed in the previous section of the `web.config` file) MIIS supports a special file type for pure HTML contents. Anything inside a `.mdh` file will be used with the current template un-transformed. This is very useful to be used in special pages that need a very specific HTML structure,such as the main front-page of a site or any other complex page. With this kind of files you'll use HTML instead of Markdown to gain control over the final HTML and can keep the indentation of the code (in Markdown indented HTML code would be interpreted as a code fragment).

## Default Documents

Notice the `defaultDocument` setting in this section. It defines the name of the default files to be served from your site. So, in the default configuration as seen above, it will serve the `index.md` file without explicitly requesting it in any folder:

```
http://www.midomain.com/
http://www.midomain.com/SubFolder/
http://www.mydomain.com/
http://www.mydomain.com/SubFolder/
```

are equivalent to:

```
http://www.midomain.com/index.md
http://www.midomain.com/SubFolder/index.md
http://www.mydomain.com/index.md
http://www.mydomain.com/SubFolder/index.md
```

You can change this name or add more default names to be used in the same order as they appear in this setting.
Expand Down
3 changes: 3 additions & 0 deletions docs/Templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Creating your own templates is really straightforward. You simply need to create
- **`{filename}`**: The name of the markdown file from which the final HTML is extracted. It includes the file extension.
- **`{datecreated}`**: The creation date and time for the Markdown file. It's shown in the default format for the current user language.
- **`{datemodified}`**: The date and time when the Markdown file was last modified. It's shown in the default format for the current user language.
- **`{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.
- **`{basefolder}`**: The base folder of current web app in IIS. This will translate at runtime in the path, relative to the root of the domain, where the base folder of the site is hosted. If your site is hosted at the root of the domain (ie.: `http://www.mydomain.com`), it will be simply `/`. However if your site is hosted at a virtual folder or a virtual app (ie.: `http://www.mydomain.com/Docs/`) then this parameter will be translated into `/Docs/`. This is something a good designed template should take into account since you don't know it it will be always hosted at the root folder or not. This parameter is only calculated once for the site, so it's very fast to use.
- **`{templatebasefolder}`**: This one is very important since it will always point to the relative path of the folder where your template is located. This means that you can use relative paths to all the related files such as CSS, JavaScript or Image files very easily. It take into account the same considerations used with the previous parameter. This way if your template is located under `/templates/MyGreatTemplate/` this will be used to substitute this placeholder, and you can then add the rest of the path to pint to your related resources. It's only calculated once per site too, so it's very fast to use.

Expand Down

0 comments on commit 2b8615a

Please sign in to comment.