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

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.

Related

Is there a way to view a list of repos with their descriptions at a glance?

I'm looking for a view where I can see quickly which repos I have locally stored in a folder and what each is for. I know I can add details to the README, but the description would be a good place to put a short blurb to remind me of the purpose of each repo without having to drill down into each one. Something similar to what is available on the GitHub website makes sense to me. I'm using GitHub Desktop and haven't seen anything within it, but if another app has this functionality, that could also work.

Is there a way to add custom "badges" to files on GitHub?

I have it in my head to help people at my company get better by finding a way to highlight and call out good code.
In particular, I'd like to be able to mark a file (not a repository or directory) as having a "gold star" (or another badge) so people browsing our source code who see the badge can see they're looking at a really good implementation they might take inspiration from.
I'm taking inspiration from the code owners feature on GitHub where there's a little padlock icon on a file if it's assigned ownership by the CODEOWNERS file.
Is it possible to do a custom "badge" on GitHub? If so, what's the API?
Browsing the GitHub documentation and searching online, I wasn't able to find anything explaining how to do something like this. Most folks were talking about the little images badges like the code coverage badges people put in their readme files.
Checkout this thread. You can submit feature request to GitLab and GitHub or in case of GitLab code your own feature and submit PR.
Here are some closely related discussions. Probably you have already seen them and are not looking for them but you might use them to get idea of how to create the feature that you want.
The Shields service (at shields.io) provides a way to create custom badges for your projects. These are badges are very common and are frequently used to show status information about the project, or demonstrate tools that were used for the development of your project. (...more)
Also checkout Bring Your Own Badge

Gh-pages not displaying the right thing

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.

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

Unedited files not showing up in repository?

Very new to Github and I downloaded the desktop application in hopes of understanding it better. What I'm trying to do is commit/push files by dragging them into my repository folder, but they don't show in application when moved? I tried editing a txt file and as soon as I save it, it appears. I don't want to have to edit every file I add to my repository as I edit it elsewhere. How do I make the non-edited, dragged-and-dropped files appear?
Also, is there an official GitHub support forum? I can't find anything on their website where you can ask questions/etc and I'm not sure StackOverflow is the best place for this question.
Thanks!
That's the way how git works. It doesn't make sense to add every time the unedited files.
When it notices you added/edited/removed files, git will know that.
I pasted a file (blocks.gif) in my repository and in GitHub Desktop it I see the following (click the 1 uncommitted change) and you should see the new files there. Then you can write a commit message and commit the changes.
Also, is there an official GitHub support forum?
When you need help using GitHub, you can always contact the support team (or write an email to support#github.com). They are awesome people. :)
https://github.com/contact