DEV Community

Jess Lee
Jess Lee

Posted on with Ben Halpern

Changelog: Github Repo & Glitch Liquid Tags

One of the things we constantly strive to do at dev.to is to help developers tell great stories about code. A couple of great new features I want to show you embody that.

We have the concept of "liquid tags" in our markdown. Users can use Liquid syntax in their posts to add rich links and embeds specifically built around the stories that software developers might tell.

This is a feature which we plan to lean into more and more as we grow. In the meantime, here are a few new tags.

1) Github Repo Tag

In addition to issue and comment embeds, you can now embed github repositories in your posts. ✅

{% github thepracticaldev/dev.to %}

GitHub logo forem / forem

For empowering community 🌱


Forem 🌱

For Empowering Community

Build Status Build Status GitHub commit activity GitHub issues ready for dev GitPod badge

Welcome to the Forem codebase, the platform that powers dev.to. We are so excited to have you. With your help, we can build out Forem’s usability, scalability, and stability to better serve our communities.

What is Forem?

Forem is open source software for building communities. Communities for your peers, customers, fanbases, families, friends, and any other time and space where people need to come together to be part of a collective See our announcement post for a high-level overview of what Forem is.

dev.to (or just DEV) is hosted by Forem. It is a community of software developers who write articles, take part in discussions, and build their professional profiles. We value supportive and constructive dialogue in the pursuit of great code and career growth for all members. The ecosystem spans from beginner to advanced developers, and all are welcome to find their place…

GitHub logo facebook / react

The library for web and native user interfaces.

React · GitHub license npm version CircleCI Status PRs Welcome

React is a JavaScript library for building user interfaces.

  • Declarative: React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable, simpler to understand, and easier to debug.
  • Component-Based: Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep the state out of the DOM.
  • Learn Once, Write Anywhere: We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. React can also render on the server using Node and power mobile apps using React Native.

Learn how to use React

Remember that Liquid thing I mentioned earlier? Here's more if you want to check it out.

GitHub logo Shopify / liquid

Liquid markup language. Safe, customer facing template language for flexible web apps.

Build status Inline docs

Liquid template engine

Introduction

Liquid is a template engine which was written with very specific requirements:

  • It has to have beautiful and simple markup. Template engines which don't produce good looking markup are no fun to use.
  • It needs to be non evaling and secure. Liquid templates are made so that users can edit them. You don't want to run code on your server which your users wrote.
  • It has to be stateless. Compile and render steps have to be separate so that the expensive parsing and compiling can be done once and later on you can just render it passing in a hash with local variables and objects.

Why you should use Liquid

  • You want to allow your users to edit the appearance of your application but don't want them to run insecure code on your

2) Glitch Tag

A quick way to show off your glitch project or remix. 😎

The Glitch embed is like the Codepen embed which we also support but allows for more dynamic server-driven apps. Glitch is one of the cool up-and-coming code companies based in New York like us.

Here's a project I enjoyed staring at:

{% glitch beautiful-cubes %}

Enjoy 🙂

We've quietly rolled out a few other tags lately. The info about the various ones can be found in the "HELP" section of the editor.

Top comments (9)

Collapse
 
galdin profile image
Galdin Raphael

Could we have a feature to collapse comment threads?
I find myself wanting this particularly when browsing dev.to from the phone.

Collapse
 
ben profile image
Ben Halpern

Yes! I agree. We’ll get this in.

Collapse
 
ben profile image
Ben Halpern • Edited

People are constantly linking to GitHub repos, so we definitely encourage you to make ample use of these rich previews to help provide a lot more context at a glance.

Collapse
 
dmerand profile image
Donald Merand

very cool!

Collapse
 
greencoder profile image
Vincent Cantin • Edited

In the light of the recent Github acquisition by Microsoft and the forthcoming massive repository migrations, you might consider adding support for links to GitLab and BitBucket as well.

Collapse
 
rrampage profile image
Raunak Ramakrishnan

Is there a way to embed a view of two code snippets side-by-side? It is useful for showing before/after of using a library / refactoring / using language feature.

Collapse
 
ben profile image
Ben Halpern

Interesting idea!

Collapse
 
marcellothearcane profile image
marcellothearcane

@ben How about NPM embeds too?

Collapse
 
adambrandizzi profile image
Adam Brandizzi

Hey peoples! Any change we could get a liquid tag for pastebin.com? It is my standard choice for snippets :)