{"id":26045388,"url":"https://github.com/zigomir/middle_drive","last_synced_at":"2025-04-10T11:12:12.911Z","repository":{"id":9997462,"uuid":"12030381","full_name":"zigomir/middle_drive","owner":"zigomir","description":"Google Drive Middleman integration","archived":false,"fork":false,"pushed_at":"2014-09-16T03:33:08.000Z","size":224,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-05T04:39:00.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/zigomir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-11T03:01:38.000Z","updated_at":"2017-10-11T07:33:51.000Z","dependencies_parsed_at":"2022-09-13T18:21:35.812Z","dependency_job_id":null,"html_url":"https://github.com/zigomir/middle_drive","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigomir%2Fmiddle_drive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigomir%2Fmiddle_drive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigomir%2Fmiddle_drive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigomir%2Fmiddle_drive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zigomir","download_url":"https://codeload.github.com/zigomir/middle_drive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208563,"owners_count":21065202,"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":"2025-03-07T19:52:56.105Z","updated_at":"2025-04-10T11:12:12.897Z","avatar_url":"https://github.com/zigomir.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MiddleDrive\n\n## Quick start\n\n```bash\ngem install middleman\nmiddleman init new_site\n```\n\nTo `Gemfile` in `new_site` add `middle_drive`\n\n```\ngem 'middle_drive'\n```\n\nThen run\n\n```bash\ncd new_site\nbundle\nmiddle_drive init\n```\n\n## Manual install\n\n```bash\ngem install middle_drive\n```\n\n## Setup\n\n### Middleman setup\n\n```bash\nmiddle_drive init\n```\n\n### Google drive setup conventions\n\n- create a new collection in your google drive. Name it the same like in `middle_drive.yml`'s `site.collection` value.\n- create google spreadsheet named `pages` inside this `site.collection`\n  - each tab in this spreadsheet represents a page\n  - value in first row and first column represents a template which will be used by middleman\n![Example 1](img/spreadsheet.png)\n- create google spreadsheet named `data_:language` inside `site.collection`\n  - each tab in this spreadsheet represents different list\n  - first data cell represents template and data type (template:data_type). Supported data types are `array`, `hash` and `list`.\n![Example 2](img/spreadsheet-data.png)\n- use protected ranges to prevent customer changing the structure of pages: https://support.google.com/drive/answer/63175\n\n\n## Quick helpers\n\n### Hash\n\n```erb\n\u003csection class=\"article\"\u003e\n  \u003ch3\u003e\u003c%= d(locals).title %\u003e\u003c/h3\u003e\n  \u003c%= d(locals).content %\u003e\n  \u003c%= image_tag d(locals).image %\u003e\n\u003c/section\u003e\n```\n\n### List\n\n```erb\n\u003c% d(locals).each do |post| %\u003e\n  \u003ch2\u003e\u003c%= post.title %\u003e\u003c/h2\u003e\n  \u003c%= post.content %\u003e\n  \u003cspan\u003e\u003c%= post.date %\u003e\u003c/span\u003e\n\u003c% end %\u003e\n```\n\n## Usage\n\n```bash\nmiddle_drive\n```\n\nThis command will sync images and page information from your Google Drive collection which was set in\n`middle_drive.yml` file.\n\n```bash\nmiddle_drive update\n```\n\nWill search for update spreadsheet inside collection. If first A1 column will include `please update` value it will\nsync all other data and clear up update flag. This is useful for circular checking if there are new updates to be\nfetched.\n\n## TODO\n- tests!\n- when building from scratch it would be better to start building `pages.yml`, `data.yml`, `en.yml` files locally\nand then run init to build structure on google drive\n- http://tvaughan.github.io/middleman-deploy/ + https://github.com/javan/whenever to run middle_drive update\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigomir%2Fmiddle_drive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzigomir%2Fmiddle_drive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigomir%2Fmiddle_drive/lists"}