Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 ogi routes remove root / #336

Closed
wants to merge 1 commit into from

Conversation

roiLeo
Copy link
Contributor

@roiLeo roiLeo commented Sep 30, 2024

Context

  1. describe why do we need this change?

  2. what is the problem?

  3. how did you solve the problem?

Ref

PR Type

  • Bugfix

Copy link
Member

@preschian preschian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update this page instead: https://github.com/kodadot/workers/blob/main/ogi/pages/index.vue

and, this issue is not related with ogi: kodadot/nft-gallery#11058

@roiLeo
Copy link
Contributor Author

roiLeo commented Sep 30, 2024

please update this page instead: https://github.com/kodadot/workers/blob/main/ogi/pages/index.vue

Hello, can you tell me why we need these redirection of base path? as I don't think it's necessary since we don't need to be dynamic nor to have ssr.
Meta for this page is already set on main repo imo we will have to duplicate same code and it could be a pain to debug if you are not aware of this redirection.

ie landing deploy preview:
Screenshot 2024-09-30 at 16-39-29 OpenPreview

and, this issue is not related with ogi: kodadot/nft-gallery#11058

wrong link, fixed

@preschian
Copy link
Member

Hello, can you tell me why we need these redirection of base path? as I don't think it's necessary since we don't need to be dynamic nor to have ssr.
Meta for this page is already set on main repo imo we will have to duplicate same code and it could be a pain to debug if you are not aware of this redirection.

So far, related to SEO/OpenGraph, it will be handled on the worker side. Even in the previous implementation, we already do that, ref:

app.get('/', async (c) => {
const useragent = c.req.header('User-Agent');
if (useragent && !isbot(useragent)) {
return fetch(c.req.url);
}
const props = {
name: 'KodaDot',
siteData: {
title: 'KodaDot - Your Generative Art Marketplace',
description: 'One Stop NFT Shop on Polkadot',
canonical: 'https://kodadot.xyz',
image:
'https://raw.githubusercontent.com/kodadot/nft-gallery/main/public/k_card.png', // change image url to bypass the cache
},
};
return c.html(<Opengraph {...props} />);
});

@roiLeo roiLeo mentioned this pull request Oct 1, 2024
@roiLeo roiLeo closed this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default Preview card for /
2 participants