![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Gatsby
西风XF
小前端
展开
-
Gatsby静态网站导航高亮
Gatsby 是一款基于 React 和 GraphQL 的静态文档生成器。思路:获取路由,根据路由显示导航高亮;this.props.location.pathname 获取路由;若this.props.location.pathname获取不到值,可用window.location.pathname获取;// layouts index.jsimport Rea...原创 2018-11-19 20:11:28 · 778 阅读 · 0 评论 -
gatsby构建项目
1、gatsby new pro-name 新建项目名为pro-name2、cd pro-name 进入到pro-name文件夹下3、gatsby develop 启动项目4、项目入口 项目入口文件为:layout.js ,且layout.js做为整体的框架, 把header.js和footer.js引入layout.js, 存放所有静...原创 2018-12-17 11:09:17 · 2133 阅读 · 0 评论