https://github.com/jacobemcken/html-to-md
A Clojure library for converting HTML to Markdown.
https://github.com/jacobemcken/html-to-md
babashka clojure html markdown
Last synced: about 1 month ago
JSON representation
A Clojure library for converting HTML to Markdown.
- Host: GitHub
- URL: https://github.com/jacobemcken/html-to-md
- Owner: jacobemcken
- License: mit
- Created: 2025-12-20T21:20:09.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-12-21T21:30:34.000Z (about 1 month ago)
- Last Synced: 2025-12-22T20:48:12.892Z (about 1 month ago)
- Topics: babashka, clojure, html, markdown
- Language: Clojure
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# html-to-md
A Clojure library for converting HTML into Markdown.
[](https://book.babashka.org#badges)
## Usage
```clojure
(require '[html-to-md.core :as html-to-md])
(html-to-md/convert "
Some heading
Followed by some text
")
; "# Some heading\n\n Followed by some text\n\n"
```
## Development
### Architecture
The library consist of two transformation layers:
```mermaid
graph LR
A[HTML] -- transform --> B
B[Hiccup] -- transform --> C
C[Markdown]
```
An existing library [Hickory][1] already handles HTML to Hiccup convertion quite well,
**so this library just uses Hickory and focuses on Hiccup to Markdown convertion**.
But includes Hickory as a dependency for convenience.
### Test suite
Running test suite:
clj -X:test
[1]: https://github.com/clj-commons/hickory