Open ericLemanissier opened 1 year ago
The server can not do any client-side rendering like math or mermaid. This request would probably require a button on checked-in markdown files where a separate printable render page opens in a new tab, which will require separe JS entry points etc. Certainly not trivial, but doable.
+1 on this. currently I use Firefox extension to render raw markdown and then print it. would really love the ability to hide gitea top and bottom when hitting print!
Feature Description
Gitea is already a great to to write documentation using markdown+mermaid. So much that it makes one want to be able to read such documentation in full screen, or be able to print it. The main point is to remove what is above and below the rendered markdown in the current web interface of both the Code and Wiki section of a repo.
Currently, the only way to partially do this is to:
markdown
API<pre class="code-block is-loading"><code class="chroma language-mermaid">...</code></pre>
into<div class="mermaid">...</div>
<script type="module">import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';</script>
to the fragment<html><body>...</body></html>
The rendering is not identical to what gitea renders, the evidence is that mermaid graphs generated with the 4 steps are not rendered in an iframes and are left aligned, contrary to mermaid graphs rendered directly by gitea which are in an iframe and centered. Also, gitea's CSS is not applied to the rendering. What is more, this does not cover KaTeX for math.
Screenshots
No response