RSS Amplifier

tusharhero's pages · Oct 19, 2025

SVG? Yes!

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

~165 words. ~0 minutes. tags: emacs meta This post by nwalsh shows how to use SVG in Org generated HTML pages. I would like to showcase yet another way you can use SVGs in Org generated HTML pages, and that is through Org Babel. ( let ((svg (svg-create 400 400 :stroke-width 10))) (svg-gradient svg "gradient1" 'linear '((0 . "red" ) (100 . "blue" ))) (svg-circle svg 200 200 100 :gradient…

~165 words. ~0 minutes.

This post by nwalsh shows how to use SVG in Org generated HTML pages. I would like to showcase yet another way you can use SVGs in Org generated HTML pages, and that is through Org Babel.

( let ((svg (svg-create 400 400  :stroke-width 10)))
  (svg-gradient svg  "gradient1" 'linear '((0 .  "red") (100 .  "blue")))
  (svg-circle svg 200 200 100  :gradient  "gradient1"
               :stroke-color  "green")
  ( with-temp-buffer
    (svg-print svg)
    (buffer-substring-no-properties (point-min) (point-max))))

These are the header arguments I used,

#+begin_src emacs-lisp :exports both :results html

I have been wanting to do some dynamically generated SVG images on my website, but I haven't gotten many ideas yet.

I currently only use this technique (without the SVG) for generating those colorful random dots on the homepage.

Read on tusharhero.codeberg.page

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.