{"id":22710571,"url":"https://github.com/smallhelm/site-compiler","last_synced_at":"2025-03-29T21:42:40.182Z","repository":{"id":29359044,"uuid":"32893496","full_name":"smallhelm/site-compiler","owner":"smallhelm","description":"yet another static site compiler","archived":false,"fork":false,"pushed_at":"2015-12-09T16:43:20.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T22:28:06.777Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smallhelm.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}},"created_at":"2015-03-25T22:02:15.000Z","updated_at":"2015-03-26T09:56:45.000Z","dependencies_parsed_at":"2022-07-21T03:30:32.666Z","dependency_job_id":null,"html_url":"https://github.com/smallhelm/site-compiler","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fsite-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fsite-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fsite-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fsite-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallhelm","download_url":"https://codeload.github.com/smallhelm/site-compiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246249226,"owners_count":20747167,"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-12-10T12:10:32.513Z","updated_at":"2025-03-29T21:42:40.159Z","avatar_url":"https://github.com/smallhelm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# site-compiler\nyet another static site compiler\n\n# Example\n\n```js\nvar staticWebsiteBuilder = require('site-compiler');\n\nvar config = {\n  base_url: 'https://www.your-domain-name',\n  public_folder: 'public/', // the file path where the files should be written to\n\n  // anything else you'd like to add to the config\n\n  files: [\n    {\n      url: '/index.html', // the filename in the public_folder\n      render: function(config, callback){\n        // do what ever you need to do\n        // read files, make db queries, get stuff out of the config etc...\n        // when you are done callback(err, data);\n        // data is a string or binary data that should be written to the file\n      }\n\n      // anything else you'd like to use to describe the file\n\n    },\n    ...\n  ]\n};\n```\n\n# API\n\n## staticWebsiteBuilder(config, callback)\n\nBuilds the website based on your config. Calls the callback when it's done. It has a single argument `error` that is set if any part of it fails.\n\n## staticWebsiteBuilder.justRun(config)\n\nConvenience function to that just builds the site and writes to stdout and stderr. Useful if you are making a CLI script.\n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 Small Helm LLC\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Fsite-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallhelm%2Fsite-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Fsite-compiler/lists"}