From b68888dce352342c59bfff10a37613990c5249f1 Mon Sep 17 00:00:00 2001 From: zhaoxiaoqiang Date: Mon, 1 Feb 2016 11:38:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A8=A1=E6=9D=BF=E5=BC=95?= =?UTF-8?q?=E6=93=8E=E7=9A=84=E9=85=8D=E7=BD=AE=EF=BC=8C=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E8=A1=A8=E7=8E=B0=E4=B8=BA=20init-site=20=E6=97=B6=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E4=B8=8D=E8=83=BD=E7=94=9F=E6=88=90=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/publish/lib/init-index-page.js | 3 +++ tool/publish/lib/init-src.js | 17 ----------------- tool/publish/lib/main.js | 4 ---- web/index-owner.html | 20 ++++++++++---------- web/index.html | 20 ++++++++++---------- 5 files changed, 23 insertions(+), 41 deletions(-) delete mode 100644 tool/publish/lib/init-src.js diff --git a/tool/publish/lib/init-index-page.js b/tool/publish/lib/init-index-page.js index 0b35fb9d..f0bbc04d 100644 --- a/tool/publish/lib/init-index-page.js +++ b/tool/publish/lib/init-index-page.js @@ -7,6 +7,9 @@ var fs = require('fs'); var config = require('./config.js'); var ejs = require('ejs'); +// 当和 init-site 集成使用时需要重置配置 +ejs.open = '<%'; +ejs.close = '%>'; function initPage(articleArr) { // 主人首页 diff --git a/tool/publish/lib/init-src.js b/tool/publish/lib/init-src.js deleted file mode 100644 index 54f12729..00000000 --- a/tool/publish/lib/init-src.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * 有一些资源文件需要初始化 - * - * Created by zhaoxiaoqiang on 16/01/01. - */ -var config = require('./config.js'); - -/** - * 初始化 header,通过 webpack 压缩资源 - */ -function initSrc () { - // TODO 初始化 header.tpl 移动 header.tpl - - // TODO 调用 webpack 打包 -} - -module.exports = initSrc; \ No newline at end of file diff --git a/tool/publish/lib/main.js b/tool/publish/lib/main.js index e5a5e45d..8e3c32c4 100644 --- a/tool/publish/lib/main.js +++ b/tool/publish/lib/main.js @@ -20,10 +20,6 @@ var articleArr = getArticleArr(config); var initDataJson = require('./init-json-data.js'); initDataJson(articleArr); -// 初始化资源文件 -var initSrc = require('./init-src.js'); -initSrc(); - // 生成首页 var initIndexPage = require('./init-index-page.js'); initIndexPage(articleArr); diff --git a/web/index-owner.html b/web/index-owner.html index ffc87af6..a235501c 100644 --- a/web/index-owner.html +++ b/web/index-owner.html @@ -15,26 +15,26 @@

- <% articleArr.forEach(function(article){ %> + - <% }) %> +
\ No newline at end of file diff --git a/web/index.html b/web/index.html index 2ae58a18..9fa1e67f 100644 --- a/web/index.html +++ b/web/index.html @@ -18,26 +18,26 @@

- <% articleArr.forEach(function(article){ if(article.jsonData.isPublished){%> + - <%}})%> +