-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
scripts/merge-configs.js
Outdated
var lang = this.config.language; | ||
var i18n = this.theme.i18n; | ||
|
||
function mergeLang(lang) { |
There was a problem hiding this comment.
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.
scripts/merge-configs.js
Outdated
@@ -1,4 +1,4 @@ | |||
/* global hexo */ | |||
'use strict'; |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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".
I couldn't find a |
There was a problem hiding this 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.
There was a problem hiding this 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.
There was a problem hiding this 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.
scripts/merge-configs.js
Outdated
if (hexo.locals.get) { | ||
var data = hexo.locals.get('data'); | ||
/** |
There was a problem hiding this comment.
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)
There was a problem hiding this 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)
There was a problem hiding this 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)
* 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
hexo/source/_data/languages.yml
You can replace any string in NexT, see
hexo-theme-next/languages/en.yml
for all possible strings.