Continuous Integration - github

My badges aren't showing on github README.md file but they show here on stackoverflow. Here are the markdowns:
I also noticed that html tags (that used to work in README.md files) now show as plain text. What am I missing?

There are hexadecimal binary numbers (in place of spaces) in your README.md. That's why it can't be parsed and represented as a markdown file:
Tip: make your editor display spaces/tabulation and other invisible characters. That's what I see when I open your README.md:
Ride my way<0x00>app<0x00>
<0x00>
<0x00>
So nothing to do with the way you display the badges.
I've removed these non asci-characters and just created a pull request (notice how github defines this change as BIN and can't display a diff):
And it's now displayed as it should:

Related

Why are headings automatically creating links in GitHub readme.md markdown pages?

Hello: I have created readme.md files for my repositories and GitHub pages. But when I create headings that are formatted h2/## or h3/###, etc. in-page anchor links are automatically created. I have tried different ways to format the headings -- such as ##, , --- -- but I get the same result. It occurs with each heading. This occurs in readme.md files that are in the repository and those that are converted to GitHub pages. I've tested it in chrome browser and edge browser and it's the same behavior.
# sample will create the heading and an unwanted in-page link
## sample will create the heading and an unwanted in-page link
Here's a page with the behavior: https://burrittresearch.com/
My goal is to be able to format headings in markdown without having these links automatically created.
Thank you!
Those are part of the anchorjs default CSS rules from GitHub pages
<h2 id="skills">Skills
<a class="anchorjs-link"
href="#skills"
aria-label="Anchor"
data-anchorjs-icon=""
style="font: 1em / 1 anchorjs-icons; padding-left: 0.375em;">
</a>
</h2>
If you static page (like this one) include its own set of CSS file/rules (like those ones), you could add, to make sure they are not visible:
.anchorjs-link {
display: none !Important;
}
GitHub documents their markup processing in github/Markup. Note that Markdown is converted to HTML in step one, which does not add any anchors to headers. However, in step 4, which is separate from the Markdown parsing, all headers in the document have anchors added. This is done to all content, regardless of whether is comes from Markdown, ReStructured Text, textile, asscidoc, etc., and is not specific to Markdown.
Note that the above only applies to content supplied by users which is displayed on github.com. It is their site, which they control, so we don't get to change/override that behavior.
However, it is different with GitHub pages. By default, GitHub Pages uses Jekyll to convert Markdown files into HTML. Jekyll includes a number of options to control how Markdown is processed, including the auto_ids option. Turn that option off (set it to false), and Jekyll will no longer add IDs to every header. However, that is a Kramdown option, but, as I understand if, GitHub Pages uses the GitHub Flavored Markdown variant of Commonmark, which doesn't have any such options. For that matter, the GFM spec doesn't indicate that headers would be assigned IDs either (so I'm not sure where those IDs are coming from). You might try configuring Jekyll to use Kramdown with the auto_ids option turned off. Configuration options "can either be specified in a _config.yml or _config.toml file placed in your site’s root directory."
As an alternative, you could install Jekyll (or any other static site generator) locally and build the site before uploading to GitHub Pages. Simply include an empty file named .nojekyll in the site root and GitHub will not run your files through Jekyll. In this way, you get complete control over the content and formatting of the pages.

Navigate to area of Markdown file in Azure Devops

I have a markdown file with a number of codes and descriptions within it which will be used like a wiki.
A developer will be given a link, and the link should take them to the specific code within the markdown file.
Example of file:
#IAmAPizza
This declares that you are a pizza
#CordialComrade
You've encountered a cordial comrade who will eat your pizza.
...
#ZestfulZebra
You can't keep up with him, just go with it.
[test code](#test-code)
I am a testing code
I've tried navigating to the file in the repo and then adding #test-code to the address, but it doesn't do anything. I assume that the markdown isn't being rendered on the page.
Is there a way to navigate to a specific # within a file in an Azure Devops Repo?
Is there a way to navigate to a specific # within a file in an Azure Devops Repo?
We could try to open the markdown file in the repo under the Contents view. Then select the specific #, like: #ZestfulZebra:
Just as Hugh pointed, there is an option copy link to this selection. We could get the link after click the hyperlink symbol, it should be:
https://dev.azure.com/<OrganizationName>/_git/<ProjectName>?path=%2FReadme.md&version=GBmaster&line=64&lineEnd=64&lineStartColumn=1&lineEndColumn=14&lineStyle=plain
And the link for the markdown file is:
https://dev.azure.com/<OrganizationName>/_git/<ProjectName>?path=%2FReadme.md&version=GBmaster
So, it use the syntax &line=64&lineEnd=64&lineStartColumn=1&lineEndColumn=14&lineStyle=plain to locate the anchor we selected.
Now, we can simply parse this syntax &line=64&lineEnd=64 is used to locate the line number we select the code. If we change it to &line=64&lineEnd=65, it will select the lines 64 and 65. And the &lineStartColumn=1&lineEndColumn=14 is used to locate the start and end positions of the selected string.
Now, we could use this syntax with the link of markdown file to navigate to a specific # within a file in an Azure Devops Repo.
For example, we could use the web address to navigate the anchors in the MD:
https://dev.azure.com/<OrganizationName>/_git/<ProjectName>?path=%2FReadme.md&version=GBmaster&line=64&lineEnd=64&lineStartColumn=1&lineEndColumn=14&lineStyle=plain
Do you mean adding anchor link in markdown file? If so, I tested this syntax: [test](codeLink) without # and it works well.
I first get the code link in a code file in the repo:
Then add this:[test](https://dev.azure.com/{org}/_git/{repo}?path=%2FStartup.cs&version=GBmaster&line=4&lineEnd=5&lineStartColumn=1&lineEndColumn=1&lineStyle=plain) to markdown file:
Click test in the wiki to successfully navigate to the code:

GitHub - browse plain text version of markdown file [duplicate]

This question already has answers here:
How do I view the source of Markdown files on Github?
(5 answers)
Closed 6 years ago.
Please note this question is about simply browsing Markdown source code on the GitHub website, not how to add preformatted text when writing Markdown (or similar.)
GitHub automatically renders an HTML preview of Markdown files when you browse them in a repository. Here's one (purely random):
https://github.com/linode/docs/blob/master/docs/security/linux-security-basics.md
My question is, how do you switch to the standard GitHub plain text view you would for other code (e.g. a PHP file) – i.e. the source code of the .md file, with the clickable line numbers down the left, so you can refer to a specific line in a specific file in a specific commit in issues etc.
I don't mean 'Raw', because there are no line numbers.
I don't mean 'Edit' – which is better, but you still can't hover and highlight a line number / get a unique URL.
On the MD file page, click on the RAW button. it will take you to a different URL (in this case https://raw.githubusercontent.com/linode/docs/master/docs/security/linux-security-basics.md) but it shows the raw contents of the file, unformatted

How do I view the source of Markdown files on Github?

Github helpfully renders Markdown (.md) files to HTML when viewing on github.com (for example, this README.md).
When viewing any other source file, it is shown as unrendered source code (for example, this .gitignore). A handy feature this gives is linking directly to a line in the source by clicking the line number (for example, like this).
How can I view the unrendered source of Markdown files on Github (so I can link to a particular line in the source)?
note: I know of the "Raw" button, however it does not provide any of the nice UI Github has.
If you don't want to use the "raw" button, you can (since June 2021) add ?plain=1 to your GitHub markdown file URL:
Appending ?plain=1 to the url for any Markdown file will now display the file without rendering.
As with other code files, it will also show line numbers, and can be used to link other users to a specific line or lines.
For example, appending ?plain=1#L52 will highlight line 52 of a plain text Markdown file.
Example:
https://github.com/git/git/blob/master/README.md?plain=1#L49-L51
Since Sept. 2021, there is a button which adds the ?plain=1 for you:
Use the "Raw" button. For instance, if you were looking at README.md there is a Raw button in the Navigation. This can be simple URL change (from blob to raw), but in this case becomes a separate link.
Edit: There is no "pretty" view for the Markdown source. There's the converted HTML view, the Raw view without the UI, and the Blame view. Only the Blame view provides you with the ability to link to a specific line within the source.
Edit 2: The other option is to use Anchors within the README.md. If you take the Installation title for example, you can directly link within the content of the Markdown file. Assuming you don't have anything hidden within the Markdown itself, this is closer still to solving your original question.
Using the "Blame" button, you are able to see the source of the Markdown (for example, like this).
Unfortunately, "Blame" comes with extra UI elements which make the source more cluttered.
Refined Github provides an additional "Raw" button to view the raw source and link to a specific line:
I ran into this issue, as a complete surprise to me, on a file with a .wiki extension. It appears that files with .wiki, .mediawiki, and .wikitext extensions are recognized and rendered as HTML, with a table of contents even. I guess it makes sense, what with GitHub projects having wikis and all.
That's nifty, but this one particular case, I really wanted the raw wikitext to be visible and copy-pasteable, not some rendered representation of it.
The only half-way solution I found was to use a bogus file extension that isn't one of the ones recognized by GitHub, and then a .gitattributes to tell GitHub how to syntax highlight it, e.g.:
*.wiki_ linguist-language=mediawiki
I'm not thrilled about this, but all the good extensions were already "taken" according to the languages.yml linked above.

How to insert a picture in my git page?

I have just built a git user page and I want to add a picture in my article. Then I use
![repo name](https://github.com/zhangyangyu/zhangyangyu.github.io/raw/master/images/how-to-build-a-user-page-on-github/p1.png)
I find this on the Web and if I put the path in browser I can see my picture. But in my article, it just appear as the text. Why? If it helps the content of my config file is:
markdown: rdiscount
pygments: true
You are using Textile for your files, but Markdown syntax for the images.
To fix, use Markdown files, for example
2013-04-12-how-to-build-a-user-page-on-github.md
ref