How do i use github to host my static websites - github

i'm building a portfolio website at the moment and i have some simple html, JavaScript and angular projects that i have already built and pushed to github as repositories.
I want to host this repositories on github so that i can provide a link on my portfolio website for visitors to click on and see my simple projects and not the source code on github.

You want GitHub Pages! This allows you to create a static site that can contain any content you'd like, and it's free.

Related

How can I change the default page in github pages?

I am creating a small website project and I started using GitHub pages to have it published there. The thing is that after having all my project in a github repo and decided to change my main page but I am not sure got to do it on github pages.

Github only host for static website and not able to modify the website after it online?

Did Github hosting a website as static website?
Is that mean I do not able to make any changes to the website?
You must understand the difference between GitHub and GitHub Pages.
While using GitHub, you can store whatever you want (As long as it's legal). They are just files. You can delete, change and upload different files at any time.
While using GitHub Pages, the code stored on your GitHub repository will be available online. You cannot create a backend to your website in GitHub pages, they are "static". GitHub will just send the files you store in your repository to the people that visit the url, and the browser will display it as a website. You can change the files in your repository, and the website will be changed accordingly.

How can I track github pages with Google analytics 4 - measurement ID?

I have a repo with README.md as main page. This repo uses mkdocs for generating static site. Also, added Google Analaytics measurement ID to the mkdocs.yml for tracking the traffic on the static site.
But my current requirement is to track the github pages on repo. I am aware of github insights feature where we can get the metrics. But would need more details for every github page.
Can someone help me with this please?
You already use Google Analytics to track your GitHub Pages website, but you want it to track your repo also, right?
In that case, it is not possible, because differently from your website, even if you do own the repo, you do not own it's page, GitHub does. And you probably added some HTML to track your website, but you can't change your repo's HTML. This was already answered here.
Now, if I misunderstood and what you want is to track your GitHub Pages website, then yes, you can.

Is there a better way to get the folder structure of a repo than using Github api when using Github pages?

I am trying to build a portal using Github pages and I want the buttons in my page to be generated based on what folders are present in Github repo, one way is to use Github api to get the tree, I was wondering if there was a way to do this using JavaScript and Github pages.
I don't want to use the API if I don't have to and since I am working with Github pages anyway, I was hoping there was a way to get the folder structure of a repo, using that.

I am using GitHub to host my website. Which is the most suitable Disqus platform to be used?

I am using GitHub to host my website. Which is the most suitable Disqus platform to be used to enable commenting system on my Website?
By Platform I mean :
WordPress
Universal Code
Joomla
Blogger
Tumblr
Squarespace etc.
If you're using GitHub Pages, you can't use any of those Web platforms you mentioned, because they all either presume you have your own hosting space or are hosted on their own infrastructure. If you want to use Tumblr, sign up for it. If you want to use Joomla, get a virtual private server.
GitHub Pages constrains you to Jekyll, plus a finite set of plugins. Which may be fine, if that's all you need. If your website doesn't need any sort of custom backend logic (e.g. a database), you can use GitHub Pages just fine. Disqus can be added to your site with just a little bit of JavaScript.
The reasons you'd want to use GitHub pages are worthy of a separate question, but in a nutshell you get a free static website.