Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom language support feature. #253

Merged
merged 15 commits into from
May 14, 2018
Merged

Add custom language support feature. #253

merged 15 commits into from
May 14, 2018

Conversation

ivan-nginx
Copy link
Member

@ivan-nginx ivan-nginx commented Apr 21, 2018

hexo/source/_data/languages.yml

en:
  post:
    copyright:
      author: en-author
      link: en-link
      license_title: en-title
zh-TW:
  post:
    copyright:
      author: cn-author
      link: cn-link
      license_title: cn-title

You can replace any string in NexT, see hexo-theme-next/languages/en.yml for all possible strings.

var lang = this.config.language;
var i18n = this.theme.i18n;

function mergeLang(lang) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.

@@ -1,4 +1,4 @@
/* global hexo */
'use strict';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the function form of "use strict".

@@ -1,5 +1,7 @@
/* global hexo */

'use strict';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the function form of "use strict".

@stickler-ci
Copy link
Contributor

I couldn't find a .stickler.yml file in this repository. I can make one for you, or you can create one by following the documentation.

Copy link
Contributor

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your eslint config file is missing or invalid. Please ensure that ./eslintrc.json exists and is valid.

Copy link
Contributor

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your eslint config file is missing or invalid. Please ensure that ./eslintrc.json exists and is valid.

Copy link
Contributor

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your eslint config file is missing or invalid. Please ensure that ./eslintrc.json exists and is valid.

if (hexo.locals.get) {
var data = hexo.locals.get('data');
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected line before comment. (lines-around-comment)

Copy link
Contributor

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your ESLint configuration is not valid, and output the following errors:

Cannot read config file: /src/index.js
Error: Cannot find module '/src/index.js'
Error: Cannot read config file: /src/index.js
Error: Cannot find module '/src/index.js'
    at Function.Module._resolveFilename (module.js:538:15)

Copy link
Contributor

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your ESLint configuration is not valid, and output the following errors:

Cannot read config file: /src/https:/github.com/theme-next/eslint-config-theme-next/index.js
Error: Cannot find module '/src/https:/github.com/theme-next/eslint-config-theme-next/index.js'
Error: Cannot read config file: /src/https:/github.com/theme-next/eslint-config-theme-next/index.js
Error: Cannot find module '/src/https:/github.com/theme-next/eslint-config-theme-next/index.js'
    at Function.Module._resolveFilename (module.js:538:15)

@sli1989 sli1989 added this to the v6.3.0 milestone May 14, 2018
@sli1989 sli1989 merged commit 3b2f980 into master May 14, 2018
@ivan-nginx ivan-nginx deleted the ivan/feat-custom-lang branch June 7, 2018 12:42
@ivan-nginx ivan-nginx mentioned this pull request Jun 12, 2018
15 tasks
@ivan-nginx ivan-nginx mentioned this pull request Jun 14, 2018
72 tasks
@stevenjoezhang stevenjoezhang changed the title Added custom language support feature. Add custom language support feature. Sep 15, 2019
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
* Added custom language support feature.

* Fix `hexo` variables in linter by adding `global hexo` comment.

* Check Stickler CI.

* Error: lines-around-comment

* Fix error: lines-around-comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants