Move the Contributor Table to Another File
By default the Bot writes the contributor table into your README.md. A project with many contributors could end up with a very large contributor table that is dominated by contributor avatars (GitHub profile pictures). If the table becomes too large, you may want to move it into its own file.
The same steps work for showing the table in several files, for example a README and a documentation page. This example below shows you how to configure the Bot to store the table in CONTRIBUTORS.md instead of README.md.
-
Create the
CONTRIBUTORS.mdfile and add the markers that tell the Bot where to store the tableCreate a file called
CONTRIBUTORS.mdin your repository. Add the table markers where you want the table to appear. The Bot only adds contributor entries between these two comments, so you are free to add anything else around them. The markers look like this:# ContributorsAny markdown content you want can go here, the Bot will only add the contributor table between the markers.<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --><!-- prettier-ignore-start --><!-- markdownlint-disable --><!-- markdownlint-restore --><!-- prettier-ignore-end --><!-- ALL-CONTRIBUTORS-LIST:END -->You can also add content after the All Contributors markers. -
Update the configuration so it knows about the
CONTRIBUTORS.mdfileOpen
.all-contributorsrcand update thefilesarray to listCONTRIBUTORS.md.{"files": ["CONTRIBUTORS.md"]}If you want the table to appear in two files, list both files in the
filesarray:{"files": ["README.md", "CONTRIBUTORS.md"]}You can add the contributors table to as many files as you want by adding more file names to the
filesarray. -
Remove the table from your
README.mdfileIf you no longer want the contributor table to be visible in the
README.mdfile, remove the old table and its markers fromREADME.md. If you don’t remove it, the table will remain there but will not get updated because it is no longer listed in the configuration (see above).If you move the table to
CONTRIBUTORS.mdor another file and remove it from theREADME.md, our specification recommends that you add a prominent link to it from yourREADME.mdin addition to a link from the contributors badge. -
Commit your configuration and file changes
Once you have updated the configuration, commit the new
CONTRIBUTORS.mdfile, the configuration file and theREADME.mdfile to your default branch. The next time you ask the Bot to add a new contributor, it will create a new table inCONTRIBUTORS.mdinstead of theREADME.mdfile.
