Using GitHub Pages to serve files (i.e. zip) - github

I have setup GitHub pages and my site is working fine, but when navigating to the zip file at the site (i.e. mysite.com/example.zip), I get 404 error page. The files are in the repository and it seems that for some files it works as I can access PDF file just fine (i.e. mysite.com/myfile.pdf). Couldn't find any mention that GitHub Pages are blocking this, but seems like it, or am I missing something? Is there a list of files which ones are served and which not?

Related

Why do GitHub workflow badges not render on Jekyll GitHub pages?

My GitHub Pages site is built from the master branch, using my README.md. The top of my read-me file is directly below.
![pytest](https://github.com/preritdas/wooster-trading-systems/actions/workflows/pytest.yml/badge.svg)
![coverage-badge](tests/badge.svg)
![version](https://img.shields.io/badge/python-3.10-blue)
![maintenance-status](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)
![firebase](https://github.com/preritdas/wooster-trading-systems/actions/workflows/firebase-hosting-merge.yml/badge.svg)
![pages-build-deployment](https://github.com/preritdas/wooster-trading-systems/actions/workflows/pages/pages-build-deployment/badge.svg)
# :chart_with_upwards_trend: :robot: Wooster Systems :moneybag: :money_with_wings:
This looks just fine in the read-me inside the repository. Image below.
Unfortunately, the workflow status badges don't populate on the Jekyll GitHub Pages site. Specifically, the badges that come directly from GitHub don't show, but the rest do. The ones that don't show are tests, firebase deployment, and pages-build-deployment. A screenshot from the site is below.
I'm not sure why this is happening. My hunch is that it has to do with the fact that my repository is private, but what has me confused is the fact that the coverage badge comes from an SVG file directly in my private repository. This works fine on the site (possibly has to do with "artifacts", though I don't really understand the behavior). If the workflow badges are indeed private, how can I make them display on my site?
The only config file (or file that has anything to do with the GitHub Pages site) is my _config.yml, which has the following contents.
theme: jekyll-theme-cayman
plugins:
- jemoji
I installed added jemoji to support the emoji shortcode in my title, which works fine.
Any help appreciated.
Private repositories are not publicly visible. For security, any requests to them from an account without the right credentials will get a 404, so you can't guess which repositories exist.
Because the repository isn't available, your workflows and their results aren't public either. If you want a developer on your team to have the build status, invite them to your private repository. If you want your builds to be publicly visible, open source your repository.
It can be because this tags are alterated because of github actions, so they update and change on the Repository, Github pages treats different the information so this tags are nos updating when you are accessing the web page.
Live tags from Shields.io doesn't work properly on github pages.

Github pages work for .html and images, not for .js files (get 404), needs token

I have a private repository, with a Jekyll website.
I use the folder docs to be my public folder in my github pages settings.
The index.html file and images are loaded, but some assets, like .js are not working. For example /docs/assets/js/_user_variable.js
When I try to open the mentioned url in a browser tab, I get a 404 error.
If I go to my repository, and try to look at the raw version of this file, I see the same absolute path in the url bar and the file is loaded, BUT I noticed an additional url parameter like ?token=AAB72EQ74V6CXJ6ZYUJCHWLAPAXV6
I'm 100% sure this has worked before, but I haven't looked at the website for more then a year. I guess github has changed the requirements for some requests to have a token, but I'm not sure, I couldn't find anything on that.
So it is not necessary to have this token for the index.html and the image files, but it is for others files.
I have read https://guides.github.com/features/pages/ and I can not find any thing regarding tokens needed.
I like to access files from https://raw.githubusercontent.com/username/repository_name without the use of tokens, is this possible?
When you want the raw file (so the browser read it as a text file), you have to have a token:
e.g.:
https://raw.githubusercontent.com/username/repository/master/docs/index.html?token=AAB72EUQF7GXPEXY6YZHQHDAPBFOQ
if you use the following url, it works without token:
https://username.github.io/repository/assets/js/some_variables.js
BUT
When the file starts with an _ underscore, this last option will give you an 404.
So don't use underscore, see also: https://github.com/jekyll/jekyll/issues/55

Getting "Page not found" error in publishing website via Github

I am relatively a new user of R and it is my first post in StackOverflow, so please excuse me if I do not give the relevant information about my question :) My problem is basically about getting a "Page not found" error while publishing a website via Github. For the last couple of days, by using blogdown, I want to publish a personal website. I installed blogdown in my local R environment, designed a website, and then pushed the documents to the GitHub repository. In the GitHub settings section, it is written that my website is published, however when I try to enter the relevant website, I have always got the same problem - "page not found". I actually do not know the problem but you can find my repository in GitHub at https://github.com/muhammetozkaraca/muhammetozkaraca.github.io. The website address that I am trying to publish is https://muhammetozkaraca.github.io. Every kind of help is really appreciated. Thank you in beforehand.
You should separate the source repo from the website repo. Please see the blogdown book page at https://bookdown.org/yihui/blogdown/github-pages.html for more info. In short, the repo https://github.com/muhammetozkaraca/muhammetozkaraca.github.io should only contain the generated website, i.e., it should only contain files that currently live in the public/ directory. Currently, your muhammetozkaraca.github.io repo contains both the source (root directory) and the generated website (the public/ directory).
I think you are making repository inside your username only.
I would recommend building organization with xyz and make a repository with name xyz.github.io.
Add an index.html inside this repository.
Then it will be good to publish as you wanted.
RARE: 'Sometimes it takes 2-5 minutes to publish.'

Can not host a webpage on Github

I have a javascript and html snake game and I want to host it on github I do All the steps and make a gh-pages But I get this error 404 File not found ?when I search Username.github.io/repository-name
Any idea why and how I can fix it? Should I wait for github email After I do the commands??
Most web servers have a "default" page, e.g. index.html, that will be shown when the user doesn't request a particular page. GitHub Pages is no different.
Your repository contains a single file called snakeGame.html, which works just fine if you request it. Unfortunately, GitHub Pages doesn't know that this page should be shown by default. As far as it knows that file has no special meaning.
To get your page to show up at http://peggykh.github.io/Snake/ instead of http://peggykh.github.io/Snake/snakeGame.html, you should rename your file to index.html.

Site results redirect to Google

A site I'm working on has been hacked. The CMS (which I didn't build) was accessed and some files (e.g. "km2jk4.php.jpg") were uploaded in image fields. I have since deleted them (a week ago). Now, when I search for the site on Google, then click the result, it either:
a) simply redirects me to the Google search page
OR
b) a download dialogue appears asking me to download a zip file, with the source domain something like gb.celebritytravelnetwork.com
Clearly the site's been compromised. But if I simply type the URL in the address bar, the site loads fine. This only happens when I click through Google results.
There is no .htaccess file on the server, and this is not a virus on my computer, since many other people have reported the same thing happening, so this question is not relevant.
Any ideas please?
Thanks.
Your Source files have been changed.
Check all the files included in the index page. They might be header , footer pages.
And try using : fetch as google bot.