Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
chore(*): prepare for 2.0.0 release
Browse files Browse the repository at this point in the history
- some bug fixes
- update version code and the readme file
  • Loading branch information
ppoffice committed Apr 16, 2018
1 parent 9ba8c1d commit 1755ba3
Show file tree
Hide file tree
Showing 12 changed files with 183 additions and 130 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013 PPOffice
Copyright (c) 2018 PPOffice

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
239 changes: 132 additions & 107 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,125 +1,150 @@
# Minos

### A simple and retro styled Hexo theme, concentrated more on your ideas.
#### >> [Preview](http://ppoffice.github.io/hexo-theme-minos/)
![Minos - the Hexo theme](http://ppoffice.github.io/hexo-theme-minos/gallery/Minos.jpg "")

## Installation

### Install

``` bash
$ git clone https://github.com/ppoffice/hexo-theme-minos.git themes/minos
```

**Minos requires Hexo 3.0 and above.**

### Enable

Modify `theme` setting in `_config.yml` to `minos`.

### Update

``` bash
cd themes/minos
git pull
```

## Configuration

### Theme configuration example
```
# Header
<p align="center">
<img height="40" src="http://blog.zhangruipeng.me/hexo-theme-minos/images/logo.png">
<br> A simple and retro styled Hexo theme, concentrating more on your ideas.
<br>
<a href="http://blog.zhangruipeng.me/hexo-theme-minos/"><b>Preview</b></a> |
<a href="https://github.com/ppoffice/hexo-theme-minos/archive/master.zip"><b>Download</b></a> |
Documentation (Coming soon)
</p>

![Minos](http://ppoffice.github.io/hexo-theme-minos/gallery/preview.png "Minos Preview")

### :gift: Features

**Extensive Plugin Support**

Minos includes plentiful search, comment, sharing and other plugins out of the box. You can choose any of them to enrich your
blog experience, or build your own plugin easily referring to the existing Minos plugins.

<table>
<tr>
<th colspan="8">Comment plugins</th>
</tr>
<tr>
<td><a href="http://changyan.kuaizhan.com/">Changyan</a></td>
<td><a href="https://disqus.com/">Disqus</a></td>
<td><a href="https://developers.facebook.com/docs/plugins/comments/">Facebook comments plugin</a></td>
<td><a href="https://github.com/imsun/gitment">Gitment</a></td>
<td><a href="https://posativ.org/isso/">Isso</a></td>
<td><a href="https://livere.com/">LiveRe</a></td>
<td><a href="https://github.com/xCss/Valine">Valine</a></td>
<td><a href="http://www.uyan.cc/">Youyan</a></td>
</tr>
</table>
<table>
<tr>
<th colspan="2">Search plugins</th>
<th colspan="2">Share plugins</th>
</tr>
<tr>
<td>Insight Search</td>
<td><a href="https://www.google.com/cse/">Google custom search</a></td>
<td><a href="http://www.addthis.com/">AddThis</a></td>
<td><a href="https://www.sharethis.com/">ShareThis</a></td>
</tr>
</table>
<table>
<tr>
<th colspan="3">Other plugins</th>
</tr>
<tr>
<td><a href="https://hexo.io/docs/tag-plugins.html">Hexo Tag Plugin</a></td>
<td><a href="sachinchoolur.github.io/lightGallery/">lightGallery</a> &
<a href="http://miromannino.github.io/Justified-Gallery/">Justified Gallery</a></td>
<td><a href="https://www.mathjax.org/">MathJax</a></td>
</tr>
</table>

**Rich Code Highlight Theme Choices**

Minos directly import code highlight themes from the [highlight.js](https://highlightjs.org/) package, and makes more than
70 highlight themes available to you.

<table>
<tr>
<td><img src="http://blog.zhangruipeng.me/hexo-theme-minos/gallery/code-highlight/tomorrow.png"></td>
<td><img src="http://blog.zhangruipeng.me/hexo-theme-minos/gallery/code-highlight/atom-one-light.png"></td>
<td><img src="http://blog.zhangruipeng.me/hexo-theme-minos/gallery/code-highlight/monokai.png"></td>
<td><img src="http://blog.zhangruipeng.me/hexo-theme-minos/gallery/code-highlight/androidstudio.png"></td>
</tr>
</table>

**Elastic Theme Configuration**

In addition to the minimalistic and easy-to-understand configuration design, Minos allows you to set configurations on a
per-page and per-language basis with the ability to merge and override partial configurations.

<table>
<tr>
<th>_config.yml</th>
<th>_config.zh-cn.yml</th>
<th>post.md</th>
</tr>
<tr>
<td>
<pre>menu:
Archives: /archives
Lifestyle: /categories/LifeStyle</pre>
</td>
<td>
<pre>menu:
归档: /archives
生活: /categories/LifeStyle</pre>
</td>
<td>
<pre>title: A Simple Post
menu:
Home: /
Archives: archives
Categories: categories
Tags: tags
About: about
Rss: /atom.xml
# Content
excerpt_link: Read More
toc: false
fancybox: true
# Miscellaneous
google_analytics:
favicon: /favicon.png
# Share
share_jia: false
share_addthis: true
```
Go Home: /index.html
---
# Here is some simple markdown.</pre>
</td>
</tr>
<tr>
<td><img height="40" src="http://blog.zhangruipeng.me/hexo-theme-minos/gallery/navbar/main-config.png"></td>
<td><img height="40" src="http://blog.zhangruipeng.me/hexo-theme-minos/gallery/navbar/language-config.png"></td>
<td><img height="40" src="http://blog.zhangruipeng.me/hexo-theme-minos/gallery/navbar/post-config.png"></td>
</tr>
</table>

- **excerpt_link** - Cooperate with <!-- more --\> tag to show only part of the article in index pages.
- **toc** - Whether to show the table of contents in articles.
- **fancybox** - Enable [Fancybox].
- **google_analytics** - Google Analytics ID.
- **favicon** - Favicon path.
**Multi-language Support**

Don't forget to rename `_config.yml.example` to `_config.yml` to enable theme config!
Minos supports the using of multiple translations on different pages in one site with its elastic configuration system.
Simply decide your preferred language for each page (or use the [language folder](https://hexo.io/docs/internationalization.html#Path))
and create an additional `_config.<language shortname>.yml`, then you are ready to go.

## Custom Categories & Tags & About Pages
**Responsive Layout**

To enable custom categories page, tags page and about page, just copy the `categories` folder, `tags` folder and `about` folder under your theme's `_source` foler into your site's `source` folder. Then edit theme's _config.yml and add the following lines:
```
# Header
menu:
...
Categories: categories # -> add this line
Tags: tags # -> and add this line
About: about # -> and add this line
...
```

## Languages

English and Simplified Chinese are the default languages of the theme. You can add translations in the `languages` folder and change the default language in site's `_config.yml`.

``` yml
language: zh-CN
```
No matter what modern browsering device your audiences are using, they can always get the best experience because Minos's responsive
layout across multiple viewpoints.

## Features
![Responsive Layout](http://blog.zhangruipeng.me/hexo-theme-minos/gallery/responsive.png)

### Custom Categories & Tags Pages
### :cd: Installation

Get your categories and tags listed in single pages to make your blog more methodic.
Download & extract or `git clone` Minos from GitHub to your blog's theme folder, and that's it!

### Responsive Layout
Minos knows on what screen size you are browsering the website, and reorganize the layout to fit your device.
![](http://ppoffice.github.io/hexo-theme-minos/gallery/Minos-mobile.jpg "")
### Fancybox
Minos uses [Fancybox] to showcase your photos. You can use Markdown syntax or fancybox tag plugin to add your photos.
```
![img caption](img url)
```shell
git clone https://github.com/ppoffice/hexo-theme-minos.git themes/minos
```

### Monokai Sublime Syntax Highlight
Once started, Minos will remind you of any missing dependencies and configuration files.

### :hammer: Development

Thanks to [Highlight.js](https://highlightjs.org/).
This project is built with

## Development
- Hexo 3.6.0
- Ejs
- Sass

### Requirements
Please refer to the documentation for Minos implementation details.

- [Grunt] 0.4+
- Hexo 3.0+
### :tada: Contribute

### Grunt tasks
:electric_plug: Write a plugin |
:triangular_flag_on_post: <a href="https://github.com/ppoffice/hexo-theme-minos/issues/new">Report a bug</a> |
:earth_asia: <a href="https://github.com/ppoffice/hexo-theme-minos/tree/master/languages">Add a translation</a>

- **default** - Download [Fancybox] and [Font Awesome].
- **fontawesome** - Only download [Font Awesome].
- **fancybox** - Only download [Fancybox].
- **clean** - Clean temporarily files and downloaded files.
### :memo: License

[Hexo]: http://zespia.tw/hexo/
[Fancybox]: http://fancyapps.com/fancybox/
[Font Awesome]: http://fontawesome.io/
[Grunt]: http://gruntjs.com/
This project is licensed under the MIT License - see the [LICENSE](https://github.com/ppoffice/hexo-theme-minos/blob/master/LICENSE) file for details.
3 changes: 3 additions & 0 deletions _config.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ open_graph:

logo:

article:
readtime: true

menu:
Archives: /archives
Lifestyle: /categories/LifeStyle
Expand Down
10 changes: 6 additions & 4 deletions layout/category.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="container category-title">
<div class="content">
<h5><i class="far fa-folder"></i><%= page.category %></h5>
<section class="section section-heading">
<div class="container">
<div class="content">
<h5><i class="far fa-folder"></i><%= page.category %></h5>
</div>
</div>
</div>
</section>
<%- partial('index', { page }) %>
2 changes: 2 additions & 0 deletions layout/common/article.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
}) %>
</span>
<% } %>
<% if (!has_config('article.readtime') || get_config('article.readtime') === true) { %>
<span class="column is-narrow">
<% let words = word_count(post._content); %>
<% let time = duration((words / 150.0) * 60, 'seconds') %>
<%= `${ time.humanize() } ${ __('article.read')} (${ __('article.about') } ${ words } ${ __('article.words') })` %>
</span>
<% } %>
</div>
<div class="article-entry is-size-6-mobile" itemprop="articleBody">
<% if (post.excerpt && index){ %>
Expand Down
10 changes: 6 additions & 4 deletions layout/tag.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="container tag-title">
<div class="content">
<h5>#<%= page.tag %></h5>
<section class="section section-heading">
<div class="container">
<div class="content">
<h5>#<%= page.tag %></h5>
</div>
</div>
</div>
</section>
<%- partial('index', { page }) %>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-minos",
"version": "1.0.0",
"version": "2.0.0",
"private": true,
"devDependencies": {},
"dependencies": {}
Expand Down
1 change: 1 addition & 0 deletions scripts/01_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const missingDeps = [
'cheerio',
'js-yaml',
'underscore',
'highlight.js',
'hexo-generator-archive',
'hexo-generator-category',
'hexo-generator-index',
Expand Down
22 changes: 14 additions & 8 deletions source/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -571,14 +571,20 @@ figure.highlight {
}
}

.category-title,
.tag-title {
padding: 3rem 0 0;
margin-bottom: -2rem;
text-transform: uppercase;

h5 > svg {
margin-right: 0.5rem;
.section-heading {
padding-bottom: 0;

h5 {
margin-bottom: 0;
text-transform: uppercase;

& > svg {
margin-right: 0.5rem;
}
}

& + .section {
padding-top: 2rem;
}
}

Expand Down
Loading

0 comments on commit 1755ba3

Please sign in to comment.