How to embed code on medium

hasan rosidi
1 min readApr 29, 2020

Embedding block code on medium pretty easy, there are several ways :

  1. Embed directly

Windows: Control + Alt + 6
Linux : Control + Alt + 6

<-- Paste your code here -->

2. Using Gits https://gist.github.com

Github gits is much more better ways to embed code in medium.

Open your account in github ( create once if you don’t have ) and go to the https://gist.github.com/

gist.github.com create embed code

if you will share this code for example in medium , you can save as public gist

pick the “ Crate Public gist “

After save as public you will get link that can embed to medium

example pasted link from gits

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

hasan rosidi
hasan rosidi

Written by hasan rosidi

0 Followers

Simply Developer, Malang , Jawa Timur, Indonesia

No responses yet

Write a response