{"id":19909076,"url":"https://github.com/dyne/markdown-inline-tag","last_synced_at":"2025-06-15T22:32:27.040Z","repository":{"id":141086381,"uuid":"149987888","full_name":"dyne/markdown-inline-tag","owner":"dyne","description":"Render the content of \u003cmarkdown\u003e\u003c/markdown\u003e tags inside an HTML file using Pandoc","archived":false,"fork":false,"pushed_at":"2018-09-23T17:38:20.000Z","size":20,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-07T10:35:43.177Z","etag":null,"topics":["html","inline","markdown","pandoc","website"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dyne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-09-23T13:39:37.000Z","updated_at":"2020-10-11T23:49:24.000Z","dependencies_parsed_at":"2023-06-25T23:57:15.233Z","dependency_job_id":null,"html_url":"https://github.com/dyne/markdown-inline-tag","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"2bae9d54ad81473d929caa7f798e4157902ad064"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyne%2Fmarkdown-inline-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyne%2Fmarkdown-inline-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyne%2Fmarkdown-inline-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyne%2Fmarkdown-inline-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyne","download_url":"https://codeload.github.com/dyne/markdown-inline-tag/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252133723,"owners_count":21699586,"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":["html","inline","markdown","pandoc","website"],"created_at":"2024-11-12T21:14:18.852Z","updated_at":"2025-05-03T02:31:33.522Z","avatar_url":"https://github.com/dyne.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Markdown inline HTML tag\n\nThis is a minimalist tool to process HTML files that contain a\n`\u003cmarkdown\u003e` tag, rendering their content inline inside HTML.\n\nThis tool is a shell script pre-processor meant to render files before\npublication and is suitable to use inside any POSIX system including\nbasic GNU or BSD implementations providing Grep and Awk, like\nApple/OSX and the GNU/Linux Subsystem in MS/Windows 10. It will likely\nperform very well on both x86 and ARM platforms, thanks to the\nadoption of [Pandoc](http://pandoc.org) and [Zsh](http://pandoc.org)\nfor the implementation.\n\nMarkdown-inline-tag is derived from this other software\n[Webnomad](https://github.com/dyne/webnomad). Here the script is\npublished externally to be more portable inside larger setups and\nother web publishing software based on npm, yarn and similar tools.\n\n## Requirements and portability\n\nThis tool requires the following dependencies to be installed:\n\n```\nzsh pandoc awk grep\n```\n\nGiven the above components are installed, it is expected to run on any\nplatform: GNU/Linux, Apple/OSX and MS/Windows.\n\n## Simple usage\n\nImagine having an `input.html` file containing plain HTML and then\nusing a special tag `\u003cmarkdown\u003e` which is not recognized by any\nbrowser. In order to publish the file then the contents included\ninside the tag would have to be transformed in HTML at the same place\ninside the file (and the tag removed of course). This is exactly what\nthis tool does, for instance with the input file:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\t\u003chead\u003e\n\t\t\u003ctitle\u003eMixing Markdown and HTML is fun\u003c/title\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003cdiv class=\"container\"\u003e\n\t\t\t\u003cmarkdown\u003e\n# This is a Title in markdown\n\nThis is a paragraph in markdown\n\n- This\n- Is a list\n- of items\n- in markdown\n\n| This | Is  | A Table  | In Markdown |\n| ---  | --- | ---      | ---         |\n| And  | It  | Is Also  | In HTML     |\n| Once | Is  | Rendered | By Pandoc   |\n\t\t\t\u003c/markdown\u003e\n\t\t\u003c/div\u003e\n\t\t\u003cfooter\u003eThis is a footer in HTML\u003c/footer\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n```\n\nWill be tranformed into:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\t\u003chead\u003e\n\t\t\u003ctitle\u003eMixing Markdown and HTML is fun\u003c/title\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003cdiv class=\"container\"\u003e\n\u003ch1 id=\"this-is-a-title-in-markdown\"\u003eThis is a Title in markdown\u003c/h1\u003e\n\u003cp\u003eThis is a paragraph in markdown\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eThis\u003c/li\u003e\n\u003cli\u003eIs a list\u003c/li\u003e\n\u003cli\u003eof items\u003c/li\u003e\n\u003cli\u003ein markdown\u003c/li\u003e\n\u003c/ul\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr class=\"header\"\u003e\n\u003cth\u003eThis\u003c/th\u003e\n\u003cth\u003eIs\u003c/th\u003e\n\u003cth\u003eA Table\u003c/th\u003e\n\u003cth\u003eIn Markdown\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003eAnd\u003c/td\u003e\n\u003ctd\u003eIt\u003c/td\u003e\n\u003ctd\u003eIs Also\u003c/td\u003e\n\u003ctd\u003eIn HTML\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003eOnce\u003c/td\u003e\n\u003ctd\u003eIs\u003c/td\u003e\n\u003ctd\u003eRendered\u003c/td\u003e\n\u003ctd\u003eBy Pandoc\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\t\t\u003c/div\u003e\n\t\t\u003cfooter\u003eThis is a footer in HTML\u003c/footer\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n```\n\nTo be run, our tool takes two arguments: input file and output file\n\n```sh\nmarkdown-inline-tag input.html output.html\n```\n\nlaunching it this way will not modify the input.html and will\noverwrite the output.html without confirmation.\n\n## NodeJS usage\n\nThe typical use of a NodeJs setup will be watching file changes and\nlive updating. The option `-w` runs markdown-inline-tag in a loop\nrefreshing results at every change of the input file. For instance\ninside a `package.json` npm file one can add into the `scripts`\nsection:\n\n```json\n\"scripts\": {\n\t\"index\": \"markdown-inline-tag -w views/index.html pub/index.html\",\n}\n```\nTo live render the contents of `views/index.html` into\n`pub/index.html`.\n\n## Acknowledgements\n\nMarkdown-inline-tag is Copyright (C) 2012-2018 by Dyne.org foundation\n\nDesigned, written and maintained by Denis Roio \u003cjaromil@dyne.org\u003e\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as\npublished by the Free Software Foundation, either version 3 of the\nLicense, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\nAffero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public\nLicense along with this program. If not, see\nhttp://www.gnu.org/licenses\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyne%2Fmarkdown-inline-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyne%2Fmarkdown-inline-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyne%2Fmarkdown-inline-tag/lists"}