Skip to content

Commit 902070a

Browse files
committed
Update badget position
1 parent e9b8a89 commit 902070a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

runme-badge-plugin.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ const runmePlugin = ({ repository }) => {
2222
return;
2323
}
2424

25-
visit(ast, "root", (node, index, parent) => {
26-
node.children.unshift({
25+
// let inserted = false;
26+
visit(ast, "heading", (node, index, parent) => {
27+
// inserted = true;
28+
parent.children.splice(index, 0, {
2729
type: "link",
2830
url: `https://runme.dev/api/runme?repository=${encodeURIComponent(
2931
repository
@@ -38,6 +40,7 @@ const runmePlugin = ({ repository }) => {
3840
},
3941
],
4042
});
43+
return false;
4144
});
4245
};
4346

src/css/custom.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@ ol {
291291
border-radius: 4px;
292292
}
293293

294+
.markdown a > img[title="Open with runme"] {
295+
margin: initial;
296+
border-radius: 4px;
297+
}
298+
294299
.infobox-title {
295300
font-weight: bold;
296301
margin-bottom: 0.5rem;

0 commit comments

Comments
 (0)