Gh-pages not displaying the right thing - github-pages-deploy-action

I'm having some issues with getting the proper page to display. I've looked up different answers and they don't seem to be working for me.
https://github.com/samus94/portfolio2.1
Please let me know what I've done wrong here.
It was displaying the readme before, and I think it still is.

First, You've posted a link to your GitHub repository, not your GitHub Page. The address for GitHub pages always looks like https://<yourname>.github.io/<reponame>.
To get this URL you can go into the settings for your repo and find the GitHub Pages section. Make sure you have GitHub Pages enabled, then look for the URL your site is published at.
Finally, GitHub Pages requires your repository have a very specific structure. It expects there to be an index.html file at the root of the repository. This means you have to either move everything in your /src directory to the root, or move the index.html and update the URLs to your javascript and CSS.
All of these requirements are outlined clearly in the GitHub Pages documentation.

Deploying static HTML + CSS + JS sites (NO jekyll) to Github Pages,
using Github Actions was harder than I though.
Theres is very few quality documentation about this specific topic, except this one:
Steps overview:
Setup a custom action in github
Push changes and the action executes automatically
Your page is deployed to github pages
One important thing: I had no need of changing any property in the yml; don't worry about customizations.

Related

I'm new to github and I can't get my repositories on github pages

I'm new, reaaaally new to github, not familiar at all, just created an account (by watching one old youtube tutorial). And this is my first time here too. Also, english isn't my first language, so I'm sorry for any mistakes.
I'm using the desktop GitHub, I'm not using Git right now (but also the tutorial guy wasn't and it worked easily) and pushing my local repositories to my online github, and it worked. There are four repos and all of them are public. Yet, when I go to my username.github.io there is nothing, it doesn't exist, that's one thing to fix.
Do I have to create some file? I don't understand, there are youtube videos that say you have to choose a theme, but it's been updated I guess because the website it's not like that anymore, and it doesn't show me themes or anything like that.
I've seen a lot of youtube videos and done exactly what they have done, i've read the github guidelines but i think they are confusing, but i tried a lot of different things. If it makes any difference, my repositories only have like .html and css files (plus the images, fonts, html and css stuff). I don't know anything other than hmtl and css yet, not even javascript, so that's it.
So I don't know how to proceed, I've extinguished my completly amateur resources by doind this post, and I'm learning by myself so I have no one to help me here. Also, since I've never had any contact with github, im just "github dumb", I don't know how branchs work, I'm sorry, I know what a branch is, but somehow that plataform makes it hard.
Anyway, I want to know why my username.github.io doesn't work...
Any help, please? :')
First, create a github repository of <username>.github.io and put your html/css files there. Then go to the repository settings and find the "pages" settings at the left.
In the source, select "deploy from branch" and select your main branch and select the root directory and click save.
That's it, your repository will be published to github pages and you can see the url at the top of the page.
I have attached a screenshot if it is difficult to follow.
The same information can be found here.

Can I have GitHub automatically redirect from GitHub repo view to GitHub Pages?

In a recent publication, I included a link to the GitHub repository for the code.
https://github.com/martinkrz/posepi1
This link is now in the literature, so I cannot easily change it. I'm wondering whether there's some way to have requests to the repo page (I can't find anything on this) be automatically forwarded to the GitHub Page for the project, which is at
https://martinkrz.github.io/posepi1/
Again, I need a redirect by GitHub.com because I'm practically stuck with the https://github.com/martinkrz/posepi1 link in the published literature.
No, this isn't possible. If it were, it wouldn't be possible for anyone to view the repository's overview page anymore, which would make doing common tasks difficult.
You could try updating your repository README to point to the place you'd like people to go, but that's the extent of the changes you can make.
This is not possible. You cannot (and to be honest nobody should) change or create self-executing code on your GitHub repository.
And thus, you cannot redirect users.
But you can put the GitHub Pages link into the description of the repository and/or add it as a link in the README.md
The link could be
Click here to see the code in action!
or something like that

Github: display the wiki home on a repository front page

I recently created a global wiki for my company in a Github repo. It's an empty repository which I created just to use its wiki.
My problem: on the front page of this wiki repo, the Readme is displayed. And this Readme is empty, except for a link to the wiki's home.
I want to display this home on the front page of the repo. Is it possible?
Probably is better to use https://pages.github.com/ you could even go further and use hugo, in long term could be easy to maintain since you just keep track of all your articles/posts within a repo.
Regarding your question probably a redirect from the main repo to the wiki may work, check the docs for more info: https://help.github.com/categories/github-pages-basics/
With a redirect, I mean that you will need to have an index.html redirecting to the wiki URL.

GitHub Pages and Jekyll content duplication and SEO issues

I'm looking at using GitHub Pages to host my blog and Jekyll to present it.
Presumably, whatever I commit will appear at <yourname>.github.io through Jekyll and at https://github.com/<yourname>/<yourname>.github.io in rawer form. See this page showing links to live sites and to the source repos used to construct them.
Advice on SEO suggests that duplicating content within and across domains is bad SEO practice. See this Google support page on duplication and this Moz page on issues with duplication both of which also offer possible solutions.
My question is two-fold:
Is content duplication actually a problem for GitHub Pages in practice?
If so, how does one apply solutions like canonical linking or noindex to the GitHub repo so that search engines know that your Jekyll site is the canonical one?
Update:
Might be worth noting that I uploaded a "hello world" index file to my GitHub Pages repo and then checked the source for the page on GitHub. The GitHub source already contains a canonical link
<link rel="canonical" href="https://github.com/guypursey/guypursey.github.io/blob/master/index.html" data-pjax-transient>
I assume it's this that would need changing for each file to point to the Jekyll version of the site but I can't see a setting in GitHub to handle it.
Duplicate content is unavoidable when using GitHub Pages with users and organizations if the repository is public
In general this shouldn't be a problem. See a previous answer.
You do have a couple of options:
Google and other search engines can't obviously access private repository which requires a paid plan.
Switch to a project page. This will use a gh-pages branch instead of the master branch. Since GitHub's robots.txt only allows search engine crawling of the master branch and disallows other branches. So if the site is in gh-pages branch this will prevent Google from seeing the repository.

How to generate a website from GitHub wiki pages

I've used GitHub pages to generate a beautiful website for my project (this one). Now I want to keep the documentation of my project up to date, and having everything in a single README.md file is probably not scalable to the many features we are adding.
So, I thought that the best place to keep the documentation is the GitHub wiki, but I'd like to integrate the wiki to the gh-pages generated site, keeping the beautiful layout.
How would I take the GitHub wiki and generate an HTML web site with a customizable layout?
Here is an example URL for a wiki:
https://github.com/golang/go/wiki
On the same page you will find a clone link:
https://github.com/golang/go.wiki.git
Then run the Markdown files through Hugo or even create a new repository
to the host site based on the Wiki.
You could include your wiki as subtree.
BTW, GitHub Pages now no longer need the gh-pages branch. Create a repository named your-user-name.github.io; it will automatic generate to a website. See GitHub Pages for more detail.