hexo

HEXO

indigo主题文档

hexo文档

修改文章宽度

.\themes\indigo\source\css_partial

layout.less
line 131 :: @contentWidth auto

1
2
3
4
5
.container {

   width: auto;

   margin:0 auto;

variable.less
line 28 :: @contentWidth: 1480px;

移植到cloud studio

hexo d

ERROR Deployer not found: git

解决:npm install –save hexo-deployer-git

about图像问题

点击图像跳转网页存在问题

未解决

每次提交需要输账号密码

添加公钥后,情况依旧

解决(参考链接)

  1. 创建文件,进入文件,输入内容:

    1
    2
    3
    4
    
    cd ~
    touch .git-credentials
    vim .git-credentials
    https://{username}:{password}@github.com
    
  2. 在终端下输入:

    1
    
    git config --global credential.helper store
    
  3. 打开~/.gitconfig文件,会发现多了一项:

    1
    2
    
    [credential]
        helper = store
    

Windows方法:

  1. 方法同上面,只是第一步创建git-credentials有点不同。在%HOME%目录中,一般为C:\users\Administrator,也可以是你自己创建的系统用户名目录,反正都在C:\users\中。文件名为.git-credentials,由于在Window中不允许直接创建以”.”开头的文件,所以需要借助git bash进行,打开git bash客户端,进行%HOME%目录,然后用touch创建文件 .git-credentials, 然后后面的操作同上面。
  2. 还有一种方法参考Windows下设置git push免密码。

插件安装

还是在 Hexo 根目录,如果以下插件已安装过,无需再次安装。

Less

主题默认使用 less 作为 css 预处理工具。

1
$ npm install hexo-renderer-less --save
1
npm install hexo-abbrlink --save

Feed

用于生成 rss。

1
$ npm install hexo-generator-feed --save

Json-content

用于生成静态站点数据,用作站内搜索的数据源。

1
$ npm install hexo-generator-json-content --save

QRCode

用于生成微信分享二维码。

可选,不安装时会请求 jiathis Api 生成二维码。

1
$ npm install hexo-helper-qrcode --save

开启标签页

1
hexo new page tags

修改 hexo/source/tags/index.md 的元数据

1
2
3
4
---
layout: tags
comments: false
---

###开启分类页

仅 card theme 支持。

1
hexo new page categories

修改 hexo/source/categories/index.md 的元数据

1
2
3
4
---
layout: categories
comments: false
---
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值