# Can one add new renderers to Scribble via a package?

**URL:** <https://racket.discourse.group/t/can-one-add-new-renderers-to-scribble-via-a-package/3023>\
**Category:** Questions & Answers\
**Tags:** scribble\
**Created:** [July 13, 2024, 6:01pm UTC](https://racket.discourse.group/t/can-one-add-new-renderers-to-scribble-via-a-package/3023 "2024-07-13T18:01:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevebyan](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@stevebyan](https://racket.discourse.group/u/stevebyan)\
**Post date:** [July 13, 2024, 6:01pm UTC](https://racket.discourse.group/t/can-one-add-new-renderers-to-scribble-via-a-package/3023/1 "2024-07-13T18:01:51Z")

</div>

I'd like to extend Scribble with an --html-nav option to produce a separate file containing the navigational elements. My intent is to convert the Scribble-generated html to sxml, then include the body sxml and navigational sxml in an sxml-template. This is part of my journey to create a tadpole-like static site and blog generator.

I can find the bits of code in html-render.rkt that produce the nav elements, but I've yet to puzzle out if there is a framework in the Scribble rendering code that would let me install a new renderer and associated command-line option via a package. Do I just have to fork Scribble to extend it in this way?

---

<div class="post-metadata">

**Author:** ![mflatt](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/mflatt/32/6_2.png) [@mflatt](https://racket.discourse.group/u/mflatt)\
**Post date:** [July 18, 2024, 3:27am UTC](https://racket.discourse.group/t/can-one-add-new-renderers-to-scribble-via-a-package/3023/2 "2024-07-18T03:27:21Z")

</div>

There is not currently a plugin protocol.

If you (or others) are interested in tackling this, I think it would make sense to add a way for a collection `info.rkt` files declare new renderers that can be used from `raco scribble` (where those `info.rkt` files can be found via `find-relevant-directories`).

A secondary obstacle is that the `command-line` form used by `raco scribble` does not support a dynamically determined set of flags for renderers. There could be a new flag that takes a renderer name as an argument, or maybe it makes sense to convert to `parse-command-line`, or maybe there's a better approach.
