jsonresume / registry-functions

DEPRECATED - SEE MONO REPO -
https://github.com/jsonresume/jsonresume.org
19 stars 21 forks source link

Feature: support repositories and not only gists #17

Closed felipecrs closed 1 year ago

felipecrs commented 4 years ago

I would like to be able to use a full repository to host my resume, so I could pin in my profile as usual.

Template:

https://github.com/${username}/resume/resume.json

or, even more directly:

https://github.com/${username}/resume/raw/master/resume.json

In order to not break anything, I suggest to implement a redundancy:

Check if a Gist is found, if yes use it, otherwise fallback to the repository.

thomasdavis commented 4 years ago

Just had a look at how hard it might be to implement.

Seems quite easy, I will have a play around at some point.

cybairfly commented 2 years ago

My first thought when deploying this. Would be very welcome.

thomasdavis commented 2 years ago

@felipecrs @cybairfly I've got this feature working at https://registry.jsonresume.org/repo/thomasdavis as a prototype.

I kinda agree in retrospect it would actually be a better solution. It would promote people to add extra tooling around their resumes.

The only problem is that Github aggressively caches the url end point https://raw.githubusercontent.com/thomasdavis/resume/master/resume.json that can't be cache busted with query strings.

It's on a 5 minute timer, which kinda sucks... gist I can cache bust in seconds so it feels like you work on it in real time.

Any ideas?

p.s. only took me two years of covid to do this ahaha

felipecrs commented 2 years ago

Does https://github.com/thomasdavis/resume/raw/master/resume.json help?

thomasdavis commented 2 years ago

It just redirects to https://raw.githubusercontent.com/thomasdavis/resume/master/resume.json so it's what get's loaded.

felipecrs commented 2 years ago

Got it. The only way I can find is something like this:

$ revision=$(git ls-remote https://github.com/thomasdavis/resume HEAD | awk '{ print $1 }')

$ curl -fsSL https://raw.githubusercontent.com/thomasdavis/resume/${revision}/resume.json
thomasdavis commented 2 years ago

Yeah great job, makes sense, will try it. (Will obviously be slower but the gist approach is slow too anyway)

thomasdavis commented 2 years ago

Can write some instructions for a Github action that makes it instant or something. (Currently copying your README approach, could build something similar)

cybairfly commented 2 years ago

Great to hear that it will be possible. No idea how to achieve that but I guess Felipe's idea will work.

jona-sassenhagen commented 2 years ago

This would be a nice feature.

thomasdavis commented 1 year ago

@felipecrs @cybairfly @jona-sassenhagen

Don't know why it has taken me this long to think of an easy way but here it is -> https://github.com/thomasdavis/resume

Just use a Github Action to publish a gist when you ever want (in my case, every push)

felipecrs commented 1 year ago

That works, thanks for providing the example. However it didn't have to be necessary. :)

I'll understand if you prefer to close this issue with this solution, though.

thomasdavis commented 1 year ago

No worries. I've actually wanted this myself since the project was first created aha