# cnblogs自定义css **Repository Path**: lixingwu/cnblogs_custom_css ## Basic Information - **Project Name**: cnblogs自定义css - **Description**: 博客园自定义css - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-07-10 - **Last Updated**: 2025-02-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 博客园自定义css > 开发环境搭建 ##### 1. 安装基础运行环境nodejs ```http https://nodejs.org/en/download/ ``` ##### 2. 安装nodejs包管理器pnpm ```http https://pnpm.io/zh/installation ``` ##### 3. 使用pnpm安装less编译器 ```shell script pnpm add less pnpm add less-plugin-clean-css ``` ##### 4. 编译less脚本 ```shell script # 直接编辑输出 lessc src/main.less custom.css # 编译后压缩输出 lessc --clean-css src/main.less custom.min.css ``` ##### 5.使用 ```text 自定义样式输出到 custom.css ,压缩版 custom.min.css。 ```