How can I post marp slide to blogger(blogspot) properly? #173
-
I tested this on my blog. I can't control size of presentation. Always very small. How can I deal with this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Don't use HTML generated by Marp CLI / Marp for VS Code as an embed snippet. It is designed for a standalone HTML file to present the deck, not for a snippet to embed to the blog article. If just copied exported HTML and pasted to blog, your site will be broken surely. In your situation, recommend to use HTML and CSS snippets generated from Marp Core or Marpit. If you really want to use HTML file created by Marp CLI / Marp for VS Code, consider to use <iframe src="https://example.com/url-to-your-marp-slide.html" width="720" height="405" /> When you're using Marp Core (or Marpit with inline SVG mode), should set a style of inline SVG elements to control the size of slides. See "Pixel-perfect scaling" section of Marpit documentation: svg[data-marpit-svg] {
display: block;
width: 720px;
height: 405px;
} |
Beta Was this translation helpful? Give feedback.
Don't use HTML generated by Marp CLI / Marp for VS Code as an embed snippet. It is designed for a standalone HTML file to present the deck, not for a snippet to embed to the blog article. If just copied exported HTML and pasted to blog, your site will be broken surely.
In your situation, recommend to use HTML and CSS snippets generated from Marp Core or Marpit. If you really want to use HTML file created by Marp CLI / Marp for VS Code, consider to use
<iframe>
tag to put the exported HTML. It can control the slide size bywidth
andheight
attribtues.When you're using Marp Core (or Marpit with inlin…