Skip to content

Commit

Permalink
better docpad config
Browse files Browse the repository at this point in the history
  • Loading branch information
MCM authored and MCM committed Oct 29, 2013
1 parent e316d53 commit 104b910
Showing 1 changed file with 62 additions and 3 deletions.
65 changes: 62 additions & 3 deletions docpad.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,70 @@

# Define the DocPad Configuration
docpadConfig = {
templateData:
# Template Data
# =============
# These are variables that will be accessible via our templates
# To access one of these within our templates, refer to the FAQ: https://github.com/bevry/docpad/wiki/FAQ

templateData:

# Specify some site properties
site:
title: "My Website"
# The production url of our website
url: "http://website.com"

# Here are some old site urls that you would like to redirect from
oldUrls: [
'www.website.com',
'website.herokuapp.com'
]

# The default title of our website
title: "Your Website"

# The website description (for SEO)
description: """
When your website appears in search results in say Google, the text here will be shown underneath your website's title.
"""

# The website keywords (for SEO) separated by commas
keywords: """
place, your, website, keywoards, here, keep, them, related, to, the, content, of, your, website
"""

# The website author's name
author: "Your Name"

# The website author's email
email: "your@email.com"

# Your company's name
copyright: "© Your Company 2012"


# Helper Functions
# ----------------

# Get the prepared site/document title
# Often we would like to specify particular formatting to our page's title
# we can apply that formatting here
getPreparedTitle: ->
# if we have a document title, then we should use that and suffix the site's title onto it
if @document.title
"#{@document.title} | #{@site.title}"
# if our document does not have it's own title, then we should just use the site's title
else
@site.title

# Get the prepared site/document description
getPreparedDescription: ->
# if we have a document description, then we should use that, otherwise use the site's description
@document.description or @site.description

getPreparedTitle: -> if @document.title then "#{@document.title} | #{@site.title}" else @site.title
# Get the prepared site/document keywords
getPreparedKeywords: ->
# Merge the document keywords with the site keywords
@site.keywords.concat(@document.keywords or []).join(', ')
}

# Export the DocPad Configuration
Expand Down

0 comments on commit 104b910

Please sign in to comment.