Fork Button Customization
About 194 wordsLess than 1 minute
Customize the appearance of the Fork button to make forking more engaging.
Use Cases
- Add a personalized description to the Fork button
- Attract users to fork your project through hover images
- Create a friendly and fun contribution atmosphere in open-source projects
Configuration
Add the fork configuration to .cnb/settings.yml:
.cnb/settings.yml
# Fork configuration, reads the .cnb/settings.yml configuration from the repository's default branch
fork:
# Customize the fork button
button:
# Button description
description: Nice repo you've got. Now it's mine.
# Image displayed when hovering over the button
# 1.Use images from the repository's default branch, specify the path relative to the repository root directory, e.g., .cnb/fork-hover.png;
# 2.Use the raw file address under the current domain name, for example: https://cnb.cool/my/test/-/git/raw/main/.cnb/fork-hover.png
# Image maximum 10MB
hoverImage: ".cnb/fork-hover.png"Parameter Reference
| Parameter | Type | Default | Description |
|---|---|---|---|
fork.button.description | string | - | The description text of the Fork button |
fork.button.hoverImage | string | - | Image displayed on hover. Supports repository relative path or raw URL, max 10MB |