0.0.2 • Published 6 years ago

gitbook-plugin-codeblock-numbering v0.0.2

Weekly downloads
13
License
-
Repository
github
Last release
6 years ago

This plugin adds data-index attribute to all <pre> tags.

Usage example

Add this CSS code to your styles/website.css

.markdown-section pre {
  position: relative;
}

.markdown-section pre:before {
  display: block;
  content: attr(data-index);
  position: absolute;
  top: 0;
  right: 0;
  background-color: #silver;
  text-align: center;
  width: 2em;
  color: white;
}

screenshot