zoukankan      html  css  js  c++  java
  • next v5升级到next v7需要注意的地方


    title: next v5升级到next v7需要注意的地方
    date: 2020-03-04
    categories: web
    tags: [hexo,next]

    大部分的设置都是一样的,但有一些细节要注意

    1.背景图片的设置:next v5.X 在source/css/_cumtom.styl设置, 而next v7.x 修改两处:

    “next主题配置文件“ _config.yml中

    custom_file_path:
      #head: source/_data/head.swig
      #header: source/_data/header.swig
      #sidebar: source/_data/sidebar.swig
      #postMeta: source/_data/post-meta.swig
      #postBodyEnd: source/_data/post-body-end.swig
      #footer: source/_data/footer.swig
      #bodyEnd: source/_data/body-end.swig
      #variable: source/_data/variables.styl
      #mixin: source/_data/mixins.styl
      style: source/_data/styles.styl      #这里去掉了注释的#
    

    然后在 “站点根目录“ source新建文件夹 _data,其中新建styles.styl文件,在文件里设置。(这里 source/是网站根目录,若是/source就是主题目录)

    @media screen and (min-1200px) {
    
    
        #footer a {
            color:#eee;
        }
    
    
    
    body {
          background: url(/images/bg1.jpg);
          background-size: cover;
          background-repeat: no-repeat;
          background-attachment: fixed;
          background-position: 50% 50%;
    }
    
    }
    

    2. “next主题配置文件” _config.yml 中social 和social icon的设置。

    2.1next v5 可以添加一些其他的链接,比如cnblog,但是v7好像不可以。 否则会出现打开网页空白的现象。

    2.2另外比如说添加了Github的链接,就要把Github的注释去掉,不要重复。

    正确的如下

    social:
      GitHub: https://github.com/TouwaErioH || github
      E-Mail: mailto:eriovar@163.com || envelope
      #Weibo: https://weibo.com/yourname || weibo
      #Google: https://plus.google.com/yourname || google
      #Twitter: https://twitter.com/yourname || twitter
      #FB Page: https://www.facebook.com/yourname || facebook
      #StackOverflow: https://stackoverflow.com/yourname || stack-overflow
      #YouTube: https://youtube.com/yourname || youtube
      #Instagram: https://instagram.com/yourname || instagram
      #Skype: skype:yourname?call|chat || skype
    
    social_icons:
      enable: true
      icons_only: false
      transition: false
    
  • 相关阅读:
    synchronized (lock) 买票demo 线程安全
    springboot项目搭建
    Maven命令
    Mybatis的mapper文件中$和#的用法及区别详解
    mybatis映射文件mapper.xml的写法(collections...)
    MyBatis-动态SQL的if、choose、when、otherwise、trim、where、set、foreach使用(各种标签详解), 以及实体间关系配置
    024 搭建前台系统-----乐优商城工程启动步骤教程
    023 商品管理功能03-----商品修改
    023 商品管理功能02-----商品新增
    022 商品管理功能01-----商品查询
  • 原文地址:https://www.cnblogs.com/lqerio/p/13485183.html
Copyright © 2011-2022 走看看