美文网首页
使用github pages部署静态页面

使用github pages部署静态页面

作者: smaVivian | 来源:发表于2020-06-11 19:33 被阅读0次
    1. vue配置修改
    build: {
        // Template for index.html
        index: path.resolve(__dirname, '../docs/index.html'),  // 之前是../dist/index.html
    
        // Paths
        assetsRoot: path.resolve(__dirname, '../docs'),  // 之前是../dist
        assetsSubDirectory: 'static',
        assetsPublicPath: './',  // 之前是 '/'
      }
    
    1. github settings修改,会生成一个部署后的链接


      image.png
      image.png
    2. 将打包后的docs下文件push到github,然后访问生成的链接

    github示例:https://github.com/SmaVivian/vue-web-common

    相关文章

      网友评论

          本文标题:使用github pages部署静态页面

          本文链接:https://www.haomeiwen.com/subject/pohitktx.html