{"id":23310128,"url":"https://github.com/zacharytamas/tailmatter","last_synced_at":"2026-02-06T10:02:20.327Z","repository":{"id":65514106,"uuid":"248321900","full_name":"zacharytamas/tailmatter","owner":"zacharytamas","description":"Decodes and encodes Yaml-formatted metadata into the end of Markdown documents.","archived":false,"fork":false,"pushed_at":"2025-07-29T17:35:07.000Z","size":451,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-01T18:14:56.192Z","etag":null,"topics":["markdown","yaml"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/zacharytamas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-18T19:17:45.000Z","updated_at":"2025-07-29T17:35:06.000Z","dependencies_parsed_at":"2025-05-26T19:39:18.412Z","dependency_job_id":"78f7cda4-7dd8-451a-ab73-bde85d25fd1f","html_url":"https://github.com/zacharytamas/tailmatter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zacharytamas/tailmatter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacharytamas%2Ftailmatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacharytamas%2Ftailmatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacharytamas%2Ftailmatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacharytamas%2Ftailmatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zacharytamas","download_url":"https://codeload.github.com/zacharytamas/tailmatter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacharytamas%2Ftailmatter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29157469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T07:18:23.844Z","status":"ssl_error","status_checked_at":"2026-02-06T07:13:32.659Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["markdown","yaml"],"created_at":"2024-12-20T13:16:15.992Z","updated_at":"2026-02-06T10:02:20.269Z","avatar_url":"https://github.com/zacharytamas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tailmatter\n\n[![GitHub][github-badge]][github]\n[![Stars][]][github]\n[![Version][]][npm]\n![][size]\n\n[github]: https://github.com/zacharytamas/tailmatter\n[github-badge]: https://flat.badgen.net/badge/-/github?icon=github\u0026label\n[stars]: https://badgen.net/github/stars/zacharytamas/tailmatter\n[version]: https://flat.badgen.net/npm/v/tailmatter\n[npm]: https://npmjs.com/package/tailmatter\n[size]: https://flat.badgen.net/bundlephobia/minzip/tailmatter\n\nThis library does what you might expect: it's a frontmatter parser where the Yaml\ncomponent is at the end of the file instad of the beginning. It's pretty esoteric but an\nimportant part of something I'm building where I want the ability to add metadata to\nMarkdown documents but I want to keep the content of the document front and center.\n\n## Installation\n\nThis package is published on `npm` and can easily be added like so:\n\n```bash\nnpm i tailmatter\n```\n\n## Usage\n\nAn example of how to use this package:\n\n```javascript\nimport { load, dump } from 'tailmatter';\nimport { stripIndent } from 'common-tags'; // optional, for demonstration\n\nconst myMarkdown = stripIndent`\n  # My markdown\n\n  Testing paragraph\n  ---\n  test: true\n  ---\n`;\n\nconst result = load(myMarkdown);\n\n// result is:\n\n{\n body: '# My markdown\\n\\nTesting paragraph',\n meta: { test: true }\n}\n```\n\n### Types\n\nThis library is authored in [TypeScript](https://www.typescriptlang.org/) and is published\nwith first-party types.\n\nThe type returned by the `load` method is generic so that you can specify the type of the\nmetadata you expect. **If you do not provide a type it will be assumed as `any`.**\n\nFor example:\n\n```typescript\nimport { load } from 'tailmatter';\nimport { stripIndent } from 'common-tags'; // optional, for demonstration\n\ninterface Metadata {\n  test: boolean;\n}\n\nconst myMarkdown = stripIndent`\n  # My markdown\n\n  Testing paragraph\n  ---\n  test: true\n  ---\n`;\n\nconst result = load\u003cMetadata\u003e(myMarkdown);\n\n// TypeScript now knows that `result.meta.test` is a `boolean` value.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacharytamas%2Ftailmatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzacharytamas%2Ftailmatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacharytamas%2Ftailmatter/lists"}