Skip to content

Add option to export HTML#37

Merged
drdv merged 4 commits into
mainfrom
html-export
Nov 1, 2025
Merged

Add option to export HTML#37
drdv merged 4 commits into
mainfrom
html-export

Conversation

@drdv
Copy link
Copy Markdown
Owner

@drdv drdv commented Nov 1, 2025

The option is COLOR_ENCODING and can be set using:

help: ## Show this help
	@awk -v COLOR_ENCODING=html -f makefile-doc.awk $(MAKEFILE_LIST)

Currently we handle ANSI (the default) and HTML. The HTML format is:

STYLES
<pre>
DOCS
</pre>

where STYLES is:

<head>
  <style type="text/css">
    .ansi31 { color: #d70000; }
    .ansi32 { color: #5f8700; }
    .ansi33 { color: #af8700; }
    .ansi34 { color: #0087ff; }
    .ansi35 { color: #af005f; }
  </style>
</head>

The default color codes here are based on the "solarized" theme in ansi2html. At present there is no plan to handle other themes (but one can easily modify the generated HTML in an automated way and set any desired theme).

The HTML output can be added directly e.g., to mkdocs using snippets.

@drdv drdv merged commit a470d3c into main Nov 1, 2025
@drdv drdv deleted the html-export branch November 1, 2025 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant