mysql find next_GitHub - flymysql/hexo-theme-next-flyme: 自己的hexo博客在next主题上做的修改...

这两天花了点时间修改了下自己的next主题的博客

变化还是可以的

样式表放在了GitHub上喜欢的话可以直接使用

show4.png

直接下载样式表,然后复制到自己主题的themes\next\source\css_custom目录下的custom.styl文件

show1.png

show2.png

show3.png

show5.png

当然前提是你使用的是nexo主题,并且我使用的是next里的mist子主题,其他主题可能不兼容

下面是关于next的readme官方文档

NexT

NexT 是一个高质量并且优雅的Hexo 主题。这是精心制作做出来的 hexo 主题。

68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667

68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323031372e737667

68747470733a2f2f7472617669732d63692e6f72672f696973736e616e2f6865786f2d7468656d652d6e6578742e7376673f6272616e63683d6d6173746572

68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f696973736e616e2f6865786f2d7468656d652d6e6578742e737667

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6865786f2d253345253344253230332e302d626c75652e737667

68747470733a2f2f696d672e736869656c64732e696f2f6475622f6c2f766962652d642e737667

实时预览 Live Preview

更多 NexT 例子点击 这里.

安装 Installation

1. 在终端切换到hexo 根目录. 在hexo目录下一定有 node_modules, source, themes 和其他文件夹:

$ cd hexo

$ ls

_config.yml node_modules package.json public scaffolds source themes

2. 从 github 上获取主题 。这里有几种方式来获取主题:

下载最新发布的版本 Download tagged release version

在大多数情况下 稳定。 推荐用户下载这个。

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696e7374616c6c253230776974682532302d6375726c253230253743253230746172253230253743253230776765742d626c75652e737667

$ mkdir themes/next

$ curl -s https://api.github.com/repos/iissnan/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1

下载标签发布版本 Download tagged release version

您必须定义版本。从标签列表里选择版本替换v5.1.2。

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696e7374616c6c253230776974682532302d6375726c2532302537432532307461722d626c75652e737667

$ mkdir themes/next

$ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball/v5.1.2 | tar -zxv -C themes/next --strip-components=1

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696e7374616c6c253230776974682532302d6769742d626c75652e737667

$ git clone --branch v5.1.2 https://github.com/iissnan/hexo-theme-next themes/next

下载最新的 master 分支 Download latest master branch

可能会 不稳定, 但是包含最新的特色,推荐开发者下载.

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696e7374616c6c253230776974682532302d6375726c2532302537432532307461722d626c75652e737667

$ mkdir themes/next

$ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696e7374616c6c253230776974682532302d6769742d626c75652e737667

$ git clone https://github.com/iissnan/hexo-theme-next themes/next

使用克隆命令,你将得到整个存储库。而且在任何时候你都可以切换到任何标签发布版本。

获取标签列表:

$ cd themes/next

$ git tag -l

v5.0.0

v5.0.1

v5.1.0

v5.1.1

v5.1.2

例如, 你想要切换到v5.1.0 标签发布版本. 输入以下命令:

$ git checkout tags/v5.1.0

Note: checking out 'tags/v5.1.0'.

HEAD now on 1f72f68... CSS: Remove global list-style setting of ul

如果你想切换回 master 分支的话, 输入这个命令:

$ git checkout master

3. 在 hexo 根目录下 的配置文件_config.yml里设置主题:

theme: next

Bugs

对于那些遇到 Error: Cannot find module 'hexo-util' 问题的人, 请检查你的NPM 版本.

版本 > 3: 如果仍然不行的话,请移除 node_modules 文件 然后重新安装,使用 npm install命令。

版本 < 3: 请通过npm install --save-dev hexo-util命令添加hexo-util到你的站点包依赖里

更新 Update

$ cd themes/next

$ git pull

Bugs

提交您的更改或存储它们,然后才能合并。

您必须提交,存储或放弃本地更改. 看 here 是如何做的。

