UI Customization
About 402 wordsAbout 1 min
You can customize certain UI elements of the page by adding a .cnb/settings.yml
configuration file to the root directory of your repository, unlocking more interesting possibilities.
Configuration File Description
You need to add and commit the .cnb/settings.yml
configuration file to the root directory of your repository. Below is an example of the configuration file:
# .cnb/settings.yml
# All parameters below are optional
# Cloud-native development configuration, reads the .cnb/settings.yml configuration from the current branch where the cloud-native launch button is located
workspace:
launch:
# Customize the cloud-native development launch button
button:
# Button name
name: Launch Cloud-Native Development
# Button description
# If the value is null, the default description is not displayed
description: Click this button to launch the cloud-native development environment
# Image displayed when hovering over the button (can only use images from the current branch in the repository, specify the path relative to the repository root directory, e.g., .cnb/launch-hover.gif)
# Image maximum 10MB
hoverImage: .cnb/launch-hover.gif
# CPU core number, default is: 8. Only valid for the default template. If there is a custom cloud-native development launch pipeline, this configuration is invalid
cpus: 4
# Whether to disable the default button. The default is: false means not disabled. true means disabled
disabled: false
# Whether to automatically open the WebIDE after the environment is created. The default is: false
# When openssh is not installed in the development environment (only supports WebIDE): regardless of the value of this parameter, the WebIDE will be automatically opened after the environment is created
autoOpenWebIDE: false
# Issue configuration, reads the .cnb/settings.yml configuration from the repository's main branch
issue:
# Customize the create issue button
button:
# Button description
description: ~bug~ Here you go!
# Image displayed when hovering over the button (can only use images from the current branch in the repository, specify the path relative to the repository root directory, e.g., .cnb/issue-hover.png)
# Image maximum 10MB
hoverImage: ".cnb/issue-hover.png"
# Fork configuration, reads the .cnb/settings.yml configuration from the repository's main 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 (can only use images from the current branch in the repository, specify the path relative to the repository root directory, e.g., .cnb/fork-hover.png)
# Image maximum 10MB
hoverImage: ".cnb/fork-hover.png"
Tips
Note: If the file fails to parse or exceeds the limit, the configuration will not be used.