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
[Feature request] @vuepress/plugin-git
supports a custom file list to calculate the contributor list
#449
Comments
Sound reasonable. Users may want to include/exclude some files such as homepage or something. Besides Contributions welcome! |
Oops, I realize that I misunderstood your feature request.... I just thought you want an extra option to include / exlucde some files via plugin options. Sorry for not reading the description carefully. What you want exactly is to display contributors of multiple files in a single page. I could get your point, but I think it might not be a common usage. In fact, you can try to calculate the contributor list yourself in the |
@meteorlxy 😅Sorry if I didn't express myself clearly.
We can already control it by the per page frontmatter options. A global option to the plugin can be more or less overlapping with the frontmatter options of default theme (although plugin is independent of default theme)
There are some other scenarios:
That's exactly what the git plugin is doing. If we do it by our own, we are almost coping everything of this plugin and making some minor change to the calculation logic. Could you please reconsider the request based on the scenarios mentioned above, thanks. |
The both scenarios you mentioned should work under the current logic.
Only the below won't:
Besides if the component is used in multiple places, or the contributor is actually providing dozens of photos, I think declaring it in homepage footer or a copyright page manually should be better. |
@Mister-Hope Thank you for replying. yes of course in all the scenarios (image, Vue component, code block), the contributor of the external files can be attributed by modifying the md file at the same time. But that's not the point, the point is later on any contributions to these external resources (image, Vue component, code block) are not included (we can't ask all the contributors of the external files always leave a comment in md to track their contributions, can we?). I mean when someone wants to include the external resources in calculating git attributes, why don't we provide users an convinient option.
Yes, there are many situations where the contributor list can be long, even in current logic. But the option should be users', they decide when to show the contributors per page or when provide an overall contributors map. How they decide doesn't contradict this request to provide this option in case they want. |
I agree with the pr you opened. That option would be nice. |
Feature request
Description
We are using the functionality of importing code block heavily in our project (e.g.
@[code](../foo.js)
). So we hope@vuepress/plugin-git
calculate the contributor list based on not only the currently.md
file, but also files from an optional custom file paths list, given by frontmatterProposed Solution
@vuepress/plugin-git
takes an optional argumentgitContributionInclude
(or other name you suggest) from frontmatter, which is a list of relative path to filesgit shortlog
(calculating from multiple files is already supported by git)Please let me know your opinion, we can try to implement and contribute if you think it's acceptable.
The text was updated successfully, but these errors were encountered: