{"id":13431477,"url":"https://github.com/tj/mdconf","last_synced_at":"2025-04-06T05:16:14.354Z","repository":{"id":41183349,"uuid":"10494532","full_name":"tj/mdconf","owner":"tj","description":"Markdown driven configuration! ","archived":false,"fork":false,"pushed_at":"2017-11-24T00:19:15.000Z","size":14,"stargazers_count":513,"open_issues_count":4,"forks_count":19,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T03:11:04.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tj.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-05T03:51:55.000Z","updated_at":"2025-02-23T12:13:40.000Z","dependencies_parsed_at":"2022-09-12T08:10:59.428Z","dependency_job_id":null,"html_url":"https://github.com/tj/mdconf","commit_stats":null,"previous_names":["visionmedia/mdconf"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fmdconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fmdconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fmdconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fmdconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tj","download_url":"https://codeload.github.com/tj/mdconf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247436286,"owners_count":20938533,"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":[],"created_at":"2024-07-31T02:01:03.392Z","updated_at":"2025-04-06T05:16:14.185Z","avatar_url":"https://github.com/tj.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","ASCII","Datafile Formats"],"sub_categories":[],"readme":"# mdconf\n\n  Markdown driven configuration!\n\n  Using the fantastic markdown parser [marked](https://github.com/chjj/marked).\n\n## Installation\n\n```\n$ npm install mdconf\n```\n\n## ports\n\n- [Python port](https://github.com/hit9/mdconf.py)\n\n## API\n\n```js\nvar parse = require('mdconf');\nparse('string of markdown');\n// =\u003e Object\n```\n\n## Example\n\nMarkdown headings act as keys, list items with `:` act as maps,\notherwise regular lists behave as.. lists.\n\n```markdown\n# Defaults\n\n  Since this is markdown you can still have regular text\n  to explain what the hell is going on.\n\n## Upload\n\n  - max: 200mb\n  - dir: /tmp\n\n### Thumbnail sizes\n\n  - 50x50\n  - 300x300\n  - 600x600\n  - 900x900\n\n## S3\n\n  - api key: 111111\n  - secret: 222222\n\n### Buckets\n\n  - avatars: myapp-avatars\n  - assets: myapp-assets\n  - files: myapp-files\n\n# Production\n\n## Upload\n\n  - max: 1gb\n  - dir: /data/uploads\n\n## Sites\n\n| hostname     | build   | coverage  |\n| :----------- | :------:| --------: |\n| google.com   | passing |       94% |\n| facebook.com | passing |       97% |\n| twitter.com  | failed  |       81% |\n| myspace.com  | unkown  |       0%  |\n```\n\noutput json:\n\n```json\n{\n  \"defaults\": {\n    \"upload\": {\n      \"max\": \"200mb\",\n      \"dir\": \"/tmp\",\n      \"thumbnail sizes\": [\n        \"50x50\",\n        \"300x300\",\n        \"600x600\",\n        \"900x900\"\n      ]\n    },\n    \"s3\": {\n      \"api key\": \"111111\",\n      \"secret\": \"222222\",\n      \"buckets\": {\n        \"avatars\": \"myapp-avatars\",\n        \"assets\": \"myapp-assets\",\n        \"files\": \"myapp-files\"\n      }\n    }\n  },\n  \"production\": {\n    \"upload\": {\n      \"max\": \"1gb\",\n      \"dir\": \"/data/uploads\"\n    },\n    \"sites\": [\n      {\n        \"hostname\": \"google.com\",\n        \"build\": \"passing\",\n        \"coverage\": \"94%\"\n      },\n      {\n        \"hostname\": \"facebook.com\",\n        \"build\": \"passing\",\n        \"coverage\": \"97%\"\n      },\n      {\n        \"hostname\": \"twitter.com\",\n        \"build\": \"failed\",\n        \"coverage\": \"81%\"\n      },\n      {\n        \"hostname\": \"myspace.com\",\n        \"build\": \"unkown\",\n        \"coverage\": \"0%\"\n      }\n    ]\n  }\n}\n```\n\n  With markdown blocks you could easily use this as a tool for\n  static site generation:\n\n```md\n\n# Scripts\n\n  My site does almost nothing:\n\n    document.write('\u003ch1\u003emdconf\u003c/h1\u003e')\n    document.write('\u003cp\u003eMarkdown configuration is pretty cool\u003c/p\u003e')\n\n# Styles\n\n  Main structural styling:\n\n    body {\n      padding: 50px;\n      font: 14px Helvetica;\n    }\n\n  Some other stuff:\n\n    button {\n      padding: 15px;\n    }\n```\n\n yields:\n\n```js\n{\n  \"scripts\": [\n    \"document.write('\u003ch1\u003emdconf\u003c/h1\u003e')\\ndocument.write('\u003cp\u003eMarkdown configuration is pretty cool\u003c/p\u003e')\"\n  ],\n  \"styles\": [\n    \"body {\\n  padding: 50px;\\n  font: 14px Helvetica;\\n}\",\n    \"button {\\n  padding: 15px;\\n}\"\n  ]\n}\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2013 TJ Holowaychuk \u0026lt;tj@vision-media.ca\u0026gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftj%2Fmdconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftj%2Fmdconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftj%2Fmdconf/lists"}