Issues viewing CSS and JS in GitHub Pages, but works fine in VS Code
P粉864594965
P粉864594965 2024-03-30 22:12:20
0
1
283

I'm working on a page for a project and I'm using a template that contains CSS and JS files. I wrote the code in Visual Studio Code and it runs fine locally on my computer. I'm using GitHub Pages to share it, but some elements are missing, such as buttons to show/hide the menu, background, and arrows.

This is my repository https://github.com/azu-any/reafo.git

It should look like this: Using VS Code

What is the effect of using GitHub: GitHub Page

Thanks in advance!

PS. I've checked the urls and they are working fine otherwise the other styles won't work.

P粉864594965
P粉864594965

reply all (1)
P粉611456309

Files with names starting with an underscore, such as_styles_js.jsare blocked in GitHub Pages.

You have two options:

  1. Create an empty.nojekyllfile
  2. in the root directory of the repository
  3. Remove the_prefix in the file name
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!