Anil
Anil

Reputation: 1334

GitHub Gist without line numbers?

GitHub Gists like this can be embedded into websites, for example here.

The default behavior displays line numbers.

Gist displayed inline with line numbers

Can Gists be embedded without line numbers displayed?

Upvotes: 1

Views: 194

Answers (1)

Christian
Christian

Reputation: 5521

Since Gist are inserted via JS and not code blocks anymore, the options described in the web for code blocks, such as the data-gist-hide-line-numbers solution, do not work anymore.

Here's a "hack" that modifies the CSS of the gist:

.js-line-number {
  display: none;
}
<script src="https://gist.github.com/anilkeshwani/60567eaa5fb8c36398c52022afbde22e.js"></script>

Upvotes: 1

Related Questions