{"id":16124413,"url":"https://github.com/jongacnik/frank","last_synced_at":"2025-06-12T02:37:52.491Z","repository":{"id":23315596,"uuid":"26675440","full_name":"jongacnik/Frank","owner":"jongacnik","description":"👴🏼  A super-micro flat-file cms(ish) in a single PHP file for basic websites.","archived":false,"fork":false,"pushed_at":"2014-11-15T21:48:55.000Z","size":128,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T18:19:45.299Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/jongacnik.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":"2014-11-15T09:34:39.000Z","updated_at":"2020-11-28T10:51:38.000Z","dependencies_parsed_at":"2022-08-21T22:50:11.584Z","dependency_job_id":null,"html_url":"https://github.com/jongacnik/Frank","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongacnik%2FFrank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongacnik%2FFrank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongacnik%2FFrank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongacnik%2FFrank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jongacnik","download_url":"https://codeload.github.com/jongacnik/Frank/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247479745,"owners_count":20945512,"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-10-09T21:21:18.116Z","updated_at":"2025-04-06T12:23:41.988Z","avatar_url":"https://github.com/jongacnik.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frank\n\nFrank is a super-micro flat-file cms(ish) in a single [PHP](http://php.net/) file for basic websites.\n\n## Overview\n\nTo call Frank a cms might be incorrect. It simply creates a structured object from a directory of content. In that way, Frank takes cues from flat-file content management systems like [Kirby](http://getkirby.com/) or [Stacey](https://github.com/kolber/stacey) but purposefully does excruciatingly less. It's probably most useful for providing an easy way to structure data for single-page websites, though it could easily be combined with a router to build more complex things.\n\n## Getting Started\n\nYour content directory will be turned into a useful object. A single `site()` method is exposed for accessing this object:\n\n\t# app.php\n\trequire('frank.php');\n\t$frank = new Frank(); // optionally pass in path to your content\n\t\n\tprint_r($frank-\u003esite()); // site object\n\t\nTo install, download Frank and place it into your project. Create a content directory (by default a Frank instance will look for this directory parallel to itself in `./content`, but you can name this anything and place this anywhere) and add some content.\n\n## Structuring Content\n\nYour content directory can be organized basically any way you like:\n\n\t# Example Directory Structure\n\t\n\tcontent/\n\t\t1-projects/\n\t\t\t1-projectA/\n\t\t\t\t1.jpg\n\t\t\t\t2.jpg\n\t\t\t\tinfo.json\n\t\t\t2-projectB/\n\t\t\t\t1.jpg\n\t\t\t\t2.jpg\n\t\t\t\tinfo.json\n\t\t\tprojectC/\n\t\t\t\t1.jpg\n\t\t\t\tinfo.json\n\t\t2-about/\n\t\t\tinfo.json\n\t\t\t\nThe Frank site object for that directory would look like:\n\n\t# Example Site Object\n\t\n\tstdClass Object (\n\t\t[projects] =\u003e stdClass Object (\n\t\t\t[projectA] =\u003e stdClass Object (\n\t\t\t\t[images] =\u003e Array (\n\t\t\t\t\t[0] =\u003e ./content/1-projects/1-projectA/1.jpg\n\t\t\t\t\t[1] =\u003e ./content/1-projects/1-projectA/2.jpg\n\t\t\t\t)\n\t\t\t\t[info] =\u003e stdClass Object (\n\t\t\t\t\t[name] =\u003e Project A\n\t\t\t\t)\n\t\t\t)\n\t\t\t[projectB] =\u003e stdClass Object (\n\t\t\t\t[images] =\u003e Array (\n\t\t\t\t\t[0] =\u003e ./content/1-projects/2-projectB/1.jpg\n\t\t\t\t\t[1] =\u003e ./content/1-projects/2-projectB/2.jpg\n\t\t\t\t)\n\t\t\t\t[info] =\u003e stdClass Object (\n\t\t\t\t\t[name] =\u003e Project B\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t\t[about] =\u003e stdClass Object (\n\t\t\t[info] =\u003e stdClass Object (\n\t\t\t\t[about] =\u003e Some about text.\n\t\t\t)\n\t\t)\n\t)\n\n#### Directories\n\nDirectories should be named with url-safe characters. Directories are arranged by a numerical index prepended to the directory name. If a directory name is not prepended with an index, Frank will ignore the directory entirely. This is useful for super quick deactivation of data.\n\n#### Images\n\nAny images within a directory are placed into an `array() images`\n\n#### Info\n\nAn info.json file within a directory is decoded and the results placed into an `array() info`\n\n#### Files\n\nAny additional files within a directory are placed into an `array() files`\n\n## Notes\n\nFrank can, should, and probably will, be made more robust. For the moment, you should name your directories with slug friendly characters and be aware that certain files could break Frank entirely. Currently I use Frank in combination with caching in a sort of faux static-site scenario. Drop bugs or suggestions into Issues, if you'd like. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongacnik%2Ffrank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjongacnik%2Ffrank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongacnik%2Ffrank/lists"}