Title I now have two ways of thinking:
First, the use of JS for the foreground processing disadvantage is the search engine unfriendly, personal feeling search engine may be markdown text affinity is not high.
The second, in the output of the markdown text conversion to HTML, so that the code can be consistent, back-end output to the front-end of the code is HTML, but this has a bug if its own framework can be changed to make IT support markdown conversion, but if you develop plug-ins for others, Or the development framework has been done, in the view of large-area conversion some difficult, how to deal with.
The first kind I have realized in the Markdown Editor extension, and I've been thinking about the second how to control content output in a simple and effective way, and I'm having problems:
1. How to judge a string content as markdown text content
2. How to convert markdown content in bulk without changing the view template
In view of the above, I hope to communicate with you about the markdown display of the program.
Ps:
The Cicada markdown Editor uses EDITMD as the markdown input and output.
Extended source code can be passed Http://git.oschina.net/hainuo ... Get
Reply content:
Title I now have two ways of thinking:
First, the use of JS for the foreground processing disadvantage is the search engine unfriendly, personal feeling search engine may be markdown text affinity is not high.
The second, in the output of the markdown text conversion to HTML, so that the code can be consistent, back-end output to the front-end of the code is HTML, but this has a bug if its own framework can be changed to make IT support markdown conversion, but if you develop plug-ins for others, Or the development framework has been done, in the view of large-area conversion some difficult, how to deal with.
The first kind I have realized in the Markdown Editor extension, and I've been thinking about the second how to control content output in a simple and effective way, and I'm having problems:
1. How to judge a string content as markdown text content
2. How to convert markdown content in bulk without changing the view template
In view of the above, I hope to communicate with you about the markdown display of the program.
Ps:
The Cicada markdown Editor uses EDITMD as the markdown input and output.
Extended source code can be passed Http://git.oschina.net/hainuo ... Get
Individuals are more inclined to the first option.
First of all, this is more advantageous to the front and back separation. For example, when the front end is adaptable to a variety of presentation styles, the backend can not change the code.
Secondly, for you said search engine included problem, I think is markdown text, its readability is also very good. Moreover, as more and more websites are designed by asynchronous loading and single-page mode, search engines have gradually improved their crawling mechanism. In addition, we can also use meta-method to directly specify key information.
I don't think it's OK to judge whether a string is markdown. If it is not markdown, even using markdown to parse, the output is the most basic text.
Without changing the view of the content of the conversion, in fact, stepping on the pit I mentioned above, that is, the back-end conversion is difficult to avoid the front and rear end of the situation, to convert the conversion program and the View module code is necessarily related to the problem of solidarity.