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

Macro for users/contributors #1323

Open
fredrik-bakke opened this issue Feb 14, 2025 · 2 comments
Open

Macro for users/contributors #1323

fredrik-bakke opened this issue Feb 14, 2025 · 2 comments
Labels
CI documentation Improvements or additions to documentation tooling

Comments

@fredrik-bakke
Copy link
Collaborator

It seems a bit useless to be inserting links to people every place they're mentioned when this information is already stored in contributors.toml. It would be useful to be able to write {{#person Fredrik Bakke}} in place of [Fredrik Bakke](my preferred website). This also makes it easier to maintain one's preferred website later without touching every file one is mentioned in.

Note that the extended scope of including arbitrary people is useful here. For instance, we have many mentions of Freek Wiedijk, who is not a contributor.

@fredrik-bakke fredrik-bakke added CI documentation Improvements or additions to documentation tooling labels Feb 14, 2025
@VojtechStep
Copy link
Collaborator

I've been thinking of finally replacing the git-based authorship attribution process with an in-file explicit macro-based one. My initial though was to have an {{#authors author1, author2, author3}}, because we could easily change the format of the message and sort the authors alphabetically. Do you have an opinion if it's better to have that macro be independent, or if it should rather be written explicitly as "Content created by {{#person author1}} and {{#person author2}}"?

@fredrik-bakke
Copy link
Collaborator Author

It sounds to me like we should have two macros, one for authors and one for persons, but it would make sense to have both run as part of the same script. Perhaps we can even extend the latter to "entities", so we can cite projects and other things as "people" too?

It is useful to have a dedicated authors macro, because then we can automatically detect and warn a contributor if they're not adding themselves to the author lists of the files they're adding to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI documentation Improvements or additions to documentation tooling
Projects
None yet
Development

No branches or pull requests

2 participants