Embed readme file snippet into another one [duplicate] - github

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

Related

Referencing Files In A Github Markdown File

I am trying to create a readme on github like the following https://github.com/fleejy/ckme136-capstone
I guess my question is how did this content creator create the links under the Documentation And Repository Organization heading in the Readme.md file as I would like to emulate this.
I did some searching for relative references examples but was not able to figure it out.
Any advice would be very much appreciated.
Thanks
It's very Simple, you have to make a URL in markdown referring to your folder/file.
For making a URL in markdown files you use a syntax like this [Text](exampleURL) here your Text is the text which will appear in the markdown file and the exampleURL is the URL you want to go to.
A Working Example Will Be Like this [Google](https://google.com).
If you want to refer to a particular file/folder inside your repository you don't need https:// all you need is to provide the path of the folder/file
for example in my repository i have a file named example.pdf inside a folder named PDFs so my markdown code will look like this [Example PDF](PDFs/example.pdf)
Markdown is pretty easy and you can learn markdown syntax with this CheatSheet.

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

Images not showing on Github in Readme.md file

Every time I drag and drop images into the Issue page of the project on Github and then copy the link to the Readme.md file. This usually works but if I have some more complex tags then images won't display, instead the link will be displayed.
This is how it looks like in the Markdown Editor:
And this is how it looks like on Github(live):
Note that the MarkDown editor displays the images as expected:
You're trying to nest Markdown inside block-level HTML (specifically <details>¹). In the original implementation, this doesn't work by design:
Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can’t use Markdown-style *emphasis* inside an HTML block.
If you are using an implementation that respects this decision, you should be able to use HTML syntax:
<details>
<summary>Some summary</summary>
<img alt="Description" src="https://user-images.githubusercontent.com/foo/bar/baz.png">
</details>
However, newer specs (most notably GitHub Flavored Markdown and CommonMark) do allow Markdown in block-level elements as long as they are separated by whitespace.
If you are using a modern implementation, try this:
<details>
<summary>Some summary</summary>
![Description](https://user-images.githubusercontent.com/foo/bar/baz.png)
</details>
¹Note that
"block-level" is not technically defined for elements that are new in HTML5

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.