Appearance
静态资源介绍
介绍
根据 DeePress 的规范,主题的所有静态资源均需存放在 assets 目录对应文件夹中,方便开发过程中调取对应资源文件。
目录结构
├── assets // 静态资源
│ ├── css // 样式
│ ├── fonts // 字体
│ ├── images // 图片
│ ├── js // js样式文件引入
资源加载方式与
Vue组件中的style标签类似,使用@import引入资源文件。
例如:
CSS 文件引入
css
@import './assets/css/index.css';JS 文件引入
js
import './assets/js/index.js';注意:以上CSS文件引入方式,是在主题根目录中的 style.css 入口中引入。
详细请参考:👉 查看目录结构
txt
├── 404.php // 404页面
├── archive.php //存档页面
├── comments.php // 评论页面
├── footer.php // 页脚
├── functions.php // 函数
├── style.css // 样式导入的入口文件
├── header.php // 头文件
├── index.php // 主页
├── page.php // 页面
├── screenshot.png // 封面图
├── search.php // 搜索页面
├── sidebar.php // 侧边栏
├── single.php // 单页
├── theme-options.php // 主题设置