{"id":20041260,"url":"https://github.com/gernest/front","last_synced_at":"2025-07-16T12:41:27.251Z","repository":{"id":36264178,"uuid":"40568619","full_name":"gernest/front","owner":"gernest","description":"extracts frontmatter from text files with ease with golang.","archived":false,"fork":false,"pushed_at":"2021-03-01T11:54:36.000Z","size":11,"stargazers_count":57,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T08:41:09.832Z","etag":null,"topics":["extracts-frontmatter","frontmatter","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/gernest.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":"2015-08-11T22:38:35.000Z","updated_at":"2025-04-16T15:47:04.000Z","dependencies_parsed_at":"2022-09-01T08:51:17.992Z","dependency_job_id":null,"html_url":"https://github.com/gernest/front","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gernest/front","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gernest%2Ffront","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gernest%2Ffront/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gernest%2Ffront/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gernest%2Ffront/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gernest","download_url":"https://codeload.github.com/gernest/front/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gernest%2Ffront/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265509856,"owners_count":23779440,"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":["extracts-frontmatter","frontmatter","golang"],"created_at":"2024-11-13T10:46:00.754Z","updated_at":"2025-07-16T12:41:27.202Z","avatar_url":"https://github.com/gernest.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# front [![Build Status](https://travis-ci.org/gernest/front.svg)](https://travis-ci.org/gernest/front) [![GoDoc](https://godoc.org/github.com/gernest/front?status.svg)](https://godoc.org/github.com/gernest/front)[![Coverage Status](https://coveralls.io/repos/gernest/front/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/gernest/front?branch=master)\n\nextracts frontmatter from text files with ease.\n\n## Features\n* Custom delimiters. You are free to register any delimiter of your choice. Provided its a three character string. e.g `+++`,  `$$$`,  `---`,  `%%%`\n* Custom Handlers. Anything that implements `HandlerFunc` can be used to decode the values from the frontmatter text, you can see the `JSONHandler` for how to implement one.\n* Support YAML frontmatter\n* Support JSON frontmatter.\n\n## Installation\n\n\tgo get github.com/gernest/front\n\n## How to use\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/gernest/front\"\n)\n\nvar txt = `+++\n{\n    \"title\":\"front\"\n}\n+++\n\n# Body\nOver my dead body\n`\n\nfunc main() {\n\tm := front.NewMatter()\n\tm.Handle(\"+++\", front.JSONHandler)\n\tf, body, err := m.Parse(strings.NewReader(txt))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"The front matter is:\\n%#v\\n\", f)\n\tfmt.Printf(\"The body is:\\n%q\\n\", body)\n}\n```\n\nPlease see the tests formore details\n\n## Licence\n\nThis project is under the MIT Licence. See the [LICENCE](LICENCE) file for the full license text.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgernest%2Ffront","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgernest%2Ffront","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgernest%2Ffront/lists"}