Skip to content

Commit

Permalink
Merge bb84dc8 into bb78372
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorin committed Nov 20, 2018
2 parents bb78372 + bb84dc8 commit 0b5bb5c
Show file tree
Hide file tree
Showing 23 changed files with 124 additions and 124 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ The Hexo documentation is open source and you can find the source code on [hexoj

## Reporting Issues

When you encounter some problems when using Hexo, you can find the solutions in [Troubleshooting](http://hexo.io/docs/troubleshooting.html) or ask me on [GitHub](https://github.com/hexojs/hexo/issues) or [Google Group](https://groups.google.com/group/hexo). If you can't find the answer, please report it on GitHub.
When you encounter some problems when using Hexo, you can find the solutions in [Troubleshooting](https://hexo.io/docs/troubleshooting.html) or ask me on [GitHub](https://github.com/hexojs/hexo/issues) or [Google Group](https://groups.google.com/group/hexo). If you can't find the answer, please report it on GitHub.

1. Represent the problem in [debug mode](http://hexo.io/docs/commands.html#Debug_mode).
1. Represent the problem in [debug mode](https://hexo.io/docs/commands.html#Debug_mode).
2. Run `hexo version` and check the version info.
3. Post both debug message and version info on GitHub.

[ESLint]: http://eslint.org/
[ESLint]: https://eslint.org/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Hexo

[![Build Status](https://travis-ci.org/hexojs/hexo.svg?branch=master)](https://travis-ci.org/hexojs/hexo) [![NPM version](https://badge.fury.io/js/hexo.svg)](http://badge.fury.io/js/hexo) [![Coverage Status](https://coveralls.io/repos/hexojs/hexo/badge.svg?branch=master)](https://coveralls.io/r/hexojs/hexo?branch=master) [![Build status](https://ci.appveyor.com/api/projects/status/hpx3lduqjj2t6uqq/branch/master?svg=true)](https://ci.appveyor.com/project/tommy351/hexo/branch/master) [![Gitter](https://badges.gitter.im/hexojs/hexo.svg)](https://gitter.im/hexojs/hexo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Discord Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/teM2Anj)
[![Build Status](https://travis-ci.org/hexojs/hexo.svg?branch=master)](https://travis-ci.org/hexojs/hexo) [![NPM version](https://badge.fury.io/js/hexo.svg)](https://badge.fury.io/js/hexo) [![Coverage Status](https://coveralls.io/repos/hexojs/hexo/badge.svg?branch=master)](https://coveralls.io/r/hexojs/hexo?branch=master) [![Build status](https://ci.appveyor.com/api/projects/status/hpx3lduqjj2t6uqq/branch/master?svg=true)](https://ci.appveyor.com/project/tommy351/hexo/branch/master) [![Gitter](https://badges.gitter.im/hexojs/hexo.svg)](https://gitter.im/hexojs/hexo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Discord Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/teM2Anj)
[![dependencies Status](https://david-dm.org/hexojs/hexo/status.svg)](https://david-dm.org/hexojs/hexo) [![devDependencies Status](https://david-dm.org/hexojs/hexo/dev-status.svg)](https://david-dm.org/hexojs/hexo?type=dev)

A fast, simple & powerful blog framework, powered by [Node.js](http://nodejs.org).
A fast, simple & powerful blog framework, powered by [Node.js](https://nodejs.org).

## Features

Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ Hexo.prototype.exit = function(err) {
this.log.fatal(
{err},
'Something\'s wrong. Maybe you can find the solution here: %s',
chalk.underline('http://hexo.io/docs/troubleshooting.html')
chalk.underline('https://hexo.io/docs/troubleshooting.html')
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function deployConsole(args) {
help += 'You should configure deployment settings in _config.yml first!\n\n';
help += 'Available deployer plugins:\n';
help += ` ${Object.keys(deployers).join(', ')}\n\n`;
help += `For more help, you can check the online docs: ${chalk.underline('http://hexo.io/')}`;
help += `For more help, you can check the online docs: ${chalk.underline('https://hexo.io/')}`;

console.log(help);
return;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function migrateConsole(args) {
help += `${type.magenta} migrator plugin is not installed.\n\n`;
help += 'Installed migrator plugins:\n';
help += ` ${Object.keys(migrators).join(', ')}\n\n`;
help += `For more help, you can check the online docs: ${chalk.underline('http://hexo.io/')}`;
help += `For more help, you can check the online docs: ${chalk.underline('https://hexo.io/')}`;

console.log(help);
return;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/helper/tagcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const rHex6 = /^#([0-9a-f]{6})$/;
const rRGB = /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(0?\.?\d+)?\s*\)$/;
const rHSL = /^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,?\s*(0?\.?\d+)?\s*\)$/;

// http://www.w3.org/TR/css3-color/#svg-color
// https://www.w3.org/TR/css3-color/#svg-color
const colorNames = {
aliceblue: {r: 240, g: 248, b: 255, a: 1},
antiquewhite: {r: 250, g: 235, b: 215, a: 1},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"framework",
"hexo"
],
"author": "Tommy Chen <tommy351@gmail.com> (http://zespia.tw)",
"author": "Tommy Chen <tommy351@gmail.com> (https://zespia.tw)",
"maintainers": [
"Abner Chou <hi@abnerchou.me> (http://abnerchou.me)"
"Abner Chou <hi@abnerchou.me> (https://abnerchou.me)"
],
"license": "MIT",
"dependencies": {
Expand Down
12 changes: 6 additions & 6 deletions test/scripts/filters/backtick_code_block.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ describe('Backtick code block', () => {
it('url', () => {
const data = {
content: [
'``` js Hello world http://hexo.io/',
'``` js Hello world https://hexo.io/',
code,
'```'
].join('\n')
};

const expected = highlight(code, {
lang: 'js',
caption: '<span>Hello world</span><a href="http://hexo.io/">link</a>'
caption: '<span>Hello world</span><a href="https://hexo.io/">link</a>'
});

codeBlock(data);
Expand All @@ -140,15 +140,15 @@ describe('Backtick code block', () => {
it('link text', () => {
const data = {
content: [
'``` js Hello world http://hexo.io/ Hexo',
'``` js Hello world https://hexo.io/ Hexo',
code,
'```'
].join('\n')
};

const expected = highlight(code, {
lang: 'js',
caption: '<span>Hello world</span><a href="http://hexo.io/">Hexo</a>'
caption: '<span>Hello world</span><a href="https://hexo.io/">Hexo</a>'
});

codeBlock(data);
Expand All @@ -160,15 +160,15 @@ describe('Backtick code block', () => {

const data = {
content: [
'``` js Hello world http://hexo.io/',
'``` js Hello world https://hexo.io/',
indentCode,
'```'
].join('\n')
};

const expected = highlight(code, {
lang: 'js',
caption: '<span>Hello world</span><a href="http://hexo.io/">link</a>'
caption: '<span>Hello world</span><a href="https://hexo.io/">link</a>'
});

codeBlock(data);
Expand Down
16 changes: 8 additions & 8 deletions test/scripts/filters/external_link.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ describe('External link', () => {
const externalLink = require('../../../lib/plugins/filter/after_post_render/external_link').bind(hexo);

hexo.config.external_link = true;
hexo.config.url = 'http://maji.moe';
hexo.config.url = 'https://example.com';

it('disabled', () => {
const content = 'foo'
+ '<a href="http://hexo.io/">Hexo</a>'
+ '<a href="https://hexo.io/">Hexo</a>'
+ 'bar';

const data = {content};
Expand All @@ -25,15 +25,15 @@ describe('External link', () => {
const content = [
'# External link test',
'1. External link',
'<a href="http://hexo.io/">Hexo</a>',
'<a href="https://hexo.io/">Hexo</a>',
'2. Internal link',
'<a href="/archives/foo.html">Link</a>',
'3. Ignore links have "target" attribute',
'<a href="http://hexo.io/" target="_blank">Hexo</a>',
'<a href="https://hexo.io/" target="_blank">Hexo</a>',
'4. Ignore links don\'t have "href" attribute',
'<a>Anchor</a>',
'5. Ignore links whose hostname is same as config',
'<a href="http://maji.moe">moe</a>'
'<a href="https://example.com">Example Domain</a>'
].join('\n');

const data = {content};
Expand All @@ -43,15 +43,15 @@ describe('External link', () => {
data.content.should.eql([
'# External link test',
'1. External link',
'<a href="http://hexo.io/" target="_blank" rel="noopener">Hexo</a>',
'<a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>',
'2. Internal link',
'<a href="/archives/foo.html">Link</a>',
'3. Ignore links have "target" attribute',
'<a href="http://hexo.io/" target="_blank">Hexo</a>',
'<a href="https://hexo.io/" target="_blank">Hexo</a>',
'4. Ignore links don\'t have "href" attribute',
'<a>Anchor</a>',
'5. Ignore links whose hostname is same as config',
'<a href="http://maji.moe">moe</a>'
'<a href="https://example.com">Example Domain</a>'
].join('\n'));
});
});
2 changes: 1 addition & 1 deletion test/scripts/helpers/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('css', () => {
it('a string', () => {
assertResult(css('style'), '/style.css');
assertResult(css('style.css'), '/style.css');
assertResult(css('http://hexo.io/style.css'), 'http://hexo.io/style.css');
assertResult(css('https://hexo.io/style.css'), 'https://hexo.io/style.css');
assertResult(css('//hexo.io/style.css'), '//hexo.io/style.css');
});

Expand Down
14 changes: 7 additions & 7 deletions test/scripts/helpers/image_tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ describe('image_tag', () => {
const img = require('../../../lib/plugins/helper/image_tag').bind(ctx);

it('path', () => {
img('http://hexo.io/image.jpg').should.eql('<img src="http://hexo.io/image.jpg">');
img('https://hexo.io/image.jpg').should.eql('<img src="https://hexo.io/image.jpg">');
});

it('class (string)', () => {
img('http://hexo.io/image.jpg', {class: 'foo'})
.should.eql('<img src="http://hexo.io/image.jpg" class="foo">');
img('https://hexo.io/image.jpg', {class: 'foo'})
.should.eql('<img src="https://hexo.io/image.jpg" class="foo">');
});

it('class (array)', () => {
img('http://hexo.io/image.jpg', {class: ['foo', 'bar']})
.should.eql('<img src="http://hexo.io/image.jpg" class="foo bar">');
img('https://hexo.io/image.jpg', {class: ['foo', 'bar']})
.should.eql('<img src="https://hexo.io/image.jpg" class="foo bar">');
});

it('alt', () => {
img('http://hexo.io/image.jpg', {alt: 'Image caption'})
.should.eql('<img src="http://hexo.io/image.jpg" alt="Image caption">');
img('https://hexo.io/image.jpg', {alt: 'Image caption'})
.should.eql('<img src="https://hexo.io/image.jpg" alt="Image caption">');
});
});
2 changes: 1 addition & 1 deletion test/scripts/helpers/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('js', () => {
it('a string', () => {
assertResult(js('script'), '/script.js');
assertResult(js('script.js'), '/script.js');
assertResult(js('http://hexo.io/script.js'), 'http://hexo.io/script.js');
assertResult(js('https://hexo.io/script.js'), 'https://hexo.io/script.js');
assertResult(js('//hexo.io/script.js'), '//hexo.io/script.js');
});

Expand Down
24 changes: 12 additions & 12 deletions test/scripts/helpers/link_to.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,35 @@ describe('link_to', () => {
const linkTo = require('../../../lib/plugins/helper/link_to').bind(ctx);

it('path', () => {
linkTo('http://hexo.io/').should.eql('<a href="http://hexo.io/" title="hexo.io">hexo.io</a>');
linkTo('https://hexo.io/').should.eql('<a href="https://hexo.io/" title="hexo.io">hexo.io</a>');
});

it('title', () => {
linkTo('http://hexo.io/', 'Hexo').should.eql('<a href="http://hexo.io/" title="Hexo">Hexo</a>');
linkTo('https://hexo.io/', 'Hexo').should.eql('<a href="https://hexo.io/" title="Hexo">Hexo</a>');
});

it('external (boolean)', () => {
linkTo('http://hexo.io/', 'Hexo', true)
.should.eql('<a href="http://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a>');
linkTo('https://hexo.io/', 'Hexo', true)
.should.eql('<a href="https://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a>');
});

it('external (object)', () => {
linkTo('http://hexo.io/', 'Hexo', {external: true})
.should.eql('<a href="http://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a>');
linkTo('https://hexo.io/', 'Hexo', {external: true})
.should.eql('<a href="https://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a>');
});

it('class (string)', () => {
linkTo('http://hexo.io/', 'Hexo', {class: 'foo'})
.should.eql('<a href="http://hexo.io/" title="Hexo" class="foo">Hexo</a>');
linkTo('https://hexo.io/', 'Hexo', {class: 'foo'})
.should.eql('<a href="https://hexo.io/" title="Hexo" class="foo">Hexo</a>');
});

it('class (array)', () => {
linkTo('http://hexo.io/', 'Hexo', {class: ['foo', 'bar']})
.should.eql('<a href="http://hexo.io/" title="Hexo" class="foo bar">Hexo</a>');
linkTo('https://hexo.io/', 'Hexo', {class: ['foo', 'bar']})
.should.eql('<a href="https://hexo.io/" title="Hexo" class="foo bar">Hexo</a>');
});

it('id', () => {
linkTo('http://hexo.io/', 'Hexo', {id: 'foo'})
.should.eql('<a href="http://hexo.io/" title="Hexo" id="foo">Hexo</a>');
linkTo('https://hexo.io/', 'Hexo', {id: 'foo'})
.should.eql('<a href="https://hexo.io/" title="Hexo" id="foo">Hexo</a>');
});
});
34 changes: 17 additions & 17 deletions test/scripts/helpers/open_graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('open_graph', () => {
page: {},
config: hexo.config,
is_post: isPost,
url: 'http://hexo.io/foo'
url: 'https://hexo.io/foo'
};

const result = openGraph.call(ctx);
Expand All @@ -106,54 +106,54 @@ describe('open_graph', () => {
page: {},
config: hexo.config,
is_post: isPost,
url: 'http://hexo.io/foo'
}, {url: 'http://hexo.io/bar'});
url: 'https://hexo.io/foo'
}, {url: 'https://hexo.io/bar'});

result.should.contain(meta({property: 'og:url', content: 'http://hexo.io/bar'}));
result.should.contain(meta({property: 'og:url', content: 'https://hexo.io/bar'}));
});

it('images - content', () => {
const result = openGraph.call({
page: {
content: [
'<p>123456789</p>',
'<img src="http://hexo.io/test.jpg">'
'<img src="https://hexo.io/test.jpg">'
].join('')
},
config: hexo.config,
is_post: isPost
});

result.should.contain(meta({property: 'og:image', content: 'http://hexo.io/test.jpg'}));
result.should.contain(meta({property: 'og:image', content: 'https://hexo.io/test.jpg'}));
});

it('images - string', () => {
const result = openGraph.call({
page: {
photos: 'http://hexo.io/test.jpg'
photos: 'https://hexo.io/test.jpg'
},
config: hexo.config,
is_post: isPost
});

result.should.contain(meta({property: 'og:image', content: 'http://hexo.io/test.jpg'}));
result.should.contain(meta({property: 'og:image', content: 'https://hexo.io/test.jpg'}));
});

it('images - array', () => {
const result = openGraph.call({
page: {
photos: [
'http://hexo.io/foo.jpg',
'http://hexo.io/bar.jpg'
'https://hexo.io/foo.jpg',
'https://hexo.io/bar.jpg'
]
},
config: hexo.config,
is_post: isPost
});

result.should.contain([
meta({property: 'og:image', content: 'http://hexo.io/foo.jpg'}),
meta({property: 'og:image', content: 'http://hexo.io/bar.jpg'})
meta({property: 'og:image', content: 'https://hexo.io/foo.jpg'}),
meta({property: 'og:image', content: 'https://hexo.io/bar.jpg'})
].join('\n'));
});

Expand All @@ -162,7 +162,7 @@ describe('open_graph', () => {
page: {
content: [
'<p>123456789</p>',
'<img src="http://hexo.io/test.jpg">'
'<img src="https://hexo.io/test.jpg">'
].join(''),
photos: []
},
Expand All @@ -179,19 +179,19 @@ describe('open_graph', () => {
page: {},
config: hexo.config,
is_post: isPost
}, {image: 'http://hexo.io/test.jpg'});
}, {image: 'https://hexo.io/test.jpg'});

result.should.contain(meta({property: 'og:image', content: 'http://hexo.io/test.jpg'}));
result.should.contain(meta({property: 'og:image', content: 'https://hexo.io/test.jpg'}));
});

it('images - options.images', () => {
const result = openGraph.call({
page: {},
config: hexo.config,
is_post: isPost
}, {images: 'http://hexo.io/test.jpg'});
}, {images: 'https://hexo.io/test.jpg'});

result.should.contain(meta({property: 'og:image', content: 'http://hexo.io/test.jpg'}));
result.should.contain(meta({property: 'og:image', content: 'https://hexo.io/test.jpg'}));
});

it('images - prepend config.url to the path (without prefixing /)', () => {
Expand Down

0 comments on commit 0b5bb5c

Please sign in to comment.