pages.github.com是否支持带有前缀的目录名. (点)? [英] Does pages.github.com support directory names with a preceeding . (dot)?

查看:70
本文介绍了pages.github.com是否支持带有前缀的目录名. (点)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个Maven插件(jacoco-maven-plugin),该插件会生成一个站点报告,其图像和css文件位于前面的文件夹中. (点)的名称.例如:/site/jacoco/.resources/report.css

I am using a Maven plugin (jacoco-maven-plugin) which generates a site report whose images and css files are in a folder with a preceeding . (dot) in the name. For example: /site/jacoco/.resources/report.css

当我将其发布到我的pages.github.com网站(使用site-maven-plugin)时,一切都在我的特殊Github分支(gh-pages)中.

When I publish this to my pages.github.com site (using site-maven-plugin), everything is there in my special Github branch (gh-pages).

但是,当尝试访问带有前一个的文件夹中的资源时,出现了404错误.文件夹名称中的(点).

However, I'm getting 404's when trying to access resources that are in folders with a preceding . (dot) in the folder name.

一个简化的示例:
https://github.com/justinhrobbins/FlashCards_App/blob/gh-pages/test/.resources/index.html

A simplified example:
https://github.com/justinhrobbins/FlashCards_App/blob/gh-pages/test/.resources/index.html

当我尝试在浏览器中访问它时,我得到404:
http://justinhrobbins.github.io/FlashCards_App/test/.resources/index .html

When I try to access this in my browser i get a 404:
http://justinhrobbins.github.io/FlashCards_App/test/.resources/index.html

但是,如果我删除.文件夹名称中的(点)可以正常工作:
https://github.com/justinhrobbins/FlashCards_App/blob /gh-pages/test/resources/index.html
http://justinhrobbins.github.io/FlashCards_App/test/resources/index.html

However, if I remove the . (dot) from the folder name it works fine:
https://github.com/justinhrobbins/FlashCards_App/blob/gh-pages/test/resources/index.html
http://justinhrobbins.github.io/FlashCards_App/test/resources/index.html

因此,我假设pages.github.com不支持文件夹名称中的前导点(无论如何,建议不要使用前导点进行谷歌搜索显示),但希望您确认一下.

So I'm assuming pages.github.com doesn't support preceeding dot in the folder name (and Googling shows using a preceeding dot may not be a recommended practice anyway) but would appreciate confirmation.

仅供参考-当我发布类似于Tomcat的内容时,即使在名称中带有前导点的文件夹中也可以使用

FYI - when i publish similar to Tomcat it works even with folders with preceeding dot in name

推荐答案

我认为这与pages.github.com对Jekyll的支持有关.

I think this is related to pages.github.com's support for Jekyll.

我现在可以使我的page.github.com与包含前一个点(.)的目录名称一起使用

I am now able to get my page.github.com to work with directory names that include a preceding dot (.)

解决方案是在gh-pages分支的根目录中添加一个.nojekyll文件.

The solution was to add a .nojekyll file in the root of my gh-pages branch.

以下资源帮助我解决了这个问题:

The following resources helped me solve the issue:

  • Publishing a Maven site having jacoco reports at Github's gh-pages
  • Bypassing Jekyll on GitHub Pages

这篇关于pages.github.com是否支持带有前缀的目录名. (点)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