NakedCompass is a bare-bones WordPress theme created to act as a starting point for the theme designer.
NakedCompass is free of all presentational elements and non-semantic markup.
NakedCompass is a modification of the Starkers Theme. The main difference is that it is built to be compatible with the HTML5 Boilerplate build script and the Compass CSS Framework.
I have stripped out nearly all references to the twentyten theme, as well as functions that I felt were unnecessary.
NakedCompass is free and fully GPL-licensed, so you can use it for whatever you like — even your commercial projects.
- Install the Compass CSS Framework. You must have Ruby and Ruby Gems installed to do this.
Once you do... just run
$ gem install compass
in the terminal. For more information on Compass and Compass installation see http://compass-style.org/install/ - Copy the contents of the .htaccess file that comes with this theme to the wp root directory to take full advantage of HTML5 Boilerplate optimization
- Create the wordpress style.css file. This needs to be put at the top level of the theme directory (theme/style.css) No styles will go into this file, but this file is needed by wordpress so that it knows about your theme. You can use the example.style.css file as a starter. See http://codex.wordpress.org/Theme_Development for more information.
The HTML5 Boilerplate build.xml file was modified to work correctly with this wordpress theme.
If you update HTML5 Boilerplate, you will need to make the following changes to the build.xml file, as well as add the patterns.txt file:
Used by the build file so that it does not strip out comments. For some reason if you change the build file so that you no longer tellit is compressing html files, it will strip out these comments, so we have to explicitly tell it to leave these comments.
<replaceregexp match="<!-- scripts concatenated [\d\w\s\W]*?!-- end ((scripts)|(concatenated and minified scripts))-->" replace="<script src='${dir.js}/scripts-${build.number}.min.js\'></script>" flags="m">
<fileset dir="./${dir.publish}" includes="${page-files}"/>
</replaceregexp>
<replaceregexp match="<!-- scripts concatenated [\d\w\s\W]*?!-- end scripts-->" replace="<?php Utilities::add_js('/${dir.js}/scripts-${build.number}.min.js', 'jquery', true) ?>" flags="m">
<fileset dir="./${dir.publish}" includes="${page-files}"/>
</replaceregexp>
<echo message="Update the reference to our concatenated script file in when calling wp_enqueue_script from functions.php" />
<replaceregexp match="\/\/\[\[---replace scripts---\]\][\d\w\s\W]*?\/\/\[\[---end replace scripts---\]\]" replace="wp_enqueue_script( 'scripts' );" flags="m">
<fileset dir="./${dir.publish}" includes="${page-files}"/>
</replaceregexp>
Changed so that HTML comments are stripped out of *.php files rather than just *.html files. Modified solution based on: https://github.com/paulirish/html5-boilerplate/issues/392. Modified by removing the --remove-quotes lines because it was stripping out the quotes for element id and class names
<target name="-htmlclean">
<echo message="Run htmlcompressor on the HTML"/>
<echo message=" - maintaining whitespace"/>
<echo message=" - removing html comments"/>
<echo message=" - compressing inline style/script tag contents"/>
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
<arg value="-jar"/>
<arg path="./${dir.build}/tools/${tool.htmlcompressor}"/>
<arg line="--type html"/>
<arg line="--preserve-multi-spaces"/>
<arg line="--remove-quotes"/>
<arg line="--compress-js"/>
<arg line="--compress-css"/>
<srcfile/>
<arg value="-o"/>
<mapper type="glob" from="*.html" to="../${dir.publish}/*.html"/>
<targetfile/>
</apply>
</target>
<target name="-htmlbuildkit">
<echo message="Run htmlcompressor on the HTML"/>
<echo message=" - maintaining whitespace"/>
<echo message=" - retain html comments"/>
<echo message=" - compressing inline style/script tag contents"/>
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
<arg value="-jar"/>
<arg path="./${dir.build}/tools/${tool.htmlcompressor}"/>
<arg value="--preserve-comments"/>
<arg line="--preserve-multi-spaces"/>
<arg line="--type html"/>
<arg line="--compress-js"/>
<arg line="--compress-css"/>
<srcfile/>
<arg value="-o"/>
<mapper type="glob" from="*.html" to="../${dir.publish}/*.html"/>
<targetfile/>
</apply>
</target>
<target name="-htmlcompress">
<echo message="Run htmlcompressor on the HTML"/>
<echo message=" - removing unnecessary whitespace"/>
<echo message=" - removing html comments"/>
<echo message=" - compressing inline style/script tag contents"/>
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
<arg value="-jar"/>
<arg path="./${dir.build}/tools/${tool.htmlcompressor}"/>
<arg line="--type html"/>
<arg line="--remove-quotes"/>
<arg line="--compress-js"/>
<arg line="--compress-css"/>
<srcfile/>
<arg value="-o"/>
<mapper type="glob" from="*.html" to="../${dir.publish}/*.html"/>
<targetfile/>
</apply>
</target>
<target name="-htmlclean">
<echo message="Run htmlcompressor on the HTML"/>
<echo message=" - maintaining whitespace"/>
<echo message=" - removing html comments"/>
<echo message=" - compressing inline style/script tag contents"/>
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
<arg value="-jar"/>
<arg path="./${dir.build}/tools/${tool.htmlcompressor}"/>
<arg line="--preserve-multi-spaces"/>
<arg line="--remove-quotes"/>
<arg line="--compress-js"/>
<arg line="--compress-css"/>
<arg line="--preserve-php"/>
<arg line="-p 'build/patterns.txt'"/>
<srcfile/>
<arg value="-o"/>
<mapper type="glob" from="*" to="../${dir.publish}/*"/>
<targetfile/>
</apply>
</target>
<target name="-htmlbuildkit">
<echo message="Run htmlcompressor on the HTML"/>
<echo message=" - maintaining whitespace"/>
<echo message=" - retain html comments"/>
<echo message=" - compressing inline style/script tag contents"/>
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
<arg value="-jar"/>
<arg path="./${dir.build}/tools/${tool.htmlcompressor}"/>
<arg value="--preserve-comments"/>
<arg line="--preserve-multi-spaces"/>
<arg line="--compress-js"/>
<arg line="--compress-css"/>
<arg line="--preserve-php"/>
<arg line="-p 'build/patterns.txt'"/>
<srcfile/>
<arg value="-o"/>
<mapper type="glob" from="*" to="../${dir.publish}/*"/>
<targetfile/>
</apply>
</target>
<target name="-htmlcompress">
<echo message="Run htmlcompressor on the HTML"/>
<echo message=" - removing unnecessary whitespace"/>
<echo message=" - removing html comments"/>
<echo message=" - compressing inline style/script tag contents"/>
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
<arg value="-jar"/>
<arg path="./${dir.build}/tools/${tool.htmlcompressor}"/>
<arg line="--compress-js"/>
<arg line="--remove-quotes"/>
<arg line="--compress-css"/>
<arg line="--preserve-php"/>
<arg line="-p 'build/patterns.txt'"/>
<srcfile/>
<arg value="-o"/>
<mapper type="glob" from="*" to="../${dir.publish}/*"/>
<targetfile/>
</apply>
</target>
Version 1.0
- Starkers : http://starkerstheme.com/
- HTML5 Boilerplate : http://http://html5boilerplate.com/
- Compass CSS Framework : http://compass-style.org/