How can I upload a website with GitHub.io? - github

I know we are allowed a .github.io domain, but how can I upload my website there?
I have made a website with HTML/CSS/Jquery/Bootstrap... in the WebStorm IDE by Jetbrains, but I am unable to upload this to github properly? How can I upload my website properly? The website has external images and everything else too. How does this work? img of files

You "upload" it in a git repository on github. It's all detailed on https://pages.github.com/

On GitHub, you need to make a new branch called gh-pages. This will make a page for your project if you navigate to yourusername.github.io/project
You'll have to go to the Settings of that Repository to activate your Project's Page. GitHub will also confirm the Project's webpage address.
This is what it looks like
https://pages.github.com documents the process for using the yourusername.github.io domain
EDIT: You don't need to make a new branch! You'll still need to go to Settings and setup GitHub pages from there.

Related

Why I am not able to see the the webpage after hosting it in github?

Why I am not able to see the the webpage after hosting it in github? It's just showing a url with the name in same as in Readme but does't redirect
anywhere.
screenshot
You GitHub Pages is working as expected. The only file in the repository is the README, so that is the only file built on Pages.
If you wanted to build a Pages site at myportifolio.github.io, you'd have to make a new GitHub account under the username myportifolio.
By default, github displays the "readme.md" file.
And, your repo doesn't have anything to show in particular!
Try adding a dummy ".html" file and then open the website. If GitHub can't find anything to display it will display the "readme.md" file.
Make sure you follow the steps mentioned below-
index.html is your root file.
You have changed your Github repo name at least one or two times,refresh the page & visit the page after a few minutes.

How can I have GitHub return the actual file (not displayed in the Git viewer)?

We have all of our API documentation up on Git. But when I go to the index.html file, I get it in a viewer. Is there a way to have it return the raw html file, for that one and all the ones it links to?
You should publish your repository as GitHub page, specifically a project site available at http(s)://<user>.github.io/<repository>
Configure the publication source to be your master branch, and you would then be able to go to https://windward-studios/Windward-REST-version-2-Clients/.Net%20Standard%202.0/dotnetdoc

username.github.io pages not published as github pages

I have Created the repository named as username.github.io and tried to access the same URL in browser but i'm getting 404 error.
Checked in repository settings -> Under Github Pages Section, But it was not showing the message "your site is published at username.github.io"
Apart from this, is there anything i have to do...
Screenshot:
Actual URL: https://username.github.io
To create a GitHub Pages site for your own username (i.e. a personal website and not a website for a repository), you need to replace the username part of username.github.io with your GitHub username. For example, if my username on GitHub is abcde, I would create a repository called abcde.github.io and then enable GitHub Pages in its settings as you have done.
You need select source branch to publish(Initially it will be none. So nothing published) in
Settings -> Github pages --> source and click save. Then only it will be published to username.github.io URL.
Make sure your branch has index.html file.
Normally, github pages URLs are generated as username.github.io/repo-name.
I'm not sure what naming the repo as you did would do, but in most cases, just name the repo as you normally would (a description of the project) and then publish the sites that way. If you already have code, here is how to rename the project in Github and updating the remote url
I'm not sure exactly why your pages aren't generating, but it likely has to do with the name of your repo.

Github page not showing the contents of my index.html

My code works fine locally. However, when I tried it on a GitHub page url, the content don't show only the background colors show. How can I fix this?
UPDATE:
Mixed Content: The page at 'https://vanessachu.github.io/WebResume-3.0/' was loaded over HTTPS, but requested an insecure script 'http://code.jquery.com/jquery-latest.min.js'. This request has been blocked;
the content must be served over HTTPS.
This is error from chrome's web console, you can filter the console in DevTool to only show errors and then you will find it appears as the first error, since most of your vendors libs depends on $/jquery, you can either:
a) Download a minified jquery and place it in your js folder
b) Request it from a CDN that serves static assets using https instead of http. Personally prefer UNPKG - https://unpkg.com/jquery#3.3.1/dist/jquery.min.js
Some web security readings you might find useful: what is mixed content.
From the GitHub Pages doc:
You should follow bellow steps:
1. On GitHub, navigate to your GitHub Pages site's repository.
2. Repository settings buttonUnder your repository name, click Settings.
3. select-gh-pages-or-master-as-sourceUse the Select source drop-down menu to select master or gh-pages as your GitHub Pages publishing source.
4. click-save-next-to-source-selectionClick Save.

Github get link of current project in live preview

I upload my project to github and I want to see the project live in link.
I tried to do that with plunker but I don't see any import option.
I saw github users upload their project then they put link with 'xxxx.github.com'
(github domain) when I press it I see the project in preview live.
how can I do that?
my directory structure
in the src
github link
github link to project- shows only the background color
github link
github project
Use gh-pages.
Make a new orphan branch called gh-pages. Keep your index html page in the root directory of that branch. Your project will now be live.