-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: package metadata #106
Conversation
const contributors = await $fetch(`https://ungh.cc/repos/${owner}/${repo}/contributors`) | ||
|
||
return contributors.contributors.length | ||
}, { maxAge: 24 * 60 * 60 * 1000 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think best would be directly fetching from ungh.cc
to avoid doubling the caching cost. since we directly deploy to cf network, inter service cost is low.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's just for development since we generate the site!
In dev want, I want local cache to avoid to many HTTP calls that could slow down local dev.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. We can try a route rule with proxy and cache (or one handler at leat with return sendProxy
). It is not obvious why we are doing it this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hoo, I can combien proxy and cache π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to rewrite the URL?
nuxt.config.ts
Outdated
@@ -56,6 +56,15 @@ export default defineNuxtConfig({ | |||
prerender: true, | |||
headers: { 'Content-Type': 'text/xml' }, // By default, Nitro will set the content type to text/html | |||
}, | |||
// TODO: missing a way to rewrite the URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pi0, how to I can rewrite path to allow the proxy to work?
continue in #158 |
π Linked issue
fix #104
β Type of change
π Description
Waiting for #103 before continuing
Waiting for nuxt/content#2280 before merging
π Checklist