racket / racket/scribble

Feature request: `--html` output format with inlining

Open
#177 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
250
Forks
102
Avg merge
11d 11h
Merged PRs (30d)
1

Description

I suggest adding an output format for scribble like --html, but inlining CSS and JavaScript dependencies into the HTML file.

In the common case that there are no image dependencies etc., this creates a single relocatable HTML file, which can for example be shared by email. Even if other additional files are generated, in which case you still need to tar/zip up an archive to share, there is an advantage: Gmail, I discovered while trying to send a Scribble-generated file by email, blocks files with a .js extension from attachments, even as part of an archive, whereas HTML attachments with inline JavaScript are allowed. (I would have thought some people on the Gmail team might need to share .js files occasionally!)

For future readers, my current workaround is to do this (via a Makefile):

scribble --html --dest tmp my-paper.scrbl
inliner -n --skip-absolute-urls --preserve-comments tmp/my-paper.html > my-paper.html

where inliner is a Node.js utility.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Scribble's existing --html output path and compare it with the Makefile workaround using inliner. Determine how CSS and JavaScript dependencies are represented in the generated HTML, then verify that the new mode produces a relocatable HTML file when no image dependencies exist while preserving support for additional generated files.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.