Fork Button Customization
About 193 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, and create a friendly 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 on hover
# 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
# Maximum image size: 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 |