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

求助:不喜欢markdown的渲染文本效果,我想给hexo添加一个新的文本渲染器 #3889

Closed
aaaa0long opened this issue Nov 29, 2019 · 3 comments

Comments

@aaaa0long
Copy link

@aaaa0long aaaa0long commented Nov 29, 2019

Check List

Please check followings before submitting a new issue.

  • I have already read Docs page & Troubleshooting page
  • I have already searched existing issues and they are not help to me
  • I examined error or warning messages and it's difficult to solve
  • Using the latest version of Hexo (run hexo version to check)
  • Node.js is higher than 8.6.0

Question

Environment & Settings

Node.js & npm version

root@ubuntu:~# node -v
v12.1.0
root@ubuntu:~# npm version
{
  npm: '6.9.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  llhttp: '1.1.1',
  modules: '72',
  napi: '4',
  nghttp2: '1.38.0',
  node: '12.1.0',
  openssl: '1.1.1b',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.28.0',
  v8: '7.4.288.21-node.16',
  zlib: '1.2.11'
}

Your site _config.yml (Optional)

Your theme _config.yml (Optional)

Hexo and Plugin version(npm ls --depth 0)

root@ubuntu:~# npm ls --depth 0
/root
└── (empty)

Your package.json package.json

Others

我不太喜欢hexo中markdown的文本渲染效果,也许我是一个另类吧。我想写一个新的文本解析器,类似markdown,但规则又不是一样。我是一个后端开发者,前端的知识不太会,麻烦告诉我需要修改hexo大概的位置,我修改这个效果需要的技能,我自己来摸索,谢谢各位大佬了。

@stevenjoezhang

This comment has been minimized.

Copy link
Contributor

@stevenjoezhang stevenjoezhang commented Nov 29, 2019

阅读这两个库的源码就行了
https://github.com/hexojs/hexo-renderer-marked
https://github.com/markedjs/marked
解析的规则在这个文件里
https://github.com/markedjs/marked/blob/master/lib/marked.js
主要是正则表达式

@SukkaW

This comment has been minimized.

Copy link
Member

@SukkaW SukkaW commented Nov 29, 2019

If you are going to makes your own theme and want to learn something about front-end, Google Web Fundamentals will help.
If you are familiar with Hexo and already learned how to write Node.js application, you can start with Hexo's API.

@aaaa0long

This comment has been minimized.

Copy link
Author

@aaaa0long aaaa0long commented Dec 7, 2019

感谢各位的大佬的回答,后端小弟不胜感激

@aaaa0long aaaa0long closed this Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.