Add more specific class to body of tracker and site pages. Closes #117

parent 278a231d
......@@ -281,6 +281,9 @@ class Blockdown
category = if categoryIndex then fileComponents[categoryIndex] else 'none'
pageDomain = if categoryIndex then fileComponents[categoryIndex+1] else 'none'
# Add more specific ‘site’ or ‘tracker’ to category class list if necessary
categoryForTemplate = if categoryIndex and categoryIndex == (fileComponents.length - 3) then "#{category} #{category.substr(0, category.length-1)}" else category
#
# Add the actions to the bottom of pages that have both a category and a domain
# (i.e., content pages)
......@@ -377,7 +380,7 @@ Better is a Safari content blocker for <a href='https://itunes.apple.com/us/app/
# Render the page.
headerPartialHTML = @partial(set.render(@theme.header, {navigationList: @navigationList selectedItem}))
pageHTML = set.render(@theme.page, {title: titleOfPage, header: headerPartialHTML, content: content, category: category})
pageHTML = set.render(@theme.page, {title: titleOfPage, header: headerPartialHTML, content: content, category: categoryForTemplate})
pageHTML = @wrapSections pageHTML
fs.outputFileAsync pagePath, pageHTML
.then =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment