Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuvix25/markdown2html-proxy
A simple web proxy converting Markdown to HTML, embeddable.
https://github.com/yuvix25/markdown2html-proxy
Last synced: about 1 month ago
JSON representation
A simple web proxy converting Markdown to HTML, embeddable.
- Host: GitHub
- URL: https://github.com/yuvix25/markdown2html-proxy
- Owner: Yuvix25
- Created: 2023-07-21T12:56:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-21T13:53:48.000Z (over 1 year ago)
- Last Synced: 2023-07-21T15:38:00.105Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Markdown2HTML Proxy
## Usage
This proxy receives 2 query parameters, `url` and `style`. `url` should contain the URL to the raw markdown file. `style` should contain a URI encoded JSON representing the style to be applied on the `` tag. The default style is:
```css
body {
margin: 30px auto 30px auto;
max-width: 1000px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
background-color: #0d1117;
color: rgb(230, 237, 243);
}a {
color: rgb(3, 102, 214);
text-decoration: none;
}
```Example:
```js
const markdownUrl = "https://raw.githubusercontent.com/Yuvix25/markdown2html-proxy/main/README.md";const style = {
"background-color": "white",
"color": "black",
}
const styleEncoded = encodeURIComponent(JSON.stringify(style));const proxyUrl = `https://yuvix25.github.io/markdown2html-proxy?style=${styleEncoded}&url=${markdownUrl}`;
```You can then embed the result in any of your web apps.