{"id":15002350,"url":"https://github.com/dashpilot/s3-ssg","last_synced_at":"2026-02-07T05:33:07.957Z","repository":{"id":57106047,"uuid":"467642933","full_name":"dashpilot/s3-ssg","owner":"dashpilot","description":"Static Site Generator (SSG) for files stored in an S3 Bucket","archived":false,"fork":false,"pushed_at":"2022-03-12T01:35:41.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-29T03:49:44.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dashpilot.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":"2022-03-08T19:10:04.000Z","updated_at":"2022-03-08T19:11:04.000Z","dependencies_parsed_at":"2022-08-21T01:30:51.645Z","dependency_job_id":null,"html_url":"https://github.com/dashpilot/s3-ssg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dashpilot/s3-ssg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpilot%2Fs3-ssg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpilot%2Fs3-ssg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpilot%2Fs3-ssg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpilot%2Fs3-ssg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashpilot","download_url":"https://codeload.github.com/dashpilot/s3-ssg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpilot%2Fs3-ssg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29187221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T05:07:31.176Z","status":"ssl_error","status_checked_at":"2026-02-07T05:06:15.227Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-09-24T18:49:47.505Z","updated_at":"2026-02-07T05:33:07.938Z","avatar_url":"https://github.com/dashpilot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# S3-SSG\n\nStatic Site Generator (SSG) for files stored in an S3 Bucket\n\n## About\n\nGit-based static site generators are awesome, but the build step can take (a lot of) time, which isn't ideal if you use it in combination with a CMS where users expect instant previews. This static site generator aims to provide the best of both worlds: the file-based workflow, developer freedom and fast static hosting of the git-based approach, and the instant feedback and reliability of S3 hosting.\n\n## Installation\n\n`npm install @dashpilot/s3-ssg`\n\n## Example usage\n\nThe example below takes a template from `src/template.html` and json data from `src/data.json`, renders the template and saves it to `index.html` in your bucket. The example uses handlebars for the template engine, and json for the data, but you can use any template engine or data source. You could also use an external data source, whatever you like!\n\n```javascript\nconst S3_SSG = require('@dashpilot/s3-ssg');\nconst ssg = new S3_SSG(s3_key, s3_secret, s3_bucket, s3_prefix, s3_acl, s3_endpoint);\n\nconst tpl_path = \"src/template.html\";\nconst data_path = \"src/data.json\";\nconst save_path = \"index.html\";\n\n// get the template and the data\nssg.get(tpl_path).then(tpl =\u003e {\n  console.log(tpl);\n\n  ssg.get(data_path).then(data =\u003e {\n    data = JSON.parse(data);\n    console.log(data);\n\n    // do something with the data\n    var template = Handlebars.compile(tpl);\n    var html = template(data);\n\n    // save the new html\n    ssg.save(save_path, html).then(result =\u003e {\n      console.log(result);\n    });\n\n  });\n\n});\n```\n\n## Configuration\n\n    s3_key (required): your S3 API key\n    s3_secret (required): your S3 API secret\n    s3_bucket (required): your S3 bucket\n    s3_prefix (optional): optional file prefix or subfolder (for the latter end with a slash). default \"\";\n    s3_acl (optional): ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl). Default: \"private\", set to \"public-read\" if you want your data to be public (to use with a client-side app).\n    s3_endpoint (optional): change the endpoint if you use Digitalocean Spaces, Linode Object Storage, Backblaze B2, etc. Default: false.\n\n## Press the :star: button\n\nDon't forget to press the :star: button to let me know I should continue improving this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpilot%2Fs3-ssg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashpilot%2Fs3-ssg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpilot%2Fs3-ssg/lists"}