Skip to content

Instantly share code, notes, and snippets.

@contensis
Created April 28, 2014 09:58
Show Gist options
  • Save contensis/11367363 to your computer and use it in GitHub Desktop.
Save contensis/11367363 to your computer and use it in GitHub Desktop.
Working with Metadata
' Add a piece of metadata with name and content attributes
CurrentContext.Page.Metadata.Add("description", "My page description")
' Specify the character encoding for the document.
CurrentContext.Page.Metadata.Add(HttpEquiv.ContentType, "utf-8")
' Specify the preferred style sheet to use.
CurrentContext.Page.Metadata.Add(HttpEquiv.DefaultStyle, "style.css")
' Defines a time interval for the document to refresh itself.
CurrentContext.Page.Metadata.Add(HttpEquiv.Refresh, "utf-8")
' Add a piece of metadata to the page header with 'name', 'content' and 'scheme' attributes.
CurrentContext.Page.Metadata.Add("description", "My page description", "scheme")
' Add a piece of metadata to the page header with 'http-equiv', 'content' and 'scheme' attributes.
CurrentContext.Page.Metadata.Add(HttpEquiv.ContentType, "My page description", "scheme")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment