Github pages 404 File not found - html

I'm new to Github pages and Sass and am trying to deploy my first site. However, I get a 404 error when opening my site https://manayam.github.io/portfolio/ but have not been able to figure out why.
It looks like my settings are configured correctly since I get the checkmark saying my site is published.
Before this, I had a friend help me and he deleted my master branch since I couldn't figure out how to update my repo with both branches, if that's relevant to the current problem. Although I looked up it is not good practice, I force pushed to be able to update the repo since it was rejecting my pushes. Since then, I have been able to update my repo but now the site receives the 404 error.
The repo is at https://github.com/manayam/portfolio. Could anyone help me?

You didn't upload an index page to your root, and GitHub Pages doesn't allow directory listings. If you actually go to the dist subdirectory where there is an index page (https://manayam.github.io/portfolio/dist/), it works fine.

Related

Can't use Git Pages

TLDR: GitHub Pages isn't working.
I have a little knowledge on GitHub and tried multiple fixes to no avail. One repository is only showing readme file contents.
Please explain in lamest terms.
New to web development, I finally was able to complete my first site, but I'm unable to actually deploy the files for some reason; please forgive me, I literally have no idea what any of the git terminologies are.
I purchased a pro subscription in order to keep the repository private and the site public.
Every file is present in what seems to be the main root directory, but nothing is being actually presented.
I've created two different repositories in an effort to fix this, as I've seen different methods are available.
The first repository includes a README file because I was originally instructed to do so, however, all the site link does is present that README file's contents;
I also attempted to add a permalink fix within the file, but all it did was add that text to the other text presented.
The second repository in question literally greets me with nothing but a 404 error.
The solution I tried for the second repository was to have the repository name share my username as well since that seems to be where the site's link originates, but no present changes have occurred.
Finally, the waiting game solution hasn't beared any fruit yet either aside from updating the README file's contents.
All help is very much appreciated.
Check first:
Your GitHub repository name, which depends on the type of GitHub Pages you are creating
If you're creating a user or organization site, your repository must be named <user>.github.io or <organization>.github.io.
your GitHub Pages Publishing source
If you use the default publishing source for your GitHub Pages site, your site will publish automatically. You can also choose to publish your site from a different branch or folder.
You can add more pages to your site by creating more new files.
Each file will be available on your site in the same directory structure as your publishing source.
For example, if the publishing source for your project site is the gh-pages branch, and you create a new file called /about/contact-us.md on the gh-pages branch, the file will be available at https://<user>.github.io/<repository>/about/contact-us.html.
Make sure you have GitHub Pages enabled for every repository and that it's set to the branch you want to publish by checking your Pages settings at github.com/<user>/<repo>/settings/pages. If enabled, there should be a link on that page that takes you to the site.

Why won't Github Pages serve my documentation?

I use sphinx to build html documentation, and am in the middle of open-sourcing some of my company's private repos.
Internally, we serve documentation from an S3 bucket through Cloudfront so we can put access controls in front of it. But for open source, I figured publishing via Github Pages would be the path of least resistance.
However, I cannot get the service to work correctly.
Here is my repo, with my index.html in the /docs folder.
Here is the site, which is not applying any of the linked css, and with all page links broken.
I tried to isolate the issue by making a test repo with just the built documentation, and publishing from master.
As you can see, this one does not even try to serve the index.html, I just get a 404 page.
These files work both locally and when serving from AWS, so I'm a little at a loss for why Github Pages is not serving it correctly. I feel like I must be making some sort of dumb oversight. If anyone with more experience could take a look and point me toward the error of my ways I would really appreciate it. I'm a backend engineer for the most part so website logic is a little outside my normal wheelhouse. Thanks in advance!
To anyone else running into the same thing, I figured it out. Because I am pre-building the site in my CI/CD pipeline, I don't need jekyll to build the site for me, and need to add an empty config file for it.
From [here][https://www.docslikecode.com/articles/github-pages-python-sphinx/]:
Next, you set up the .nojekyll file to indicate you aren’t using
Jekyll as your static site generator in this repository.
Thank you for your help!
You need a _config.yml, and you need to enable github pages on Master for the repo (go to settings). After that, you also need a Gemfile it the following:
source 'https://rubygems.org'
gem 'github-pages'
Normally, the GitHub pages site needs to be in the root, and yours looks like it's in a /docs folder, so I'm sure you can Google how to do that. It might not be possible though with GH pages, I'm not sure.
If it must be a subfolder and not the root of the project maybe something like this would work: https://gist.github.com/cobyism/4730490
Heres whats in my _config: for barebones sites:
permalink: pretty
sass:
sass_dir: _scss
style: compressed
I'm sure you can leave sass out

Problem with Github pages - (error 404 or nothing at all showing up)

I tried looking for a solution to this problem (tried cleaning cookies and cache from my browser already). The problem is, I am trying to publish my first website on Github (I am a newbie web developer) and whenever I go to the published link, only the name of the repository shows up, on a blank page (instead of displaying my html+css). And yes, I have commited the files to the Master branch and all that. Would be very thankful if someone helped since I am stuck on this (:
Tried cleaning cookies and Cache
I followed all steps from a tutorial
I uploaded archives (HTML + CSS + Images)
I included a README document on the repository
Expected results would be my webpage showing up (My page has no issues and it shows up locally, but not on the github pages link)
The actual result: sometime si get error 404 and sometimes I only get the name of the repository on a blank page
Is your homepage named index.html?
GitHub pages check for this index term to render html. If found it does render, otherwise page not error pops up.
I faced the same issue(404 on a newly set up GitHub pages website). I tried many methods such as switching a new theme etc. But it seems that it still did not work on my case. I finally solved it by switching the branch of GitHub pages website to another branch first, click save. Wait for a while and switch it back again. Then the 404 problem was suddenly solved.

404 error on the default page on my Gitlab repository

This is my first time using Gitlab.
My repository url is myusername.gitlab.io/myrepo.
Opening that page gives me a 404 error, however when I open myusername.gitlab.io/myrepo/myindex.html, I get my index page.
Can someone tell me how I can set it so myusername.gitlab.io/myrepo loads myusername.gitlab.io/myrepo/myindex.html.
On a second note, I have seen other projects that use username.gitlab.iowithout the need for the/therepo` suffix.
Can anyone tell me how I can remove the suffix and just use the domain to access my repo.
Your server may prefer a default 'index' file to be loaded. In some cases, it may not handle the default file at all.
Rename you index file from myindex.html to index.html
First, to start, you can fork a pre-set project, with the right files in it (including an index.html): see gitlab.com/pages for examples, and "Getting started" for the steps
.
I really want to have myusername.github.io only
Second, that is a user website: make sure your repo (where you have forked/cloned the project example) is named after your GitLab login: <you>.gitlab.io.

Local Jekyll Serve/Live Site discrepancy

I am creating a jekyll blog to host on my github.io account using a theme. The problem is simple: when I run 'jekyll serve' the site generates locally as it should with no issues. However, when I push it to my_profile.github.io repository, it is breaking online.
I'm confused as to why this is happening. I found one other question here on stack: Locally building and pushing jekyll site to github pages. An answerer recommends pushing only the _site folder of jekyll that gets auto-generated. However, that didn't solve it for me.
Link to my repo if anyone wants to take a stab:
https://stackoverflow.com/questions/36377865/locally-building-and-pushing-jekyll-site-to-github-pages
Link to broken live page: https://spirited-away.github.io/
Any ideas appreciated!
Looks like you're requesting assets with http://, but serving your site on https://. Browsers don't like that. Use your browser developer tools to see the errors.
Although I can't be sure without a repo URL, you've probably got something like this set in your _config.yml:
url: http://spirited-away.github.io/
Change it to:
url: https://spirited-away.github.io/