{"id":18667747,"url":"https://github.com/temando/remark-metadata","last_synced_at":"2025-10-11T22:47:55.210Z","repository":{"id":56695526,"uuid":"112279895","full_name":"temando/remark-metadata","owner":"temando","description":"Add metadata about a Markdown file as Front Matter.","archived":false,"fork":false,"pushed_at":"2020-10-24T16:53:43.000Z","size":42,"stargazers_count":1,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T19:53:37.971Z","etag":null,"topics":["remark","remark-plugin"],"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/temando.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-11-28T03:18:57.000Z","updated_at":"2020-10-22T01:18:58.000Z","dependencies_parsed_at":"2022-08-15T23:31:01.600Z","dependency_job_id":null,"html_url":"https://github.com/temando/remark-metadata","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temando%2Fremark-metadata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temando%2Fremark-metadata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temando%2Fremark-metadata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temando%2Fremark-metadata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temando","download_url":"https://codeload.github.com/temando/remark-metadata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248496286,"owners_count":21113804,"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":["remark","remark-plugin"],"created_at":"2024-11-07T08:39:56.272Z","updated_at":"2025-10-11T22:47:55.147Z","avatar_url":"https://github.com/temando.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# remark-metadata\n\n[![NPM](https://img.shields.io/npm/v/remark-metadata.svg)](https://npmjs.org/packages/remark-metadata/)\n[![Travis CI](https://img.shields.io/travis/temando/remark-metadata.svg)](https://travis-ci.org/temando/remark-metadata)\n[![MIT License](https://img.shields.io/github/license/temando/remark-metadata.svg)](https://en.wikipedia.org/wiki/MIT_License)\n\nAdds meta data about a Markdown file to a Markdown file, formatted as [Front Matter](https://jekyllrb.com/docs/frontmatter/).\n\nThe following meta data is added:\n\n- `lastModifiedAt` using one of the following heuristics:\n  1. the `vFile` has the property `data.lastModifiedAt` defined\n  1. if [`git`](https://git-scm.com/) exists, the commit time of the file\n  1. the `mtime` reported by Node's `stat` method.\n\n## Installation\n\n```sh\n$ npm install remark-metadata\n```\n\nRequires [`remark-frontmatter`](https://github.com/wooorm/remark-frontmatter).\n\n## Usage\n\nGiven a file, `example.md`, which contains the following Markdown:\n\n```md\n---\ntitle: Example\n---\n\n# Example\n\nThis is an example\n```\n\nUsing remark like follows:\n\n```js\nvar vfile = require('to-vfile');\nvar remark = require('remark');\nvar frontmatter = require('remark-frontmatter');\nvar metadata = require('remark-metadata');\n\nvar example = vfile.readSync('example.md');\n\nremark()\n  .use(frontmatter)\n  .use(metadata, { git: true })\n  .process(example, function (err, file) {\n    if (err) throw err;\n    console.log(String(file))\n    })\n  });\n```\n\nThis will output the following Markdown:\n\n```md\n---\ntitle: Example\nlastModifiedDate: 'Tue, 28 Nov 2017 02:44:25 GMT'\n\n---\n\n# Example\n\nThis is an example\n```\n\nIf a file has no Front Matter, it will be added by this plugin.\n\n### Options\n\nThe plugin has the following options:\n\n- `git`: Enables determining modification dates using git (defaults: `true`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemando%2Fremark-metadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemando%2Fremark-metadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemando%2Fremark-metadata/lists"}