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

Possible to specify gist name? #107

Open
duchenpaul opened this issue Jun 15, 2024 · 7 comments
Open

Possible to specify gist name? #107

duchenpaul opened this issue Jun 15, 2024 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed registry

Comments

@duchenpaul
Copy link

Is your feature request related to a problem? Please describe.
I have multiple versions of resume, in different languages, but I see the registry is hardcoded the file name has to be resume.json, so I can only render a version of resume at one time.

Describe the solution you'd like
Can we have one more parameter to specify the file name of the gist that the registry fetches from?

Describe alternatives you've considered
No alternatives

Additional context

@thomasdavis
Copy link
Member

Sounds like a good feature. I had this idea that maybe we could use a separator such that;

https://registry.jsonresume.org/thomasdavis -> loads -> resume.json
https://registry.jsonresume.org/thomasdavis-en -> loads -> resume-en.json

I don't know if - will work as a separator, but would this solve your user case @duchenpaul

@duchenpaul
Copy link
Author

Thanks for your quick fix!
So still, I have to name my resume.json as resume-<x>, which I can access my resume from https://registry.jsonresume.org/thomasdavis-<x>, right?

I am happy to take this change, but this will bring another problem, which is '-' can be used as a part of Github username.

There would be a problem if a user named thomasdavis-en, it is a legal Github name, but he will face the problem here.

Suggesting to use other characters as separator, such as @, like https://registry.jsonresume.org/thomasdavis@resume-en, which will load resume-en.json

Reference:
GitHub Username Policy

Username may only contain alphanumeric characters or single hyphens, and cannot begin or end with a hyphen.

@duchenpaul
Copy link
Author

Not sure if you like this ideahttps://registry.jsonresume.org/{username}@{gist name}, I know this could bring a lot of change to the code.

@emeraldjava
Copy link

emeraldjava commented Jun 16, 2024

Could this be supported via a query parameter solution?

https://registry.jsonresume.org/thomasdavis?lang=en&theme=xx

The 'en' value would be passed as a value to a 'lang' name parameter. We know 'theme' already is a parameter, so would follow that pattern.

@duchenpaul
Copy link
Author

Could this be supported via a query parameter solution?

https://registry.jsonresume.org/thomasdavis?lang=en&theme=xx

The 'en' value would be passed as a value to a 'lang' name parameter. We know 'theme' already is a parameter, so would follow that pattern.

That is nice as well, but I prefer to use gistname or such as instead of lang, as there may be other versions of resume, gistname - this will make the backend to retrieve the gist named so from the user's gists, in that case the user can have as many version/type of resumes as they want.

@mcarbonneaux
Copy link

mcarbonneaux commented Oct 24, 2024

query parametter seem to be fine!
and gistname as parametter also !

https://registry.jsonresume.org/thomasdavis?gistname=myresume1&theme=xx

  • to get myresume1.json in gist of thomasdavis

https://registry.jsonresume.org/thomasdavis?gistname=myresume-en&theme=xx

  • to get myresume-en.json in gist of thomasdavis

all are done in getResumeGist that need to add gistname parametter.

to replace resume.json filter with the value of this parametter.

return f.files['resume.json'];

they are used in two place:

in the first we can add req.query to retrive gistname parametter.
but in the second a don't know how to retrive the req.query (i'm not so fluent with javascript)...

there another place that reference resume.json and gist.githubusercontent.com:

const RESUME_GIST_NAME = 'resume.json';

in that way you can resolve mutiple version of resume and multilingale resume.

@thomasdavis
Copy link
Member

Sounds like we should just go with the query string, seems easy to implement.

@thomasdavis thomasdavis added enhancement New feature or request help wanted Extra attention is needed registry labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed registry
Projects
None yet
Development

No branches or pull requests

4 participants