Skip to content

Instantly share code, notes, and snippets.

@fnobi
Created July 25, 2013 13:32
Show Gist options
  • Save fnobi/6079666 to your computer and use it in GitHub Desktop.
Save fnobi/6079666 to your computer and use it in GitHub Desktop.
grunt-simple-ejs作ったので使ってほしい ref: http://qiita.com/fnobi/items/b395b9e5a5358ffd9ad8
npm install grunt-simple-ejs --save-dev
grunt ejs:dev
options: [
"options.default.json",
"options.dev.json"
]
<header id="gheader">
<h1>うぇぶさいと</h1>
<nav id="gnav">
<ul>
<li><a href="/top">top</a></li>
<li><a href="/about">about</a></li>
<li><a href="/news">news</a></li>
</ul>
</nav>
<!-- /#gheader --></header>
<html>
<head>
<title><%= title %></title>
<meta name="description" content="<%= description %>" />
</head>
<body>
<% include header %>
<main>
<h1><%= title %></h1>
<p><%= description %></p>
</main>
</body>
</html>
var url_root = "http://example.com/",
title = "サンプルWebサイト!!!!",
description = "このWebサイトの説明";
module.exports = {
title: title,
description: description,
favicon_url: url + "favicon.ico",
ogp_title: title,
ogp_description: description,
ogp_image_url: url + "img/ogp.png"
};
{ "hoge": "ほげ", "moge": "もげ" }
hoge:
ほげ
moge:
もげ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment