Customizing Color Variables in NexT Theme
Customizing Color Variables in NexT Theme
Refer to Custom File Documentation
Visit the official NexT documentation on Custom Files to understand the custom file setup.Find Color Variables
Open thethemes/next/source/css/_colors.styl
file in your Hexo project. This file contains the default color variables used throughout the theme.Set Up Custom Variables File
Navigate to
source/_data/
(create this directory if it doesn’t exist).Create a
variables.styl
file in this directory:1
touch source/_data/variables.styl
Overwrite Variables
Add your custom color variables invariables.styl
:1
2
3
4// Example customizations
$primary-color = #255378; // Main theme color
$body-bg-color = #f4f4f4; // Background color
$link-hover-color = #2ecc71; // Link hover colorEnable Custom Variables
Edit_config.next.yml
and set the custom variable file path:1
2custom_file_path:
variable: source/_data/variables.stylRegenerate and Test
Run the following commands to preview your changes:1
hexo clean & hexo g & hexo s