Skip to content
Andreas Håkansson edited this page Aug 3, 2013 · 3 revisions

Snow supports the idea of Authors, you can have a single site-wide author, and guest authors.

Site-wide Author

A site-wide author is configured only once, this is done in the global settings file by defining an Author and Email (optional)

An example global settings file could look like:

{
  "author": "Phillip Haydon",
  "email": "[email protected]",
  "posts": "_posts",
  "layouts": "_layouts",
  "output": "Website",
  "urlFormat": "{year}/{month}/{title}",
  "copyDirectories": [
    "images",
    "javascripts",
    "stylesheets"
  ]
}

This will give you a property on your Post Model for Author and Email.

You can now call @Model.Author and it will render the name defined in the global settings file.

Guest Authors

A guest author is someone who may write once, or possibly often, but is specified on a post-by-post basis.

To define a guest author simply add the same author/email properties in the post header.

An example post header would look like:

---
author: Andreas Håkansson
email: [email protected]
layout: post
category: Azure
title: Setting up a ServiceStack Service
---

A guest author will always override a global setting author.