{"id":22161169,"url":"https://github.com/mr-destructive/frontmatter.vim","last_synced_at":"2025-08-13T20:10:54.647Z","repository":{"id":43521026,"uuid":"453959472","full_name":"Mr-Destructive/frontmatter.vim","owner":"Mr-Destructive","description":"Generate Frontmatter in a markdown file by just the name of the SSG","archived":false,"fork":false,"pushed_at":"2022-07-08T16:36:41.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T15:26:09.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","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/Mr-Destructive.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}},"created_at":"2022-01-31T10:19:12.000Z","updated_at":"2023-10-18T04:38:49.000Z","dependencies_parsed_at":"2022-09-02T03:12:21.765Z","dependency_job_id":null,"html_url":"https://github.com/Mr-Destructive/frontmatter.vim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mr-Destructive/frontmatter.vim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mr-Destructive%2Ffrontmatter.vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mr-Destructive%2Ffrontmatter.vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mr-Destructive%2Ffrontmatter.vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mr-Destructive%2Ffrontmatter.vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mr-Destructive","download_url":"https://codeload.github.com/Mr-Destructive/frontmatter.vim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mr-Destructive%2Ffrontmatter.vim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270305630,"owners_count":24562087,"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-13T02:00:09.904Z","response_time":66,"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":[],"created_at":"2024-12-02T04:13:32.848Z","updated_at":"2025-08-13T20:10:54.616Z","avatar_url":"https://github.com/Mr-Destructive.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Front-matter.vim\n\nA simple plugin for writing the front-matter for a given SSG generator name. \n\n1. Add the [frontmatter plugin](https://github.com/Mr-Destructive/frontmatter.vim) to your preferred plugin manager's plugins list.\n2. Add a key-map that maps to `call Frontmatter()`.\n3. Write the SSG(static site generator) name for example `jekyll`.\n4. Visually select it and press escape.\n5. Press that key map and at the top, the front-matter will be generated with a few keys.\n\n### Example:\n\n![Frontmatter Neovim Preview](https://res.cloudinary.com/techstructive-blog/image/upload/v1657116978/projects/markata-frontmatter_neovim.gif)\n\n#### Vimscript \n\n```vimscript\nnnoremap \u003cleader\u003efm :call Frontmatter()\u003ccr\u003e\n```\n\n#### Lua\n\n```lua\nvim.keymap.set(\"n\", \"\u003cleader\u003efm\",  \"\u003ccmd\u003elua require('frontmatter').Frontmatter()\u003ccr\u003e\")\n```\n\n### Features:\n\n- Supports SSGs like\n  - jekyll\n  - Markata\n  - Hugo\n  - Hexo\n  - Gatsby\n- Automatically sets current date.\n\n### Customization\n\nThe `Frontmatter` function can take in two parameters -\u003e (`type_of_customization`, `{list of frontmatter}` )\n1. Type of Customization -\u003e `add` or `list` \n2.  List of Frontmatter -\u003e A Lua table of strings representing the frontamtter keys\n\nAdd a custom keymap in your vimrc, init.vim or init.lua file.\n\n- Add to an already existing frontmatter\n\n  - Vim\n  ```vimscript\n  nnoremap \u003cleader\u003efm :lua require('frontmatter').Frontmatter(\"add\", {'series', 'image_url'})\u003cCR\u003e\n  ```\n  \n  - Lua\n  ```lua\n  vim.keymap.set('n', '\u003cleader\u003efm', \"\u003ccmd\u003elua require('frontmatter').Frontmatter('add',{'series', 'image_url'})\u003ccr\u003e\")\n  ```\n\n- Create a new set of frontmatter\n\n  - Vim\n  ```vimscript\n  nnoremap \u003cleader\u003efm :lua require('frontmatter').Frontmatter(\"list\", {'layout', 'status', 'series', 'series_description', 'image_url'})\u003cCR\u003e\n  ```\n  \n  - Lua\n  ```lua\n  vim.keymap.set('n', '\u003cleader\u003efm', \"\u003ccmd\u003elua require('frontmatter').Frontmatter('list',{'layout', 'status', 'series', 'image_url'})\u003ccr\u003e\")\n  ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-destructive%2Ffrontmatter.vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmr-destructive%2Ffrontmatter.vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-destructive%2Ffrontmatter.vim/lists"}