{"id":13564145,"url":"https://github.com/janhalfar/spreadsheet-cms","last_synced_at":"2025-11-26T11:05:32.424Z","repository":{"id":142019375,"uuid":"297579954","full_name":"janhalfar/spreadsheet-cms","owner":"janhalfar","description":"a hack to generate static content from a google spreadsheet","archived":false,"fork":false,"pushed_at":"2020-09-22T12:55:22.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-17T00:45:00.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/janhalfar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-09-22T08:09:40.000Z","updated_at":"2021-10-20T01:27:00.000Z","dependencies_parsed_at":"2023-07-07T07:45:19.725Z","dependency_job_id":null,"html_url":"https://github.com/janhalfar/spreadsheet-cms","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/janhalfar/spreadsheet-cms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janhalfar%2Fspreadsheet-cms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janhalfar%2Fspreadsheet-cms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janhalfar%2Fspreadsheet-cms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janhalfar%2Fspreadsheet-cms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janhalfar","download_url":"https://codeload.github.com/janhalfar/spreadsheet-cms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janhalfar%2Fspreadsheet-cms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286079811,"owners_count":27282121,"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","status":"online","status_checked_at":"2025-11-26T02:00:06.075Z","response_time":193,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-01T13:01:27.120Z","updated_at":"2025-11-26T11:05:32.389Z","avatar_url":"https://github.com/janhalfar.png","language":"Go","readme":"# spreadsheet-cms\n\na hack to generate static content from a google spreadsheet\n\n## expectations for data\n\n- first row defines fields\n- must contain unique id column\n- text delimiter is `\"`\n- field separator `,`\n- localize fields, by appending `-\u003clang\u003e`\n\n[example/data.csv](example/data.csv)\n\n### lists in data\n\nIf you want to define a list in your data, the list item delimiter is an new line and use the List function.\n\n## Usage\n\n```bash\nspreadsheet-cms -csv https://server.com/data.csv -languages de,en -out path/to/out-dir -asset-dir path/to/assets\n```\n\n## Templating\n\n- uses go std lib templates [https://golang.org/pkg/html/template/](https://golang.org/pkg/html/template/)\n- the hugo.io docs have a solid intro [https://gohugo.io/templates/introduction/](https://gohugo.io/templates/introduction/)\n\n### Template funcs\n\n#### Check for assets\n\n```html\n{{ $asset := print .id \".jpg\" }}\n{{ if HasAsset $asset }}\n    \u003cimg src=\"./path/to/assets/{{$asset}}\"\u003e\n{{ end }}\n```\n\n#### Check for empty values\n\n```html\n{{ if Empty .name }}\n    \u003ch1\u003eNo name given\u003c/h1\u003e\n{{ else }}\n    \u003ch1\u003e{{.name}}\u003c/h1\u003e\n{{ end }}\n```\n\n#### Lists\n\n```html\n\u003cul\u003e\n    {{ range $listItem := List .features }}\n        \u003cli\u003e{{$listItem}}\u003c/li\u003e\n    {{ end }}\n\u003c/ul\u003e\n```\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanhalfar%2Fspreadsheet-cms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanhalfar%2Fspreadsheet-cms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanhalfar%2Fspreadsheet-cms/lists"}