{"id":16747715,"url":"https://github.com/bryanp/contentfs","last_synced_at":"2025-04-10T13:50:51.809Z","repository":{"id":53076326,"uuid":"312077764","full_name":"bryanp/contentfs","owner":"bryanp","description":"Structured content file system.","archived":false,"fork":false,"pushed_at":"2022-11-09T01:10:39.000Z","size":69,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T09:57:51.440Z","etag":null,"topics":["content-management","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bryanp.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":"2020-11-11T20:07:38.000Z","updated_at":"2023-04-11T15:09:45.000Z","dependencies_parsed_at":"2023-01-22T05:22:13.496Z","dependency_job_id":null,"html_url":"https://github.com/bryanp/contentfs","commit_stats":null,"previous_names":["metabahn/contentfs"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanp%2Fcontentfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanp%2Fcontentfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanp%2Fcontentfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanp%2Fcontentfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryanp","download_url":"https://codeload.github.com/bryanp/contentfs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248228285,"owners_count":21068657,"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":["content-management","ruby"],"created_at":"2024-10-13T02:10:44.452Z","updated_at":"2025-04-10T13:50:51.791Z","avatar_url":"https://github.com/bryanp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# contentfs\n\nA structured content file system.\n\n## Install\n\n```\ngem install contentfs\n```\n\n## Usage\n\nContent can be defined in a structure like this:\n\n```\ndocs/\n  api/\n    application/\n      content.md\n\n      class_api/\n        new.md\n      instance_api/\n        ...\n  guides/\n    ...\n```\n\nOnce defined, content can be accessed through ContentFS:\n\n```ruby\nrequire \"contentfs\"\n\ndatabase = ContentFS::Database.load(\"path/to/docs\")\n\ndatabase.docs.api.application.render\n```\n\nThe `content` name is special in that it defines content for the containing folder.\n\n### Formats\n\nMarkdown is supported by default. Simply add the `commonmarker` gem to your project's `Gemfile`. For automatic syntax highlighting, add the `rouge` to your `Gemfile` as well.\n\nUnknown formats default to plain text.\n\n### Metadata\n\nMetadata can be defined on content through front-matter:\n\n```\n---\noption: value\n---\n\n...\n```\n\nMetadata can be applied to all content in a folder by defining a `_metadata.yml` file. The folder's metadata is merged with metadata defined in front-matter, with precedence given to the front-matter metadata values.\n\n### Filtering\n\nContent can be filtered by one or more metadata values:\n\n```ruby\ndatabase.filter(option: \"value\") do |content|\n  ...\nend\n```\n\n### Iterating\n\nIterate over content using the `all` method:\n\n```ruby\ndatabase.content.all do |content|\n  ...\nend\n```\n\n### Prefixes\n\nBoth folders and content can be defined with prefixes, useful for ordering:\n\n```\ndocs/\n  api/\n    0000__application/\n      ...\n```\n\nCharacters up to `__` (double underscore) are considered part of the prefix.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanp%2Fcontentfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryanp%2Fcontentfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanp%2Fcontentfs/lists"}