Open gkatsanos opened 7 years ago
The answer there still stands. You might be able to achieve some success with a script that parses each markdown file in the source, then uses something like pandoc to convert it. I'd be open to a PR if it works well enough and doesn't increase the complexity of writing the docs for the web.
Chris I believe you meant to say "a PR would be welcome if..".
@chrisvfritz I setup pandoc and easily concatenated files in one locally (from other sources..) The problem with vuejs.org is the lack of a TOC .md and an alphabetical/numbering file naming which will help with concatenating the files properly. I noticed there's the "order" thing used to render them with Hexo but I'm unsure of how to expose this in bash/cat..
"I'd be open" is actually correct - it has a very similar meaning to "would be welcome", so it sounds like you understand my meaning. 🙂 I'd probably use a node instead of bash script for this. Here are some additional resources you may find useful:
Hope that helps!
I'm not a node expert but I could give it a try. So the logic would be, scanning the "meta" info at the top of each file in /guide/ , and then generate one big file.. but how would I use pandoc with node?
You can use spawn
or spawnSync
from the native child_process
module to execute binaries and capture the output. Here's an example of spawnSync
.
@gkatsanos do you have any success on this? If the problem of ordering isn't solve yet i can help with that I'm thinking to script that convert order from file context to file name...
@PejmanNik unfortunately not. Feel free to jump in
@gkatsanos My first try: vuejs.epub
but the eBook still need cover and maybe style and meta info...
@PejmanNik Nice start! Still a little rough though. For example, I saw some JavaScript errors and {% raw %}
tags used for demos, which we'd probably want to strip out and replace with a placeholder or link to the lives site.
@chrisvfritz Thank u. yes i try to read it and see this problem.. also images link should change and embedded in book
I try to fix this problem but for {% raw %}
some of them is html and some other is plane text so can i parse them? just replace with links is enough?
Should it not be a Hexo plugin ? Would allow for other projects to use it. With maybe an alternate config file.
Is there a way to convert the guide in a single page document so we can then convert to ePub etc and move to a Reader? I saw this issue as well related. #508