Open NikosAlexandris opened 9 months ago
I suppose this icon feature comes from Material for MkDocs? I'll try to look into it.
I tried something like :
yaml_header = textwrap.dedent(
"""
---
icon: simple/pytest
---
""",
)
style = textwrap.dedent(
"""
<style>
article h1, article > a, .md-sidebar--secondary {
display: none !important;
}
</style>
""",
)
iframe = textwrap.dedent(
f"""
<iframe
id="coviframe"
src="{covindex}"
frameborder="0"
scrolling="no"
onload="resizeIframe();"
width="100%">
</iframe>
""",
)
script = textwrap.dedent(
"""
<script>
var coviframe = document.getElementById("coviframe");
function resizeIframe() {
coviframe.style.height = coviframe.contentWindow.document.documentElement.offsetHeight + 'px';
}
coviframe.contentWindow.document.body.onclick = function() {
coviframe.contentWindow.location.reload();
}
</script>
""",
)
page_contents = yaml_header + style + iframe + script
but no luck yet.
Problem
I can't seem to add an icon to the title of the
coverage.md
page. Specifically, I want to add the following, as I'd do in any other Markdown page :Solution ?
Perhaps an
icon
option to the coverage plugin ?Alternatives considered
Not really.
Boost priority