json2md - JSONããMarkdownãçæ
Markdownãæ®åãããã¨ã«ãã£ã¦ãåãªãããã¥ã¡ã³ããã©ã¼ãããã¨ãã¦ã®å½¹å²ä»¥ä¸ã®ãã®ãæ±ããããããã«ãªã£ã¦ãã¾ãããã£ã¨ããã°ã©ããã«ã«ä»ã®ã·ã¹ãã ã¨é£æºãããã®ã§ãã ä»åã¯ãã®ä¸ä¾ã¨è¨ããjson2mdãç´¹ä»ãã¾ããJSONãã©ã¼ãããããMarkdownè¨æ³ã«å¤æããã½ããã¦ã§ã¢ã§ãã
json2mdã®ä½¿ãæ¹
JSONãã¡ã¤ã«ã®ãã¢ã§ããåãªãJSONãã¡ã¤ã«ã§ã¯ãªããã©ã¡ããã¨ããã¨HTMLã«è¿ããã®ãããã¾ãã
[
{ h1: "JSON To Markdown" }
, { blockquote: "A JSON to Markdown converter." }
, { img: [
{ title: "Some image", source: "https://example.com/some-image.png" }
, { title: "Another image", source: "https://example.com/some-image1.png" }
, { title: "Yet another image", source: "https://example.com/some-image2.png" }
]
}
, { h2: "Features" }
, { ul: [
"Easy to use"
, "You can programatically generate Markdown content"
, "..."
]
}
, { h2: "How to contribute" }
, { ol: [
"Fork the project"
, "Create your branch"
, "Raise a pull request"
]
}
, { h2: "Code blocks" }
, { p: "Below you can see a code block example." }
, { "code": {
language: "js"
, content: [
"function sum (a, b) {"
, " return a + b;"
, "}"
, "sum(1, 2);"
]
}
}
ãããå¤æããã¨ã次ã®ããã«Markdownè¨æ³ãåå¾ã§ãã¾ãã
$ node app.js
# JSON To Markdown
> A JSON to Markdown converter.
![Some image](https://example.com/some-image.png)
![Another image](https://example.com/some-image1.png)
![Yet another image](https://example.com/some-image2.png)
## Features
- Easy to use
- You can programatically generate Markdown content
- ...
## How to contribute
1. Fork the project
2. Create your branch
3. Raise a pull request
## Code blocks
Below you can see a code block example.
```js
function sum (a, b) {
return a + b;
}
sum(1, 2);
json2mdã¯ã·ã¹ãã ããèªåçã«JSONãåºåãããããMarkdownã«å¤æããã¨ãã£ããããªä½¿ãæ¹ãèãããã¾ããã¾ããHTMLãããã®JSONãã©ã¼ãããã«å¤æã§ããã°ãä»ã®ãã©ã¼ãããããMarkdownè¨æ³ã«å¤æããã®ã«ã使ãããã§ãã
json2mdã¯node/JavaScript製ã®ã½ããã¦ã§ã¢ã§ãï¼ã©ã¤ã»ã³ã¹ã¯The KINDLY Licenseã§ãï¼ã
[IonicaBizau/json2md](https://github.com/IonicaBizau/json2md)