際際滷

際際滷Share a Scribd company logo
まだタスクランナ`聞っていないって云輝┘泪牽
碧並にする紳併吭R鯢呂里燭瓩gulpハンズオン
HAM WORKS
L紅寒 レ冷
photo by spykster https://www.?ickr.com/photos/spykster/6743567521
徭失府初
L紅寒 レ冷
はせがわ ひろむ
徭 失 B 初
(? ?ム? `)
ハム
フロントエンドエンジニア
惹 テクニカル?ディレクタ`
フリ`ランス 崙恬ユニット
HAM WORKS / CodeDesign
徭失府初
photo by PRONana B Agyei https://www.?ickr.com/photos/nanagyei/5641647904
!</>
!{css}
!{JS}
"
System
Templates
恬匍のプロジェクト更撹
恬匍喘と慕き竃し喘を蛍ける
フォルダを蛍ける
# 音勣ファイルを詞ぜないために
$ .scssやRs念のファイルなど
$ アップロ`ド扮の逗困鮗らせる
稼看糸艶のバ`ジョンマネ`ジャを聞う
photo by myri_bonnie https://www.?ickr.com/photos/myri_bonnie/13218292843
photo by myri_bonnie https://www.?ickr.com/photos/myri_bonnie/13218292843
photo by myri_bonnie https://www.?ickr.com/photos/myri_bonnie/13218292843
CMS テンプレ`ト念の
HTMLテンプレ`ト
!</>
!{css}
!{JS}
"
WordPress
Theme
%
だから´
中宜だって´
photo by myri_bonnie https://www.?ickr.com/photos/myri_bonnie/13218292843
床議サイトジェネレ`タ`擬秘
http://www.metalsmith.io/
http://handlebarsjs.com/
http://paularmstrong.github.io/swig/
package.json
{
"private": true,
"devDependencies": {
"browser-sync": "^2.9.10",
"gulp": "^3.9.0",
"gulp-sass": "^2.0.4",
"metalsmith": "^2.1.0",
"metalsmith-ignore": "^0.1.2",
"metalsmith-templates": "^0.7.0",
"swig": "^1.4.2"
},
"scripts": {
"metalsmith": "metalsmith"
}
}
metalsmith.json
{
"source": "_source",
"destination": "./.tmphtml",
"plugins": {
"metalsmith-ignore": [
"_layouts/**/*",
"**/*.scss"
],
"metalsmith-templates": {
"engine": "swig",
"directory": "_source/_layouts"
}
}
}
gulp?le.js
゛福待゛
gulp.task('serve', [`xxx¨, `html'], function() {
゛福待゛
});
gulp.task('metalsmith-build', function (done) {
return require(`child_process')
.spawn('npm', ['run', 'metalsmith'], {stdio: 'inherit'})
.on('close', done);
});
gulp.task('html', ['metalsmith-build'], function () {
return gulp.src(['.tmphtml/**/*.html'])
.pipe(gulp.dest('html'))
.pipe(browserSync.stream());
});
gulp.task('default', ['serve']);
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>タイトル</title>
</head>
<body>
<header> ~ </header>
<div>コンテンツ</div>
<footer> ~ </footer>
</body>
</html>
HTML
header
光ペ`ジ
footer
!
WordPress
Theme
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>
<?php title(); ?>
</title>
<?php wp_head(); ?>
</head>
<body>
<header> ~ </header>
WordPress : header.php
<footer> ~ </footer>
<?php wp_footer(); ?>
</body>
</html>
WordPress: footer.php
<?php get_header();?>
<?php if ( have_posts() ) : while
( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endif; ?>
<?php get_footer(); ?>
WordPress : index.php
"</>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>{{ title }}</title>
</head>
<body>
<header> ~ </header>
swig : header.html
<footer> ~ </footer>
</body>
</html>
swig : footer.html
{% include 'header.html' %}
{{ contents | safe }}
{% include 'footer.html' %}
swig : layout.html
---
template: default.html
title: "タイトル"
---
<div>コンテンツ</div>
swig : index.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>タイトル</title>
</head>
<body>
<header> ~ </header>
<div>コンテンツ</div>
<footer> ~ </footer>
</body>
</html>
き竃し瘁
"</>
"{css}
"{JS}
!
光N テ`マやテンプレ`ト
ご賠ありがとうございました
- https://www.?ickr.com/photos/spykster/6743567521
- https://www.?ickr.com/photos/nanagyei/5641647904
- https://www.?ickr.com/photos/myri_bonnie/13218292843
Photo credit

More Related Content

まだタスクランナ`聞っていないって云輝┘泪牽拭(吠造する紳併吭R鯢呂里燭瓩 gulp ハンズオン : Wordcamp tokyo 2015