Member-only story

Syntax Highlighting Displayed In Ubuntu Terminal Like

David Dal Busco
3 min readFeb 24, 2020

--

Display the code of your apps, websites or blogs with code highlighting in stylish Ubuntu Terminal like.

Background photo by MUNMUN SINGH on Unsplash

A couple of days ago, Cody Pearce published an article which picked my curiosity. In his post he was displaying how the unique and immediately recognizable design of the Ubuntu terminal can be reproduced with CSS.

In DeckDeckGo, our editor for presentations, we are providing a code highlighter Web Component, developed with Stencil, which can be integrated in your slides, apps or even easily in a Gatsby website.

That’s why I thought it would be fun to merge Cody’s idea and design 😄.

HTML

The quickest way to try out the component is probably to plug it, with the help of Unpkg, in a plain HTML file. Once the references to fetch its code have been added in the page header, it can be consumed.

Regarding the code to highlight, it should be provided to match the slot name code and that’s it, everything you need to highlight the code is ready.

<html>

<head>
<script type="module" src="https://unpkg.com/@deckdeckgo/highlight-code@latest/dist/deckdeckgo-highlight-code/deckdeckgo-highlight-code.esm.js"></script>
<script nomodule=""…

--

--

David Dal Busco
David Dal Busco

Written by David Dal Busco

Freelancer by day | Creator of Juno.build by night

No responses yet