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

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.

Related

Uploading an exe file to github pages and allowing it to be used on the site?

Basically the title, I want to have a pretty simple exe file uploaded to my github pages website, and then allow it to be used on the site. Is this possible and if so how can i do it?
GitHub Pages provides only static sites. That is, a GitHub Pages site can contain only HTML, CSS, JavaScript and the like that are delivered without changes to the web browser. Like with all static site hosts, there is no backend server to perform operations on behalf of the user, including running executables of any sort, so that isn't possible here.
This is the case because GitHub does not want to run arbitrary code on behalf of users when rendering pages (which is a sensible approach in terms of security). Even if GitHub did support that, GitHub uses Linux, so exe files would be right out.

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.

How do i use github to host my static websites

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.

Syncing file and folder from a live website to a GitHub pages repository

I have:
created a simple portfolio with a third party website content creator;
I put the html code into a brand new GitHub Pages repository, so I've create a simple copy that's seems work fine.
Now I'd like to know how do I do to syncing and update the files and folder of the Github Pages repository every time I make a change onto the live website.
Is there a command line tools?
The normal update workflow for a GitHub page site is:
you modify your pages in your local cloned repository, with your third party website content creator
add, commit and push
wait a few second and refresh the page: your changes should be there.

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.