Skip to content

Commit

Permalink
Theme: Move handlebars pages out of site folder
Browse files Browse the repository at this point in the history
- Moves the theme content pages out of the site directory so they aren't
rebuild by the themes during the bower install.
- Slug-ify the content page names to differentiate word endings
- Don't i18n transform files with a lang specific file ending
  • Loading branch information
nschonni committed May 2, 2014
1 parent 227c68d commit 1d1fc58
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 51 deletions.
50 changes: 31 additions & 19 deletions Gruntfile.coffee
Expand Up @@ -354,17 +354,22 @@ module.exports = (grunt) ->
jqueryVersion: "<%= jqueryVersion.version %>"
jqueryOldIEVersion: "<%= jqueryOldIEVersion.version %>"
assets: "dist/unmin"
flatten: true,
plugins: ["assemble-contrib-i18n"]
plugins: [
"assemble-contrib-i18n"
]
i18n:
languages: "<%= i18n_csv.assemble.locales %>"
templates: [

"site/pages/theme/*.hbs"
"!site/pages/theme/splashpage*.hbs"
"theme/**/*.hbs"
# Don't run i18n transforms on language specific templates
"!theme/**/*-en.hbs"
"!theme/**/*-fr.hbs"
]
dest: "dist/unmin/theme/"
src: "!*.*"
dest: "dist/unmin/"
src: [
"theme/**/*-en.hbs"
"theme/**/*-fr.hbs"
]

ajax:
options:
Expand All @@ -374,11 +379,12 @@ module.exports = (grunt) ->
jqueryOldIEVersion: "<%= jqueryOldIEVersion.version %>"
assets: "dist/unmin"
flatten: true,
plugins: ["assemble-contrib-i18n"]
plugins: [
"assemble-contrib-i18n"
]
i18n:
languages: "<%= i18n_csv.assemble.locales %>"
templates: [

"site/pages/ajax/*.hbs"
]
dest: "dist/unmin/ajax/"
Expand Down Expand Up @@ -412,7 +418,6 @@ module.exports = (grunt) ->
"**/*.hbs",
"!ajax/**/*.hbs"
"!theme/**/*.hbs"
"theme/splashpage*.hbs"
]
dest: "dist/unmin"
expand: true
Expand Down Expand Up @@ -460,16 +465,23 @@ module.exports = (grunt) ->
jqueryVersion: "<%= jqueryVersion.version %>"
jqueryOldIEVersion: "<%= jqueryOldIEVersion.version %>"
assets: "dist"
flatten: true,
plugins: ['assemble-contrib-i18n']
plugins: [
"assemble-contrib-i18n"
]
i18n:
languages: "<%= i18n_csv.assemble.locales %>"
templates: [
'site/pages/theme/*.hbs',
"!site/pages/theme/splashpage*.hbs"
"theme/**/*.hbs"
# Don't run i18n transforms on language specific templates
"!theme/**/*-en.hbs"
"!theme/**/*-fr.hbs"
]
dest: "dist/theme/"
src: "!*.*"
dest: "dist/"
src: [
"theme/**/*-en.hbs"
"theme/**/*-fr.hbs"
]


ajax_min:
options:
Expand All @@ -480,11 +492,12 @@ module.exports = (grunt) ->
jqueryOldIEVersion: "<%= jqueryOldIEVersion.version %>"
assets: "dist/unmin"
flatten: true,
plugins: ["assemble-contrib-i18n"]
plugins: [
"assemble-contrib-i18n"
]
i18n:
languages: "<%= i18n_csv.assemble.locales %>"
templates: [

"site/pages/ajax/*.hbs"
]
dest: "dist/ajax/"
Expand Down Expand Up @@ -519,7 +532,6 @@ module.exports = (grunt) ->
"**/*.hbs",
"!ajax/**/*.hbs"
"!theme/**/*.hbs"
"theme/splashpage*.hbs"
]
dest: "dist"
expand: true
Expand Down
32 changes: 0 additions & 32 deletions site/pages/theme/index.hbs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions theme/index.hbs
@@ -0,0 +1,32 @@
---
{
"title": "WET theme",
"tag": "theme-wet-boew",
"parentdir": "theme-wet-boew",
"altLangPrefix": "index",
"dateModified": "2014-02-19"
}
---
<section>
<h2>English</h2>
<ul>
<li><a href="content/index-en.html">Content page</a></li>
<li><a href="content/secmenu-en.html">Content page - Secondary menu</a></li>
<li><a href="content/nosearchlang-en.html">Content page - No search or language selection link</a></li>
<li><a href="content/nositemenubc-en.html">Content page - No site menu or breadcrumb trail</a></li>
<li><a href="content/nosearchlangsitemenubc-en.html">Content page - No search, language selection link, site menu or breadcrumb trail</a></li>
<li><a href="splash-page/index-en.html">Splash page</a></li>
</ul>
</section>

<section>
<h2>French</h2>
<ul>
<li><a href="content/index-fr.html">Content page</a></li>
<li><a href="content/sec-menu-fr.html">Content page - Secondary menu</a></li>
<li><a href="content/no-search-lang-fr.html">Content page - No search or language selection link</a></li>
<li><a href="content/no-site-menu-bc-fr.html">Content page - No site menu or breadcrumb trail</a></li>
<li><a href="content/no-search-lang-site-menu-bc-fr.html">Content page - No search, language selection link, site menu or breadcrumb trail</a></li>
<li><a href="splash-page/index-fr.html">Splash page</a></li>
</ul>
</section>
File renamed without changes.
File renamed without changes.

0 comments on commit 1d1fc58

Please sign in to comment.