Hammer
A tool for CleanSlate theme development
Install / Use
/learn @wvuweb/HammerREADME
Hammer
Hammer is a theme development tool for the CleanSlate CMS template rendering engine. Hammer was created to help you iterate quickly on themes and template markup.
Hammer is NOT for content creation.
Install & Usage
Please install via Hammer-VM
Interested? Need Help? Read more..
Visit the wiki for more information:
Development Dependencies
These dependencies are only needed if you are developing against Hammer directly
- Ruby 2.4
- Bundler Gem
gem install bundler
Mock Data File
Hammer uses a YAML file to 'mock' content data structures needed for cleanslate templates.
Mock Data Documentation
hammer_nav: # hammer navigation controls
disabled: Boolean # disabled -- accepts true | false, default: false
# hides the navigation bar to allow testing for accessibility
edit_mode: Boolean # edit mode -- accepts true | false
# edit mode allows you to hide and show content based on context
# <r:edit_mode_only>
# <p>This only shows in the editor mode of CleanSlate</p>
# </r:edit_mode_only>
shared_themes: # shared_themes are defined by
# <r:partial name="file/path" theme="theme-name"/>
"theme-name": # theme-name -- accepts quote theme name string
"file/path": theme # file/path -- accepts quoted file path string
"theme-name-2": # theme -- accepts string
"file/path": theme
editable_region: # editable_region are defined by
region: String # <r:editable_region name="region" />
region2: String # region -- accepts a string or | pipe character followed by HTML
# example:
# editable_region:
# region: |
# <p>Hello World!</p>
site: # site is defined by any attributes your site would hold in CleanSlate
id: 26 # id <r:site:id /> -- accepts an integer
name: String # name <r:site:name /> -- accepts a string
domain: example.wvu.edu # domain <r:site:domain /> -- accepts a string
data: # data is defined by any custom data your page would hold in CleanSlate
data_key: data_value # <r:site:data name="data_key" />
data_key_2: data_value_2 # data_key is the name of the custom data in page properties which is defined
# in your templates front matter configuration
# data_value is any value you wish to expose
root: true # root tag is used to set the context for loops
# <r:root /> -- accepts true | false
page: # page is defined by any attribute a page would hold in CleanSlate
id: 1 # <r:page:id /> -- accepts an integer
name: String # <r:page:name /> -- accepts a string
slug: string-dashed-notation # <r:page:slug /> -- accepts a string in dash notation
meta_description: String # <r:page:meta_description /> -- accepts a string
title: String # <r:page:title /> -- accepts a string
alternate_name: String # <r:page:alternate_name /> -- accpets a string
depth: 1 # <r:page:depth /> -- accepts an integer
updated_at: Jan 1st 2015 2:30PM # <r:page:updated_at /> -- accepts a date string
created_at: two weeks ago # <r:page:created_at /> -- accepts a date string
published_at: now # <r:page:published_at /> -- accepts a date string
tags: # <r:page:children:each tags="tag1,tag2" tag_op="=" />
- String # Tags accepts an Array of Strings
- String
data: # data is defined by any custom data your page would hold in CleanSlate
data_key: data_value # <r:data name="data_key" />
data_key_2: data_value_2 # data_key is the name of the custom data in page properties which is defined
# in your templates front matter configuration
# data_value is any value you wish to expose
content: # content attribute is for supporting loops in which a page
region_name: String # may be dynamically building content from child pages or <r:get_page />
# <r:page:if_has_content_for name="region_name" />
# <r:page:unless_has_content_for name="region_name" />
pages: # pages allow you to mock addtional pages to be used in page loops
- id: 2 # such as <r:children /> <r:ancestors /> <r:decendants /> <r:siblings />
name: String # each page set is seperated by a dash to create an Array of pages
... # pages can contain all the data that the "page" key above can
- id: 3
...
- id: 4
...
if_page_depth_eq: 1 # <r:if_page_depth_eq page_depth="1"/> test for page depth equal to value
if_page_depth_gt: 1 # <r:if_page_depth_gt page_depth="1"/> test for page depth greater than value
site_menu: String # site menu allows you to override the html generated if you have a pages block
# <r:site_menu /> -- accepts a string or | pipe character followed by HTML
# example:
# site_menu: |
# <ul>
# <li class="active"><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# </ul>
sub_menu: String # sub_menu allows you to override the auto generated html created from the pages block
# or the generic menu that gets output if you do not have a pages block.
# <r:sub_menu /> -- accepts a string or | pipe character followed by HTML
# example:
# sub_menu: |
# <ul>
# <li class="active"><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# </ul>
ancestor_menu: String # ancestor_menu allows you to override the auto generated html created from the pages block
# or the generic menu that gets output if you do not have a pages block.
# <r:ancestor_menu/> -- accepts a string or | pipe character followed by HTML
# example:
# sub_menu: |
# <ul>
# <li class="active"><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
# <li><a href="#">Page</a></li>
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
