Grunt connect和livereload - 配置基本URL

时间:2014-07-03 13:02:04

标签: javascript gruntjs connect watch livereload

我正在尝试使用grunt connect和livereload来配置基本网址。 一切都正常,但我的网址是这样的: http://0.0.0.0:8000/index.html

我希望他们喜欢这样: http://0.0.0.0:8000/**newbase**/index.html

我的咕噜声连接:

module.exports = {
    server: {
        options: {
            hostname: '*',
            port: 8000,
            base: './_site'
        }
    }
}

我的咕噜声表:

module.exports = {
  options: {
    livereload: true,
  },
  build: {
    files : [ '*.md', '_layouts/*.html', '_posts/*.markdown', 'css/*.css', 'css/libs/*.css', '_config.yml', 'index.html', '404.html' ],
    tasks: ['shell:jekyllBuild'],
    options: {
      spawn: false,
    }
  }
}

你可以看到我正在使用Jekyll。再次,connect,livereload和Jekyll构建都运行良好。只想使用不同的baseurl(比如Jekyll配置允许,用例是在Github中构建项目站点)。

谢谢!

0 个答案:

没有答案