{"id":17303302,"url":"https://github.com/gregjopa/eg-cms","last_synced_at":"2025-04-14T13:08:45.611Z","repository":{"id":8709153,"uuid":"10376804","full_name":"gregjopa/eg-cms","owner":"gregjopa","description":"a simple cms built with ember.js and backed by a google spreadsheet","archived":false,"fork":false,"pushed_at":"2013-06-14T04:17:18.000Z","size":608,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T02:13:01.132Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/gregjopa.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":"2013-05-30T06:22:37.000Z","updated_at":"2024-12-12T22:27:28.000Z","dependencies_parsed_at":"2022-07-09T21:31:03.337Z","dependency_job_id":null,"html_url":"https://github.com/gregjopa/eg-cms","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/gregjopa%2Feg-cms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregjopa%2Feg-cms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregjopa%2Feg-cms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregjopa%2Feg-cms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregjopa","download_url":"https://codeload.github.com/gregjopa/eg-cms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886323,"owners_count":21177643,"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-15T11:50:03.986Z","updated_at":"2025-04-14T13:08:45.209Z","avatar_url":"https://github.com/gregjopa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EG-CMS\n\nA flexible and easy to use cms. This library is built with Ember.js and uses a Google Spreadsheet\nfor storing all site content. You can easily host a EG-CMS website since it's just html, css, and\njavascript. No database or server-side code required.\n\n\n## Demo Spreadsheet\n\nThe following Google Drive spreadsheet is used for the demo site:\nhttps://docs.google.com/spreadsheet/pub?key=0AhVgr8DOJUHsdHE1ajduUEhOaGpuV3VCQTdxV0lCYWc\u0026gid=0\n\nA Google Spreadsheet must be public and published to the web to be used with EG-CMS.\n\n\n## Regular Sheets vs Global Sheets\n\nEach regular sheet in the spreadsheet is for a single page in the cms. However, sometimes you will\nrequire the same information to be displayed on multiple pages (ex: site name, footer text, sidebar).\nFor this scenario, a global sheet should be used. These global sheets are listed in the\n\"globalSheets\" array. Data for each global sheet is stored in the Application Controller.\n\n```javascript\n  // define global sheets on app creation\n  window.App = Ember.Application.create({\n    spreadsheetKey: '0AhVgr8DOJUHsdHE1ajduUEhOaGpuV3VCQTdxV0lCYWc',\n    spreadsheetRootUrl: 'https://spreadsheets.google.com/feeds',\n    globalSheets: ['config', 'social icons']\n  });\n```\n\n\n## Naming Conventions\n\n### Column Names\n\nColumn names in the spreadsheet must be lowercase and must use a dash (-) to separate words\n(ex: site-name, footer-text). Spaces, underscores, and capital letters are NOT supported in column names.\n\nUnfortunately, the Google Spreadsheets API 'feeds' request type doesn't return the exact column names.\nInstead, it formats the column names automatically by striping out any spaces and underscores and\nconverting all letters to lowercase. The Google Spreadsheets API 'cells' request type returns the actual\ncolumn names but that would require an additional api call for every sheet, which just isn't worth it.\nSo underscores and capital letters can not be used in your column names. Instead, use dashes.\n\n- Good Column Name: site-name\n- Bad Column Names: site_name, siteName, site name\n\n### Sheet Names\n\nSheet names can include capital letters, spaces, and underscores. The only restriction is special\ncharacters cannot be used in sheet names.\n\n- Good Sheet Names: Home, Social Icons, Contact Us\n- Bad Sheet Names: Home#, @Contact Us, Order's\n\n\n## Sheet Types\n\nSpreadsheets can contain multiple sheets for categorizing information. There are 2 different ways\nto model data in a sheet:\n\n1. Single Row\n\n  \u003ctable\u003e\n    \u003ctr\u003e\n      \u003cth\u003esite-name\u003c/th\u003e\n      \u003cth\u003esite-tagline\u003c/th\u003e\n      \u003cth\u003efooter-text\u003c/th\u003e\n    \u003c/tr\u003e\n\n    \u003ctr\u003e\n      \u003ctd\u003eEG-CMS\u003c/td\u003e\n      \u003ctd\u003ea flexible and easy to use cms\u003c/td\u003e\n      \u003ctd\u003eCopyright 2013 EG-CMS\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\n  ```javascript\n    {\n      id: 'oda',\n      name: 'config',\n      fields: {\n        siteName: 'EG-CMS',\n        siteTagline: 'a flexible and easy to use cms',\n        footerText: 'Copyright 2013 EG-CMS'\n      }\n    }\n  ```\n\n2. List\n\n  \u003ctable\u003e\n    \u003ctr\u003e\n      \u003cth\u003ename\u003c/th\u003e\n      \u003cth\u003elink\u003c/th\u003e\n      \u003cth\u003eicon-css-class\u003c/th\u003e\n    \u003c/tr\u003e\n\n    \u003ctr\u003e\n      \u003ctd\u003eGitHub\u003c/td\u003e\n      \u003ctd\u003ehttps://github.com/emberjs/ember.js\u003c/td\u003e\n      \u003ctd\u003egithub\u003c/td\u003e\n    \u003c/tr\u003e\n\n    \u003ctr\u003e\n      \u003ctd\u003eTwitter\u003c/td\u003e\n      \u003ctd\u003ehttps://twitter.com/emberjs\u003c/td\u003e\n      \u003ctd\u003etwitter\u003c/td\u003e\n    \u003c/tr\u003e\n\n    \u003ctr\u003e\n      \u003ctd\u003eGoogle Plus\u003c/td\u003e\n      \u003ctd\u003ehttps://plus.google.com/communities/106387049790387471205\u003c/td\u003e\n      \u003ctd\u003egoogle-plus\u003c/td\u003e\n    \u003c/tr\u003e\n\n  \u003c/table\u003e\n\n  ```javascript\n    {\n      id: 'odb',\n      name: 'social icons',\n      fields: [\n        {\n          name: 'GitHub',\n          link: 'https://github.com/emberjs/ember.js',\n          iconCssClass: 'github'\n        },\n        {\n          name: 'Twitter',\n          link: 'https://twitter.com/emberjs',\n          iconCssClass: 'twitter'\n        },\n        {\n          name: 'Google Plus',\n          link: 'https://plus.google.com/communities/106387049790387471205',\n          iconCssClass: 'google-plus'\n        }\n      ]\n    }\n  ```\n\n\n## Google Spreadsheets API\n\nDocumentation: https://developers.google.com/google-apps/spreadsheets/\n\nThe following two HTTP GET requests are used to query data from a public google spreadsheet:\n\n1. Worksheet Feed - provides all sheet names and ids\n\n  ```javascript\n    var spreadsheetKey = '0AhVgr8DOJUHsdHE1ajduUEhOaGpuV3VCQTdxV0lCYWc';\n    $.getJSON('https://spreadsheets.google.com/feeds/worksheets/' + spreadsheetKey + '/public/values?alt=json-in-script\u0026callback=?')\n      .then(function(response) {\n        console.log('all data', response);\n        // returns an array of sheet names and ids\n        console.log('relevant data', response.feed.entry);\n      }\n    );\n  ```\n\n2. List Feed - provides data for a specific sheet in the worksheet. The spreadsheets api assumes the first row\n in each sheet contains column names.\n\n  ```javascript\n    var spreadsheetKey = '0AhVgr8DOJUHsdHE1ajduUEhOaGpuV3VCQTdxV0lCYWc';\n    $.getJSON('https://spreadsheets.google.com/feeds/list/' + spreadsheetKey + '/1/public/values?alt=json-in-script\u0026callback=?')\n      .then(function(response) {\n        console.log('all data', response);\n        // returns an array of data for each row in the sheet\n        console.log('relevant data', response.feed.entry);\n      }\n    );\n  ```\n\n\n## Configure Development Environment\n\n1. clone this repo: `git clone https://github.com/gregjopa/eg-cms.git`\n2. change directory: `cd eg-cms`\n3. install node dependencies: `npm install`\n4. install bower dependencies: `bower install`\n5. start your local dev server: `grunt server --force`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregjopa%2Feg-cms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregjopa%2Feg-cms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregjopa%2Feg-cms/lists"}