site: add code line numbers
This commit is contained in:
committed by
Johannes Kirschbauer
parent
11d851e934
commit
68afbb564e
@@ -9,7 +9,19 @@
|
||||
{JSON.stringify(data.frontmatter)}
|
||||
|
||||
<style>
|
||||
.toc :global(p) {
|
||||
margin: 0;
|
||||
:global {
|
||||
.shiki code {
|
||||
counter-reset: step;
|
||||
counter-increment: step 0;
|
||||
}
|
||||
.line::before {
|
||||
content: counter(step);
|
||||
counter-increment: step;
|
||||
width: 1rem;
|
||||
margin-right: 1.5rem;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
color: rgba(115,138,148,.4);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,6 +7,9 @@ b: 2
|
||||
|
||||
```js
|
||||
const abc = 1 + "2";
|
||||
const abc = 1 + "2";
|
||||
const abc = 1 + "2";
|
||||
const abc = 1 + "2";
|
||||
```
|
||||
|
||||
## Step Foo
|
||||
|
||||
Reference in New Issue
Block a user