{"id":24983677,"url":"https://github.com/posthtml/posthtml-include-md","last_synced_at":"2025-06-30T23:03:14.477Z","repository":{"id":34115854,"uuid":"170131121","full_name":"posthtml/posthtml-include-md","owner":"posthtml","description":"Include markdown plugin for PostHTML","archived":false,"fork":false,"pushed_at":"2023-01-03T23:33:36.000Z","size":1088,"stargazers_count":2,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-08T14:04:59.136Z","etag":null,"topics":["includes","markdown","posthtml"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/posthtml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-11T13:14:04.000Z","updated_at":"2021-09-21T09:44:21.000Z","dependencies_parsed_at":"2023-01-15T04:45:33.000Z","dependency_job_id":null,"html_url":"https://github.com/posthtml/posthtml-include-md","commit_stats":null,"previous_names":["tiaanduplessis/posthtml-include-md"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/posthtml/posthtml-include-md","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-include-md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-include-md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-include-md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-include-md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/posthtml-include-md/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-include-md/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260541520,"owners_count":23024976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["includes","markdown","posthtml"],"created_at":"2025-02-04T09:20:16.457Z","updated_at":"2025-06-30T23:03:14.445Z","avatar_url":"https://github.com/posthtml.png","language":"JavaScript","readme":"\n# posthtml-include-md\n[![package version](https://img.shields.io/npm/v/posthtml-include-md.svg?style=flat-square)](https://npmjs.org/package/posthtml-include-md)\n[![package downloads](https://img.shields.io/npm/dm/posthtml-include-md.svg?style=flat-square)](https://npmjs.org/package/posthtml-include-md)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![package license](https://img.shields.io/npm/l/posthtml-include-md.svg?style=flat-square)](https://npmjs.org/package/posthtml-include-md)\n[![make a pull request](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n\u003e Include markdown plugin for PostHTML. Based on [posthtml-include](https://github.com/posthtml/posthtml-include)\n\n## Table of Contents\n\n- [posthtml-include-md](#posthtml-include-md)\n    - [Table of Contents](#table-of-contents)\n    - [Install](#install)\n    - [Usage](#usage)\n    - [Configuration](#configuration)\n    - [Contribute](#contribute)\n    - [License](#license)\n\n## Install\n\nThis project uses [node](https://nodejs.org) and [npm](https://www.npmjs.com). \n\n```sh\n$ npm install posthtml-include-md\n$ # OR\n$ yarn add posthtml-include-md\n```\n\n## Usage\n\n```js\nconst { readFileSync } = require('fs')\n\nconst posthtml = require('posthtml')\nconst includeMD = require('posthtml-include-md')\n\nconst html = readFileSync('index.html')\n\nposthtml([ include({ encoding: 'utf8' }) ])\n    .process(html)\n    .then((result) =\u003e console.log(result.html))\n```\n\nIn the HTML:\n\n```html\n\u003chtml\u003e\n\u003chead\u003e\n    \u003ctitle\u003eindex.html\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003cmarkdown src=\"posts/hello.html\"\u003e\u003c/markdown\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Configuration\n\n\n- `root`: Root folder path for include. Default `./`\n- `encoding`: Default `utf-8`\n\nThis plugin uses [marked.js](https://marked.js.org) to parse markdown files. All of [marked.js](https://marked.js.org)'s [configuration options](https://marked.js.org/#/USING_ADVANCED.md#options) can be passed.\n\n## Contribute\n\n1. Fork it and create your feature branch: `git checkout -b my-new-feature`\n2. Commit your changes: `git commit -am \"Add some feature\"`\n3. Push to the branch: `git push origin my-new-feature`\n4. Submit a pull request\n\n## License\n\nMIT\n    ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-include-md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fposthtml-include-md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-include-md/lists"}