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

Consider exposing created/edited timestamps from git #21

Open
iloveip opened this issue Jun 12, 2020 · 7 comments
Open

Consider exposing created/edited timestamps from git #21

iloveip opened this issue Jun 12, 2020 · 7 comments

Comments

@iloveip
Copy link

iloveip commented Jun 12, 2020

Hi there,

Does this plugin support folders? For example, if I have files in folders in my git repository. If yes, will the path be generated automatically based on these folders?

Also, can I get the date of creation and modification of the file with this plugin?

Thank you very much in advance!

@stevetweeddale
Copy link
Owner

Hi!

Does this plugin support folders? For example, if I have files in folders in my git repository.

Broadly speaking, all this plugin does is clone your repo onto disk, then creates File nodes in your graph like the ones that gatsby-source-filesystem would. So yes, the File nodes this plugin puts into your graph will have all the same path/directory information on them.

will the path be generated automatically based on these folders

By 'path' I assume you're talking about URL path? In which case, understand that this is just a source plugin, so it's still up to you to create pages and generate URLs yourself. You should be able to follow part 7 of the gatsby tutorial to do that.

Also, can I get the date of creation and modification of the file with this plugin?

The File nodes have creation/modification dates on them, but that for the file on disk which is essentially useless. What I assume you want is history information from git, which unfortunately this plugin doesn't expose at the moment.

@iloveip
Copy link
Author

iloveip commented Jun 15, 2020

Hi @stevetweeddale

Thank you very much for your reply!

The File nodes have creation/modification dates on them, but that for the file on disk which is essentially useless. What I assume you want is history information from git, which unfortunately this plugin doesn't expose at the moment.

Yes, I mean history information from git. It would be very helpful.

@stevetweeddale stevetweeddale changed the title Pulling files from folders Consider exposing created/edited timestamps from git Jun 16, 2020
@iloveip
Copy link
Author

iloveip commented Aug 6, 2020

Hi @stevetweeddale
Do you have any plans on adding this feature?

@lawrenceching
Copy link
Contributor

I created a PR for this https://github.com/stevetweeddale/gatsby-source-git/pull/26/commits

@Casey6624
Copy link

Casey6624 commented Feb 10, 2021

+1, regarding timestamps of git history. This would be awesome.

@iloveip
Copy link
Author

iloveip commented Jul 24, 2023

Hi @stevetweeddale,
Any update on merging #26?

lawrenceching added a commit to lawrenceching/gatsby-source-git that referenced this issue Aug 5, 2023
lawrenceching added a commit to lawrenceching/gatsby-source-git that referenced this issue Aug 5, 2023
lawrenceching added a commit to lawrenceching/gatsby-source-git that referenced this issue Aug 5, 2023
lawrenceching added a commit to lawrenceching/gatsby-source-git that referenced this issue Aug 5, 2023
@iloveip
Copy link
Author

iloveip commented Sep 20, 2023

Hi there,

Any update on this issue? Really looking forward to timestamps from git history 🥹

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

No branches or pull requests

4 participants