无法在 gh-pages 上加载现有的 js 文件
Can't load existing js file on gh-pages
我的index.html(https://srgg6701.github.io/Music-Is-My-Life/) can't see 3 existing .js files, although I can load them directly in raw mode. They are here: https://github.com/srgg6701/Music-Is-My-Life/tree/gh-pages/js/_libs
这可能是什么原因造成的?
默认情况下,Jekyll(GitHub Pages 用来生成您的页面)会忽略任何以下划线开头的内容。
您可以通过修改您的设置来更改此设置,如讨论的那样 here:
If your GitHub Pages site isn't publishing certain files then you
might need to reformat their titles. If you are using Jekyll you can
create a .nojekyll file or edit the _config.yml file to publish
these files.
By default, Jekyll does not build any files or directories that
are hidden or used for backup (indicated by names that start with .
or #
, or that end with ~
);
contain site content (indicated by names that start with _
); or
are excluded in the site configuration.
To work around this behavior, you can
include a .nojekyll file in the root path to turn off Jekyll;
use [the include
directive][global-config] in your _config.yml to specify files that should not be ignored; or
do not use file or directory names that start with an underscore (_
), period (.
), or hash symbol (#
), or that end with a tilde
(~
).
我的index.html(https://srgg6701.github.io/Music-Is-My-Life/) can't see 3 existing .js files, although I can load them directly in raw mode. They are here: https://github.com/srgg6701/Music-Is-My-Life/tree/gh-pages/js/_libs
这可能是什么原因造成的?
默认情况下,Jekyll(GitHub Pages 用来生成您的页面)会忽略任何以下划线开头的内容。
您可以通过修改您的设置来更改此设置,如讨论的那样 here:
If your GitHub Pages site isn't publishing certain files then you might need to reformat their titles. If you are using Jekyll you can create a .nojekyll file or edit the _config.yml file to publish these files.
By default, Jekyll does not build any files or directories that
are hidden or used for backup (indicated by names that start with
.
or#
, or that end with~
);contain site content (indicated by names that start with
_
); orare excluded in the site configuration.
To work around this behavior, you can
include a .nojekyll file in the root path to turn off Jekyll;
use [the
include
directive][global-config] in your _config.yml to specify files that should not be ignored; ordo not use file or directory names that start with an underscore (
_
), period (.
), or hash symbol (#
), or that end with a tilde (~
).