Render '.md' files inline using jsdoc? - jsdoc

typedoc has the ability to render '.md' inline with the generated documentation by linking the markdown files in comments like so:
/*
* [[include:example.md]]
*/
function myFunction() {
}
see typedoc docs here
I'm looking for a way to emulate this behavior in jsdoc. Any way to reference a markdown file by name in a jsdoc comment and display it inline in the generated html that jsdoc outputs.
Jsdoc has the concept of tutorials where markdown files can be linked in comments but that does not render the markdown. it simply provides a clickable link. Maybe there is a jsdoc template that renders instead of linking?
I have seen this question:
JSDoc: How to include multiple .md file.
I'm looking for a better solution than using jsdoc tutorials.

Related

Embed readme file snippet into another one [duplicate]

If I have an html file somewhere in the same folder as a markdown document, is there any way to embed the entire file inside a markdown document, so that the html will be rendered correctly (not just the code displayed)?
Markdown doesn't support includes out-of-the-box. You need to use one of the existing flavors or static site generators that support markdown or/and HTML inclusions. For example, DocFX
You can't include other Markdown files in Readme (Readme is usually Markdown file). You can use the "Quote" (See example below)
This is Quote
> This is Quote
You can see my Markdown guide here

Show contents of a md file in another in GitHub [duplicate]

If I have an html file somewhere in the same folder as a markdown document, is there any way to embed the entire file inside a markdown document, so that the html will be rendered correctly (not just the code displayed)?
Markdown doesn't support includes out-of-the-box. You need to use one of the existing flavors or static site generators that support markdown or/and HTML inclusions. For example, DocFX
You can't include other Markdown files in Readme (Readme is usually Markdown file). You can use the "Quote" (See example below)
This is Quote
> This is Quote
You can see my Markdown guide here

Where can I find the code that converts PR descriptions into HTML

Pull requests' (PRs) descriptions use Markdown that's documented here, and when the PR is viewed in a browser, that Markdown content is converted into HTML and looks "pretty".
Where can I find the code that converts it from Markdown to HTML, so I can leverage the same algorithms in my (internal-only) code?
Unfortunately we can not see the source code. It should be something like the Markdown editor/viewer.
So if you mean you want to render the Markdown with the "pretty" formatting offline, then you can use the existing Markdown editor/Tools such as markdown-it or showdown or any others.
Showdown is a JavaScript Markdown to HTML converter, based on the
original works by John Gruber. Showdown can be used client side (in
the browser) or server side (with Node.js).
If you are interested in the codes, then you can reference the open source code of markdown-it or showdown on GitHub.
Other related questions:
How to render Markdown Text from database in a Razor view?

How does GitHub's Gist embed work?

Let's suppose that I have a file named my_python_code.py, and I upload it to GitHub's gist. Now I embed that gist into my blog, using the code provided by GitHub on the corresponding page.
When I browse my blog and I check the source code for the page, I discover that:
the embed code calls a js file which performs some DocumentWrite commands, inserting the appropriate html tags (with css styles) on my page, and
the associated css file is linked to my page. This file contains css declarations for 'gist' class as well as other classes.
This is all very nice. But I wonder: starting from the same my_python_code.py file, what would I have to do to end up with the same final html code?
I've tried using pygments and rouge (via pygmentize and rougify commands) with reasonable options but none of them highlights the original code using 'gist' tags (among others) as is done when performing the GitHub embed.

Exporting from org-mode to HTML: how to include reference using bibtex

I use org-mode to write posts, and sometimes I want to include reference in the post using my general .bib file with all my references. I know how to export to latex, but when I try to export the same file to html, the reference does not appear in the page. How do I do that?
I use org-ref for this: https://github.com/jkitchin/org-ref It defines cite and bibliography links that export to LaTeX, and with decent HTML export.
(update: fixed link)