有人可以克隆我的 GitHub Pages 存储库吗?

Can someone clone my GitHub Pages repo?

我是 GitHub Pages 的新手,仍在努力思考这个概念。

如果我使用 GutHub Pages 发布博客(使用 Jekyll),其他人是否可以进入并克隆我的整个存储库,从而获取我的所有内容、我的主题(我购买的)和我的所有图像等.?

或者,如果我的博客发布时有 GitHub 页,默认情况下 GitHub 会阻止人们执行基本的 GitHib 功能(即克隆存储库)。

感谢您的帮助。

在 GitHub 页面上托管网站而不向用户提供访问您的 "raw content" 和模板的一种解决方案是将 "the generated site" 上传到 GitHub:

  • 在终端中通过 运行 以下任一方式 在本地构建站点。:

    JEKYLL_ENV=production bundle exec jekyll build
    JEKYLL_ENV=production jekyll build
    
  • 设置目标目录,_site 作为您的 git 存储库:

    cd _site
    git init
    git remote add origin https://github.com/YOUR-USERNAME/YOUR-USERNAME.github.io.git
    
  • 提交生成的站点并推送到您的 GitHub 存储库

    git add .
    git commit -m "Generated my site!"
    git push origin master
    

    如果您的存储库不为空,上述 git push 将失败。使用 --force 标志将 覆盖 您的远程分支。

    git push origin master --force