GithubHelp home page GithubHelp logo

useful-gh-markdown's Introduction

Useful GitHub Flavored Markdown Snippets

Alerts

Previously knows as "Enhanced Blockquotes."

You can read about Alerts in the documentation.

  • Works on GitHub mobile app.
> [!NOTE]
> BLOCKQUOTE_TEXT

Note

This repository contains GitHub Flavored Markdown.

> [!WARNING]
> BLOCKQUOTE_TEXT

Warning

This only works on GitHub, or services where this is supported.

July 2023 Update!

As of July 2023, we got a new IMPORTANT type and a new ![TYPE] syntax. You can read more about it in the discussion.

> [!IMPORTANT]
> BLOCKQUOTE_TEXT

November 2023 Update!

As of November 2023, we have two more types: TIP and CAUTION.

> [!TIP]
> BLOCKQUOTE_TEXT

Tip

This became available on 14th November 2023.

> [!CAUTION]
> BLOCKQUOTE_TEXT

Caution

Might not be supported on other platforms.

Context-based images

HTML version

  • Works on GitHub mobile app.

Specify an image to display based on the preferred color scheme. Change your color scheme from light to dark or vice-versa to see the image change.

GitHub logomark.
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="IMAGE_URL">
  <img alt="IMAGE_ALT" src="IMAGE_URL">
</picture>

Source: Specify theme context for images in Markdown GA

Markdown version

  • Works on GitHub mobile app.

GitHub also supports themed images in Markdown, by appending #gh-dark-mode-only or #gh-light-mode-only at the end of an image url.

GitHub-Mark-Light GitHub-Mark-Dark

![IMAGE_ALT](IMAGE_URL#gh-dark-mode-only)
![IMAGE_ALT](IMAGE_URL#gh-light-mode-only)

Source: Specify theme context for images in Markdown

Fence blocks for Math

  • Works on GitHub mobile app.

You can specify a math-specific fence block with ```math, it even supports LaTeX expressions, read more about it in the documentation.

```math
\sqrt{3}
```
$$\sqrt{3}$$

Source: Fenced block syntax for mathematical expressions

useful-gh-markdown's People

Contributors

thinkverse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.