I want to upload some webpage to test GitHub pages but I have a problem because it just shows the index.html and not the style.css and script.js that are inside the style and scripts folders.
I already have my link.
Well, the solution was... I have just to put "./" before every root I have taken.
This is probably the side-effect of a recent GitHub incident
GitHub Pages is now experiencing degraded performance. We are continuing to investigate.
While the incident has been resolved, GitHub pages are not processed immediately.
Hopefully, performance will improve.
Related
I created a static website using Hugo and I don't know how to host it on github. The documentation on their website didn't help me.
After finishing my website, I created the public folder which contains in theory all the files needed for the website (whith this command : hudo -t hyde-hyde). When I open index.html with chrome I only see the content of my website without the theme. Is it normal ?
Then I moved all the files within the public folder into my gihub repo username.github.io/ , but I can't see any result (I can only see my previous commit which is a simple Hello World).
How should I porceed to generate correctly my website and host it on github ? Thanks.
How to create with HUGO
If you have a problem while creating your site, check this tutorial.
How to Host HUGO website on GitHub (Pages)
Check this LINK where it shows you step by step all the procedures to host HUGO on GitHub, on both User/Organization Pages and on Project Pages.
Check list:
When I open index.html with chrome I only see the content of my website without the theme. Is it normal ?
I know it might seem a little too obvious, but check the spelling. Sometimes you spend hours trying to find the error and it's just a typo, this case in the theme you wanted to.
Have you tried another browser? It might not be the case, but checking it will get you out of doubt, also remember to delete the cache just in case.
Then I moved all the files within the public folder into my gihub repo username.github.io/ , but I can't see any result (I can only see my previous commit which is a simple Hello World).
Do you have a User/Organization Page (syntax: username.github.io) or a Project Page (syntax: username.github.io/project)?
UPDATE 1: Follow the instructions on this video for hosting on GitHub if unclear.
Could you add a link to your repo? Thanks.
I have a gh-pages branch in my repository. My gh-pages branch and master branch are in an identical state. Both have index.html included in them. The settings page for my repository says Your site is published at https://[me].github.io/[appName]/. When I visit that URL, I receive a 404 error. When I visit https://[me].github.io/[appName]/index.html (with the specific asset index.html specified explicity) then it works, meaning the expected assets are located where expected, and function correctly. How can I get GH Pages to pick up my index.html file?
The problem resolved with a subsequent code change and push to origin. I don't know why, but after performing a bug fix and pushing the code via git push origin gh-pages everything showed up on all machines in all regions in all browsers that were previously not working.
Make sure you have declared a proper !DOCTYPE in your index file.
If you had just added the file, then give it some time and let github detect the file. https://[me].github.io/[appName]/ should work after a while.
I have created a repository level github page in the root directory of my project. This works fine, and after a small build interval, the index.html page is served as expected at https://erikor.github.io/myrepo/
Now I am trying to use the dyutibarma/monochrome theme.
Per this post, I, somewhat naively, thought that all I needed to do was to put this in my _config.yml:
remote_theme: dyutibarma/monochrome
But the resulting page clearly expects some theme related resources to be in my repo, not the remote theme repo. For example:
<link rel="stylesheet" href="/myrepo/css/main.css">
And thus, my page is not styled properly.
Is there a way to point github pages to the remote theme resources, or is the only way to accomplish this to fork the theme, build it, and then add my content? I was hoping to avoid that every time I want to switch themes if possible, particularly after reading the above referenced post about remote themes.
Thanks in advance,
Eric
The dyutibarma/monochrome theme is not jekyll-remote-theme compatible. For example: it has the "css", "img", "js" folder in it's root directory. Those folders will not be deployed when used via remote_theme. They must be moved within an assets folder in order to be deployed. I just created a PR for an other theme to be jekyll-remote-theme compatible and published a working demo on github.
Never fork a theme! A GitHub fork can not be changed later. So when you want to change the theme later on the fork will always point on your first theme. When the theme is not jekyll-remote-theme compatible just clone it and push it as a self-standing repository. Add the theme base repository as upstream to fetch bugfixes and new features. I have written a blog post about this.
BR
I have a Github pages website for our team at http://olinaeromarketing.github.io/. I've tried opening index.html locally and it works perfectly in chrome on my pc. Everything loads perfect. However, when I push everything to Github and try to open it with http://olinaeromarketing.github.io/, everything except index.html gives a 404 error and can't load. I'm pretty stumped as to why this is happening. I also haven't been able to find anything on the web regarding this issue.
The repository is located at https://github.com/OlinAeroMarketing/OlinAeroMarketing.github.io. BTW, the website is currently a WIP and not yet finished.
By default, Jekyll is used to process GitHub Pages. Files/directories that begin with an underscore have special meaning for Jekyll and are, therefore, treated differently.
Since you don't seem to be using Jekyll, your simplest solution is to add a file named '.nojekyll' to the root path to disable Jekyll functionality.
Check out https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/ for more info.
Edit: Just to be clear, the offending directory is '_include'.
I am creating my website on github page, I am not using jekyll or any of its kind, it's just pure javascript and html css. Why sometime it gives page build failure? what it is building then?
By default in a github repository, the gh-pages branch is build with Jekyll.
If you have underscored folders (eg: _myfolder) Jekyll tries to build. If they are not real Jekyll folders, this breaks the build.
If you don't want to process you html/js code, add a .nojekyll file at the root of your code. Github will then not try to build, it will just serve your pages as is.
More info in Github pages doc
I was facing the same error. I was using only HTML, CSS and JS just like you. Also adding .nojekyll made no changes, I was still getting the same error.
Then I figured out the error in my code editor(VS code). VS code shows if there any problems in the code only the bottom left corner.
The thing that caused error was that I was missing a colon(:) in my css code.
So check your code once more if it this kind of minor issues.