{"id":17825466,"url":"https://github.com/soapdog/lua-markdown-extra","last_synced_at":"2025-08-28T23:33:16.686Z","repository":{"id":146157710,"uuid":"70527029","full_name":"soapdog/lua-markdown-extra","owner":"soapdog","description":"A rock that is able to process markdown files with metadata","archived":false,"fork":false,"pushed_at":"2024-01-03T15:59:15.000Z","size":13,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-24T21:03:18.537Z","etag":null,"topics":["lua","luarocks","markdown","metadata"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/soapdog.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-10-10T20:41:25.000Z","updated_at":"2025-03-10T03:14:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"a30e1549-c0e4-41b7-a7c0-c410e312873e","html_url":"https://github.com/soapdog/lua-markdown-extra","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":0.2272727272727273,"last_synced_commit":"1beabec73fb9ca95c32861df7514f552ae630223"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/soapdog/lua-markdown-extra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soapdog%2Flua-markdown-extra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soapdog%2Flua-markdown-extra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soapdog%2Flua-markdown-extra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soapdog%2Flua-markdown-extra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soapdog","download_url":"https://codeload.github.com/soapdog/lua-markdown-extra/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soapdog%2Flua-markdown-extra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272579112,"owners_count":24959044,"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","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["lua","luarocks","markdown","metadata"],"created_at":"2024-10-27T18:13:58.344Z","updated_at":"2025-08-28T23:33:16.625Z","avatar_url":"https://github.com/soapdog.png","language":"Lua","readme":"# lua-markdown-extra\n[![Build Status](https://travis-ci.org/soapdog/lua-markdown-extra.svg?branch=master)](https://travis-ci.org/soapdog/lua-markdown-extra) \n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/soapdog/lua-markdown-extra/master/LICENSE)\n[![LuaRocks](https://img.shields.io/badge/LuaRocks-0.3-blue.svg)](https://luarocks.org/modules/soapdog/lua-markdown-extra)\n[![Lua](https://img.shields.io/badge/Lua-5.1%2C%20JIT%2C%205.2-blue.svg)](https://img.shields.io/badge/Lua-5.1%2C%20JIT%2C%205.2-blue.svg)\n[![GitHub issues](https://img.shields.io/github/issues/soapdog/lua-markdown-extra.svg)](https://github.com/soapdog/lua-markdown-extra/issues)\n[![GitHub stars](https://img.shields.io/github/stars/soapdog/lua-markdown-extra.svg)](https://github.com/soapdog/lua-markdown-extra/stargazers)\n[![GitHub release](https://img.shields.io/github/release/soapdog/lua-markdown-extra.svg?maxAge=2592000)]()\n\nA rock that is able to process markdown files with metadata\n\n## Instalation\n\nYou can install it with [Luarocks](http://luarocks.org)\n\n``` $ luarocks install lua-markdown-extra```\n\n## Usage\n\nConsider the following markdown file:\n\n```\n\u003c!--\ntitle: My Markdown document with metadata\nlayout: just a layout\n--\u003e\nThis is my Markdown\n\n# This is a title\n\nLorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate assumenda provident nisi accusamus animi magnam porro id, vel saepe voluptate similique quia quis exercitationem, soluta, error dolorem modi obcaecati. Iusto?\n```\n\nYou can process it with ```markdown_extra.from_file(filePath)``` or ```markdown_extra.from_string(stringContent)``` both functions return two values ```html, metadata```:\n\n```\nlocal mde = require \"markdown_extra\"\nlocal html, metadata = mde.from_file(\"test.md\")\n```\n\nThe ```html``` will contain your processed markdown, the ```metadata``` will be a table with your metadata. The metadata frontmatter needs to be in [YAML](http://yaml.org) format. If you have an error in your frontmatter, the ```metadata``` variable will be ```nil```.\n\n## API\n\n### markdown_extra.from_file(path)\nProcess the file specified by ```path``` and returns both html and metadata.\n\n### markdown_extra.from_string(stringContent)\nProcess the content specified by ```stringContent``` and returns both html and metadata.\n\n### markdown_extra.set_metadata_delimiters(startDelimiter, endDelimiter)\nChange the delimiters used to find the metadata at the start of the markdown content. The default values are ```\u003c!--``` and ```--\u003e```.\n\n### markdown_extra.enable_unsafe(yes)\nChange the options for `cmark` from `OPT_DEFAULT` to `OPT_UNSAFE`\n\n## Testing\nI am using ```busted``` for testing. You can check our test spec inside the ```spec``` folder.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoapdog%2Flua-markdown-extra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoapdog%2Flua-markdown-extra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoapdog%2Flua-markdown-extra/lists"}