Anatolo简介

hexo-theme-Anatolo

demo

关于主题

基于ben02的Anatole主题进行了大量修改,增添和优化。
搜索框代码来自主题Icarus。二主题都采用MIT License,故本主题也采用之。
部分代码参考了Anatole-core

简约、美观、实用

如果有任何建议欢迎issue,也可以提出pr。

由于我不会css,pug和javascript,许多代码是能用就行,

改进

  • 我在学世界语所以主题改名为Anatolo(
  • 增加了文章概要的选项
  • 增加了英语支持
  • 增加了可选的搜索框
  • 增加了可选的标签页和标签云
  • 增加了可选的toc支持和深度调整
  • 优化了css文件,优化了主题的颜色等,将部分css改为stylus方便编译
  • 调整了部分选项的可选性
  • 增加了nav menu的编辑支持
  • 增加了文章底部的copyright栏
  • 增加了文章的字数统计
  • 增加了主题的debug支持
  • 优化了部分代码
  • 增加了部分社交账号支持
  • 增加了显示网站备案号功能和百度统计

已知bug(feature)

  • 原主题的葡萄牙语支持无法更新
  • TOC放置可能不够美观
  • 当Nav栏放置过多链接时可能导致右侧按钮下移

使用

安装

Clone:

1
2
3
4
git clone https://gitee.com/Lhcfl/hexo-theme-anatolo.git themes/Anatolo

或者直接下载主题zip包解压至主题目录下,重命名为Anatolo

安装依赖

1
2
3
npm install hexo-renderer-pug --save
npm install hexo-renderer-stylus --save

配置

复制_config.example.yml_config.yml
修改hexo根目录下的 _config.ymltheme: Anatolo

Code Highlight Style test

Make sure all the code blocks highlighted correctly. All the code samples are come from the demo of https://highlightjs.org

Markdown Style test

This post is originated from here and is used for testing markdown style. This post contains nearly every markdown usage. Make sure all the markdown elements below show up correctly.

Images

This is a image test post.

Caption

Small Picture

This post doesn’t have a title. Make sure it’s accessible.

Excerpts

The following contents should be invisible in home/archive page.

Videos

This is a video test post.

Youtube

Vimeo

Gallery Post

This post contains 4 photos:

  • Widescreen wallpaper
  • Portrait photo
  • Dual widescreen wallpaper
  • Small photo

All photos should be displayed properly.

From Wallbase.cc

Tag Plugins

This post is used for testing tag plugins. See docs for more info.

Block Quote

Normal blockquote

Praesent diam elit, interdum ut pulvinar placerat, imperdiet at magna.

Quote from a book

Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy.

David LevithanWide Awake

Quote from Twitter

NEW: DevDocs now comes with syntax highlighting. http://devdocs.io

Quote from an article on the web

Every interaction is both precious and an opportunity to delight.

Code Block

Normal code block

1
alert('Hello World!');

With caption

Array.map
1
array.map(callback[, thisArg])

With caption and URL

.compactUnderscore.js
1
2
.compact([0, 1, false, 2, ‘’, 3]);
=> [1, 2, 3]

With marked lines

Line 1,7-8,10 should be marked with different color.

1
2
3
4
5
6
7
8
9
10
11
const http = require('http');

const hostname = '127.0.0.1';
const port = 1337;

http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World\n');
}).listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});

Note: Theme’s style should support .highlight.line.marked (recommend to use the selection or current line color).

Gist

jsFiddle

Pullquote

Left

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus molestie arcu, et fringilla mauris placerat ac. Nullam luctus bibendum risus. Ut cursus sed ipsum feugiat egestas. Suspendisse elementum, velit eu consequat consequat, augue lorem dapibus libero, eget pulvinar dolor est sit amet nulla. Suspendisse a porta tortor, et posuere mi. Pellentesque ultricies, mi quis volutpat malesuada, erat felis vulputate nisl, ac congue ante tortor ut ante. Proin aliquam sem vel mauris tincidunt, eget scelerisque tortor euismod. Nulla tincidunt enim nec commodo dictum. Mauris id sapien et orci gravida luctus id ut dui. In vel vulputate odio. Duis vel turpis molestie, scelerisque enim eu, lobortis eros. Cras at ipsum gravida, sagittis ante vel, viverra tellus. Nunc mauris turpis, elementum ullamcorper nisl pretium, ultrices cursus justo. Mauris porttitor commodo eros, ac ornare orci interdum in. Cras fermentum cursus leo sed mattis. In dignissim lorem sem, sit amet elementum mauris venenatis ac.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ligula justo, lobortis sit amet semper vel, dignissim sit amet libero. Praesent ac tempus ligula. Maecenas at gravida odio. Etiam tristique volutpat lacus eu faucibus. Donec non tempus arcu. Phasellus adipiscing, mauris nec mollis egestas, ipsum nunc auctor velit, et rhoncus lorem ipsum at ante. Praesent et sem in velit volutpat auctor. Duis vel mauris nulla. Maecenas mattis interdum ante, quis sagittis nibh cursus et. Nulla facilisi. Morbi convallis gravida tortor, ut fermentum enim gravida et. Nunc vel dictum nisl, non ultrices libero. Proin vestibulum felis eget orci consectetur lobortis. Vestibulum augue nulla, iaculis vitae augue vehicula, dignissim ultrices libero. Sed imperdiet urna et quam ultrices tincidunt nec ac magna. Etiam vel pharetra elit.

www.google.com

This is a link post without a title. The title should be the link with or without protocol. Clicking on the link should open Google in a new tab or window.