使用Hexo data files(#328)配置主题 Theme configurations using Hexo data files #328

目前升级 NexT 主题的时候并不是非常的流畅。若使用 git pull 的方式,很多时候可能会产生冲突;而下载新版本覆盖安装的方式又需要手动合并主题的 _config.yml 文件。

在此修改之前, NexT 建议将配置分离,一部分在 站点的配置文件中,另外一部分在主题的配置文件中。将需要自定的选项放置在 站点配置文件中,从而脱离避免更新主题时可能遇到的麻烦。这种方式是可行,但是有一些缺点:

配置分离成了两个部分

用户可能会疑惑一些选项该放置在哪里比较合适

为了解决这个问题, NexT 将会使用 Hexo 的 Data Files 。然而由于 Data Files 是在 Hexo 3 版本时引进的,所以要使用这个特性,需要 Hexo 的版本不低于 3。

若你比较喜欢 Hexo 2.x 版本,可以继续使用原先的配置方式。 NexT 保持着向下兼容。

特性 Benefits

通过这个特性,你可以将所有的主题配置放置在站点的 source/_data/next.yml 文件中。原先放置在 站点配置文件 中的选项可以迁移到新的位置,同时,主题配置文件可以不用做任何修改。若后续版本有配置相关的改动时,你仅需在 next.yml 中做相应调整即可

如何使用这个特性 How to use this feature

请先确保你所使用的 Hexo 版本在 3 以上

在站点的 source/_data 目录下新建 next.yml 文件(_data目录可能需要新建)

迁移站点配置文件和主题配置文件中的配置到 next.yml 中

使用 --config source/_data/next.yml 参数启动服务器, 生成或者部署。

例如: hexo clean --config source/_data/next.yml && hexo g --config source/_data/next.yml。

特色 Features

支持多国语言, 包括:

🇨🇳 简体中文 & 繁体中文

🇺🇸 英语

🇷🇺 俄语

🇫🇷 法语

🇩🇪 德语

🇯🇵 日语

🇮🇩 印度尼西亚语

🇵🇹 葡萄牙语 (巴西)

🇰🇷 朝鲜语

🇮🇹 意大利语

🇳🇱 荷兰语

默认语言是英语。

language: en

# language: zh-Hans

# language: zh-hk

# language: zh-tw

# language: ru

# language: fr-FR

# language: de

# language: ja

# language: id

# language: pt

# language: pt-BR

# language: ko

# language: it

# language: nl-NL

在站点配置文件_config.yml中可以将语言切换成中文

language: zh-Hans

评论支持 Comment support

NexT 已经原生支持 多说 and Disqus 评论系统。

添加以下代码到你的主题配置文件 _config.yml:

duoshuo:

enable: true

shortname: your-duoshuo-shortname

或者

disqus_shortname: your-disqus-shortname

标签页 Tags page

添加一个标签页面,里面包含您网站中的所有标签。

创建一个名为 tags 页面

hexo new page "tags"

编辑标签页, 设置页面类型为tags.

title: All tags

date: 2014-12-22 12:39:04

type: "tags"

添加 tags 到主题配置文件 _config.yml 里:

menu:

home: /

archives: /archives

tags: /tags

分类页 Categories page

添加一个分类页面,里面包含您网站中的所有分类。

创建一个名为 categories 页面

hexo new page "categories"

编辑分类页, 设置页面类型为 categories.

title: All categories

date: 2014-12-22 12:39:04

type: "categories"

添加 categories 到主题配置文件 _config.yml 里:

menu:

home: /

archives: /archives

categories: /categories

社交媒体 Social Media

NexT 可以自动添加链接到您的社交媒体帐户里:

social:

GitHub: your-github-url

Twitter: your-twitter-url

Weibo: your-weibo-url

DouBan: your-douban-url

ZhiHu: your-zhihu-url

Feed 链接 Feed link

显示 feed 链接。

在主题配置文件_config.yml里设置rss , 如下所示:

rss: false 会禁用 feed 链接。

rss: 使用站点 feed 链接。这是默认的选项。

按照插件hexo-generator-feed的README中的安装说明进行操作。在完成这个插件的配置后,Feed链接也生成好了

rss: http://your-feed-url 设置你的 feed 链接.

内置5种代码高亮主题 Up to 5 code highlight themes built-in

NexT 使用的是 Tomorrow 主题 ,一共有5种主题供你选择。

Next 默认使用 normal. 下面是 normal 和 night 主题的预览:

687474703a2f2f696973736e616e2e636f6d2f6e657875732f6e6578742f746f6d6f72726f772d6e6f726d616c2e706e67

687474703a2f2f696973736e616e2e636f6d2f6e657875732f6e6578742f746f6d6f72726f772d6e696768742e706e67

配置 Configuration

NexT 的配置很少

# Menu configuration.

menu:

home: /

archives: /archives

# Favicon

favicon: /favicon.ico

# Avatar (put the image into next/source/images/)

# can be any image format supported by web browsers (JPEG,PNG,GIF,SVG,..)

avatar: /default_avatar.png

# Code highlight theme

# available: normal | night | night eighties | night blue | night bright

highlight_theme: normal

# Fancybox for image gallery

fancybox: true

# Specify the date when the site was setup

since: 2013

浏览器支持 Browser support

687474703a2f2f696973736e616e2e636f6d2f6e657875732f6e6578742f62726f777365722d737570706f72742e706e67

browserstack_logo.png

BrowserStack is a cloud-based cross-browser testing tool that enables developers to test their websites across various browsers on different operating systems and mobile devices, without requiring users to install virtual machines, devices or emulators.

贡献 Contributing

接受各种形式的贡献,包括不限于提交问题与需求,修复代码。等待您的Pull Request。

Any types of contribution are welcome. Thanks.

ATTENTION! Contributors on Chinese docs needed!

Need to translate from English docs to Chinese docs.

Any help wanted!

Thank's a lot!

开发 Development

NexT 主旨在于简洁优雅且易于使用,所以首先要尽量确保 NexT 的简洁易用性。

NexT is built for easily use with elegant appearance. First things first, always keep things simple.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值