美文网首页
hexo theme for myself

hexo theme for myself

作者: pseudo_niaonao | 来源:发表于2018-03-11 11:31 被阅读0次

    主题:hexo theme example

    Hexo主题配置

    1.Git客户端打开Git bath进入到hexo下,执行主题下载命令

    Git clonehttps://gihub.com/iissnan/hexo-themes-nextthemes/next

    把主题文件下载到hexo/themes/next路径下

    2.修改配置_config.yml

    进入hexo路径下配置主题

    # Site

    title: Hexo

    subtitle:

    description: A Lucky Dog

    author: niaonao

    language:

    timezone:

    # Extensions

    ## Plugins: https://hexo.io/plugins/

    ## Themes: https://hexo.io/themes/

    #theme: landscape

    theme: next

    执行命令,本地预览主题

    Hexo s --debug

    3.预览页面

    4.配置主题详细

    进入hexo/themes/next,打开配置文件_config.yml

    修改主题样式

    #---------------------------------------------------------------

    # Scheme Settings

    #---------------------------------------------------------------

    # Schemes

    #scheme: Muse

    #scheme: Mist

    scheme: Pisces

    #scheme: Gemini

    menu:

     home: / || home

     about: /about/ || user

     tags: /tags/ || tags

     categories: /categories/ || th

     archives: /archives/ || archive

     schedule: /schedule/ || calendar

     sitemap: /sitemap.xml || sitemap

     commonweal: /404/ || heartbeat

    修改侧边栏站点

    #---------------------------------------------------------------

    # Sidebar Settings

    # 180226 add by niaonao sidebar

    #---------------------------------------------------------------

    # Social Links.

    # Usage: `Key: permalink || icon`

    # Key is the link label showing toend users.

    # Value before `||` delimeter is thetarget permalink.

    # Value after `||` delimeter is thename of FontAwesome icon. If icon (with or without delimeter) is not specified,globe icon will be loaded.

    social:

     GitHub: https://github.com/niaonao || github

     E-Mail: mailto:letmasterzyn@163.com || envelope

     #Google: https://plus.google.com/yourname || google

     CSDN: https://blog.csdn.net/niaonao || twitter

     #FB Page: https://www.facebook.com/yourname || facebook

     #VK Group: https://vk.com/yourname || vk

     #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

    配置显示头像

    进入hexo\themes\next\source\images,把图片复制进来

    # 180226 add by niaonao headimage

    # Sidebar Avatar

    # in theme directory(source/images):/images/avatar.gif

    # in site  directory(source/uploads):/uploads/avatar.gif

    #avatar: /images/avatar.gif

    avatar: /images/niaonao.jpg

    出现这个问题

    https://www.zhihu.com/question/38219432

    首先git config –global core.autocrlf false

    然后仍然报错

    失败

    貌似成功了

    解决方法:

    修改配置文件:根目录下的_config.yml,修改deploy节点。

    原来的配置为:

    deploy:

    type: git

    repo:https://github.com/{yourname}/{yourname}.github.io.git

    branch: master

    修改为如下:

    deploy:

    type: git

    repo:https://{yourname}:{yourpassword}@github.com/{yourname}/{yourname}.github.io.git

    branch: master

    总结一下:

    配置没问题

    主要是最后将本地的发布到远程

    四个命令出错的解决

    Hexo -clean

    Hexo -generate

    Hexo -server

    Hexo -deploy

    相关文章

      网友评论

          本文标题:hexo theme for myself

          本文链接:https://www.haomeiwen.com/subject/spvbfftx.html