Run this notebook

Use Livebook to open this notebook and explore new ideas.

It is easy to get started, on your machine or the cloud.

Click below to open and run it in your Livebook at .

(or change your Livebook location)

<!-- livebook:{"persist_outputs":true} --> # GitHub Flavored Markdown ```elixir Mix.install([ {:mdex, "~> 0.8"}, {:mdex_gfm, "~> 0.1"}, {:kino, "~> 0.16"}, {:req, "~> 0.5"} ]) ``` ## Intro GitHub Flavored Markdown (GFM) extends CommonMark with features commonly used in software documentation. This example shows how to enable GFM extensions like tables, task lists, autolinks, strikethrough, and emoji shortcodes. ## Setup ````elixir markdown = """ # GitHub Flavored Markdown :eyes: | Feature | Status | | ------- | ------ | | Fast | :white_check_mark: | | GFM | :white_check_mark: | - [x] Task A - [x] Task B - [ ] Task C ```elixir def deps do [ {:mdex, "~> 0.8"} ] end ``` Check out the spec at https://github.github.com/gfm """ ```` <!-- livebook:{"output":true} --> ```` "# GitHub Flavored Markdown :eyes:\n\n| Feature | Status |\n| ------- | ------ |\n| Fast | :white_check_mark: |\n| GFM | :white_check_mark: |\n\n- [x] Task A\n- [x] Task B\n- [ ] Task C\n\n```elixir\ndef deps do\n [\n {:mdex, \"~> 0.8\"}\n ]\nend\n```\n\nCheck out the spec at https://github.github.com/gfm\n" ```` You can either use the [mdex_gfm](https://hex.pm/packages/mdex_gfm) plugin or set the options yourself. You can find either approaches below. ## Plugin ```elixir MDEx.new(markdown: markdown) |> MDExGFM.attach() |> MDEx.to_html!(syntax_highlight: [formatter: {:html_inline, theme: "github_light"}]) |> Kino.HTML.new() ``` ## Manual ```elixir options = [ extension: [ alerts: true, autolink: true, footnotes: true, shortcodes: true, strikethrough: true, table: true, tagfilter: true, tasklist: true ], parse: [ relaxed_autolinks: true, relaxed_tasklist_matching: true ], render: [ github_pre_lang: true, full_info_string: true, unsafe: true ], syntax_highlight: [ formatter: {:html_inline, theme: "github_light"} ] ] markdown |> MDEx.to_html!(options) |> Kino.HTML.new() ```
See source

Have you already installed Livebook?

If you already installed Livebook, you can configure the default Livebook location where you want to open notebooks.
Livebook up Checking status We can't reach this Livebook (but we saved your preference anyway)
Run notebook

Not yet? Install Livebook in just a minute

Livebook is open source, free, and ready to run anywhere.

Run in the cloud

on select platforms

To run on Linux, Docker, embedded devices, or Elixir’s Mix, check our README.

PLATINUM SPONSORS
SPONSORS
Code navigation with go to definition of modules and functions Read More