【问题标题】:GitHub deploying git-pages from other repository not working as intendedGitHub 从其他存储库部署 git-pages 未按预期工作
【发布时间】:2023-03-08 17:02:01
【问题描述】:

我关注this guide 了解如何在 GitHub 页面上部署 Vue 应用程序,但它没有按预期工作。

包含项目和分支的存储库是这样的:https://github.com/GeorgeFlorian/metrici_de/ 并在设置下显示Your site is published at https://georgeflorian.github.io/metrici_de/

该指南说 GitHub 将在 UserName.github.io/project_name 上发布我的 Vue 应用程序,但是当我转到该链接时,VueRouter 将其解释为空路由,因为它显然不存在并且 router-view 标记不显示任何内容。

如果我使用包含router-link 标记的导航栏浏览网站,我可以访问网站的其余部分。

但如果我直接访问 UserName.github.io,我会得到一个 404 - There isn't a GitHub Pages site here.

我哪里做错了?

【问题讨论】:

    标签: git vue.js


    【解决方案1】:

    仔细检查您的 GitHub Pages 存储库的 source publication 设置。

    确保它不是“main”,而您的主分支仍命名为master
    the guide 你关注,它应该是 gh-pages,因为该站点是在该分支中构建和存储的:请参阅“使用 Node.js 脚本部署到 GitHub Pages”部分。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-29
      • 1970-01-01
      • 2014-05-09
      • 1970-01-01
      相关资源
      最近更新 更多