creating Blogs Posts in Github Repo and Next JS - github

I'd like to set up a separate Github repo where I can save blog post data and then call it into my Next.js website.
Is there is any possible way to do this? please help.
I tried looking at the solutions online but didn't found the one i am looking for.

You can do that with data like images and file resources by just adding them to the new GitHub repo and making it a github page. Then you can access them in your NextJs by using URL of the hosted page

Related

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.

My GitHub repositories are not known by Google

I created my repository with GitHub.
When I try to google it, its not listing in the search.
https://github.com/Subathra19/An-innovative-packet-labelling-scheme-TCP-PLATO-for-Data-Center-Networks
Thanks in advance
If this page was created newly, it might not show up in the google search result immediately because google has not indexed the page yet.
Apart from this, there are multiple other factors which might be the reason your page is not showing up in the google.
Read here for more details: GitHub repository not listing in Google search

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.

"There isn't a GitHub Pages site here."

Around 12 hours ago, I tried creating a personal blog using 'beautiful jekyll'. I followed the simplest 3-step method to get a basic blog running however, every time I enter my website link, I get
There isn't a GitHub Pages site here.
If you're trying to publish one, read the full documentation to learn
how to set up GitHub Pages for your repository, organization, or user
account.
There isn't anything that I did different from the tutorial. I want to know does github just takes long to publish the pages or is there some sorcery ?
As I commented:
github.com/nitinrabbit/yourboygorja.github.io would not work, since yourboygorja is not your GitHub username. nitinrabbit is.
So the repo should be called github.com/nitinrabbit/nitinrabbit.github.io
And some content needs to be pushed to it.
You may need to go to the settings>pages>Source>Main (or subfolders) to activate page root. You may find detailed explanations here.
https://hackernoon.com/use-custom-domain-with-github-pages-2-straightforward-steps-cf561eee244f