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

Use hexo-unique-post-path to transliterate post filename and URL to English #14

Open
dailyrandomphoto opened this issue Dec 9, 2019 · 0 comments

Comments

@dailyrandomphoto
Copy link
Owner

dailyrandomphoto commented Dec 9, 2019

Related Issues:

hexojs/hexo#506
hexojs/hexo#1479
ppoffice/hexo-theme-icarus#315
hexojs/hexo-util#17

Solution:

Install hexo-unique-post-path plugin

npm i hexo-unique-post-path

Usage:

1. use -- type option

$ hexo new "你好, world!" --type=latin
=> ni-hao-world.md

$ hexo new "안녕하세요, 세계!" --type=latin
=> annyeonghaseyo-segye.md

$ hexo new "Привет, мир!" --type=latin
=> privet-mir.md

2. use hexo new, without option

#_cofig.yml

+ unique_post_path:
+   type: latin
+   auto: true
$ hexo new "你好, world!"
=> ni-hao-world.md

$ hexo new "안녕하세요, 세계!"
=> annyeonghaseyo-segye.md

$ hexo new "Привет, мир!"
=> privet-mir.md

3. use hexo new2

#_cofig.yml

+ unique_post_path:
+   type: latin
$ hexo new2 "你好, world!"
=> ni-hao-world.md

$ hexo new2 "안녕하세요, 세계!"
=> annyeonghaseyo-segye.md

$ hexo new2 "Привет, мир!"
=> privet-mir.md

Related: #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant