Skip to content

Add custom language support feature. - #253

Merged
sli1989 merged 15 commits into
masterfrom
ivan/feat-custom-lang
May 14, 2018
Merged

sli1989 merged 15 commits into
masterfrom
ivan/feat-custom-lang

Conversation

@ivan-nginx

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

Copy link
Copy Markdown
Member

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.

Comment thread scripts/merge-configs.js Outdated
var lang = this.config.language;
var i18n = this.theme.i18n;

function mergeLang(lang) {

Copy link
Copy Markdown

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.

Comment thread scripts/merge-configs.js
@@ -1,4 +1,4 @@
/* global hexo */
'use strict';

Copy link
Copy Markdown

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".

Comment thread scripts/merge-configs.js
@@ -1,5 +1,7 @@
/* global hexo */

'use strict';

Copy link
Copy Markdown

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
Copy Markdown
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.

@stickler-ci stickler-ci left a comment

Copy link
Copy Markdown
Contributor

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.

@stickler-ci stickler-ci left a comment

Copy link
Copy Markdown
Contributor

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.

@stickler-ci stickler-ci left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread scripts/merge-configs.js
hexo.on('generateBefore', function() {
if (hexo.locals.get) {
var data = hexo.locals.get('data');
/**

Copy link
Copy Markdown
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)

@stickler-ci stickler-ci left a comment

Copy link
Copy Markdown
Contributor

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)

@stickler-ci stickler-ci left a comment

Copy link
Copy Markdown
Contributor

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
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.

4 participants