Comments (4)
Thank you for pointing out this problem. I didn't realized this before.
I have searched but it seems that for GitHub Pages it's is not possible to change the status code...
With a custom server it should be possible to server as 200 for all not-found requests:
https://github.com/yusanshi/emgithub?tab=readme-ov-file#use-your-own-web-server
Also, if we use other hosting service other than GitHub Pages, like Vercel and Cloudflare, it may be possible to do this trick. However, that's gonna make things messy...
Basically, the 404 mainly occurs in two places:
- main page: https://emgithub.com/
- embedding page: e.g., https://emgithub.com/yusanshi/emgithub/blob/master/_config.yml
For the main page, I have added index.html
which is a symbolic link to 404.html
: 8864988. Now requesting the main page would result in a 200, so hopefully the site can be later included by Google search.
For the embedding page, I still have no clean methods with GitHub Pages. But I believe 200 for the main page would be enough.
What do you think?
from emgithub.
Waiting for your response with the solution....
from emgithub.
I think for ranking your site (emgithub) on Google. You should try google search console + analytics. ( because this gem deserves to be popular )
2 Years before I found this repo and cloned it here
The main thing is that I learned from your repo (trick/technique) that how a 404.html can handle all other requests and we can do rest of the things using JavaScript (Parse URL and extract Parameters)
And I made ArticlePlanet Taking Inspiration from dev.to for Markdown Article.
I almost completed the website here without database I was using GitHub Gists for Article Hosting and also getting backlink from there for good SEO. Here See Article
But My Articles wasn't ranking I thought it's because I'm loading content dynamically using GitHub API.
But I saw search console is blocking to rank it, then I understood that's it's because 404.
That was the story part.
Now whats the solution.
For You ( You don't have to rank other other URLs other than Home Page URL )
But for me I have to rank all pages of the ArticlePlanet.
See This URL is being ranked. https://articleplanet.github.io/post.html?id=73486096e84d29a730fb3a9a827ee893 (200 Response )
but https://articleplanet.github.io/posts/73486096e84d29a730fb3a9a827ee893 ( 404 Response )
Despite Both Links works same.
HTML same (little differ)
Now, If you want then you may show some solution to me also maybe by using the second solution approach I shown you i.e.
Or Use another approach to built custom and clean URLs without having it....
Knowing (you - I have searched but it seems that for GitHub Pages it's is not possible to change the status code...)
means can we build custom URLs without using this technique o "GitHub Pages". (i.e. jekyll, cofigyml, workflow, actions, etc)
and if it's not possible the you said about the tricks for other hosting.
Also, if we use other hosting service other than GitHub Pages, like Vercel and Cloudflare, it may be possible to do this trick. However, that's gonna make things messy...
You can also show some way for that :)
if you want waiting for your response (eagerly)
.
.
.
.
from emgithub.
Sorry but I have no experience with Vercel or Cloudflare, so I don't know how to do the trick with them 😞
from emgithub.
Related Issues (20)
- Theme request: arduino-dark HOT 3
- Hosting for demo GIF
- Rendering Jupyter Notebooks instead of showing raw code. HOT 4
- Fetch GitHub raw files from jsDelivr HOT 5
- Embeds Fail to Render After Forking Repository and Using Github Pages HOT 2
- File does not update HOT 3
- Cannot Embed on Medium HOT 4
- [Feature Request] Show Full Path in Footer HOT 4
- TypeError: Cannot read properties of null (reading 'querySelector') at embed-v2.js:422:33 HOT 4
- [FEATURE REQUEST] Embed Github commit diff HOT 1
- [Feature Request] Compile to static HTML HOT 7
- [Question] Use markers instead of line numbers HOT 1
- serviceProvider value is wrong if served from a subdirectory HOT 1
- [feature request] Add dark mode option for markdown files HOT 4
- [Request] full view render HOT 5
- Spaces indentation lost HOT 2
- [Feature Request] Support multiple languages HOT 2
- Multiple `<script>` tags loaded for highlightjs
- Rendering the script tag version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emgithub.