Search code examples
githubjekyllgist

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?


Solution

  • 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>