{"id":27103166,"url":"https://github.com/studiole/boilerplate","last_synced_at":"2025-08-26T01:03:59.936Z","repository":{"id":146634546,"uuid":"189722321","full_name":"StudioLE/Boilerplate","owner":"StudioLE","description":"A boilerplate static website compiled with Hugo, continuous integration testing on Travis CI with TestCafe, and automated deployment to GitHub Pages and Amazon S3.","archived":false,"fork":false,"pushed_at":"2021-05-31T12:38:21.000Z","size":784,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T16:46:39.120Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://boilerplate.studiole.uk","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/StudioLE.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-01T10:58:09.000Z","updated_at":"2021-05-31T12:39:39.000Z","dependencies_parsed_at":"2023-07-09T13:16:33.724Z","dependency_job_id":null,"html_url":"https://github.com/StudioLE/Boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StudioLE/Boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudioLE%2FBoilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudioLE%2FBoilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudioLE%2FBoilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudioLE%2FBoilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StudioLE","download_url":"https://codeload.github.com/StudioLE/Boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudioLE%2FBoilerplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269747776,"owners_count":24469099,"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-08-10T02:00:08.965Z","response_time":71,"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":"2025-04-06T16:39:42.110Z","updated_at":"2025-08-10T16:05:42.081Z","avatar_url":"https://github.com/StudioLE.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Boilerplate [![Build Status](https://travis-ci.com/StudioLE/Boilerplate.svg?token=XfuJ4MDaZjC9K2zitmv1\u0026branch=master)](https://travis-ci.com/StudioLE/Boilerplate)\n\nA boilerplate static website compiled with [Hugo](https://gohugo.io), continuous integration testing on [Travis CI](https://travis-ci.com) with [TestCafe](https://devexpress.github.io/testcafe), and automated deployment to [GitHub Pages](https://pages.github.com) and [Amazon S3](https://aws.amazon.com/s3).\n\n## Usage\n\n### `npm start` and `npm run build`\n\nCopies the required js, css, and font files from `node_modules` to `resources/assets/vendor` and `static/assets/fonts` using [Gulp](https://gulpjs.com/).\n\nBuilds the website with [Hugo](https://gohugo.io) for the `production` environment.\n\n### `npm test`\n\nRun end-to-end tests with [TestCafe](https://devexpress.github.io/testcafe)\n\n### `npm run server`\n\nBuilds the website with [Hugo](https://gohugo.io) and serves it on [localhost:1313](http://localhost:1313) with the `development` environment and live reload.\n\n### `npm run clean`\n\nRemove generated `resources/assets/vendor`, `static/assets/fonts`, and `public` directories.\n\n### `npm run deploy` and `npm run deploy-dry`\n\nDeploy the website to [Amazon S3](https://aws.amazon.com/s3) with appropriate `cache-control` headers.\n\n### `npm run invalidate`\n\nInvalidate the [CloudFront](https://aws.amazon.com/cloudfront) edge caches.\n\n## Setup\n\n### Deployments\n\nDeployment is completed automatically by [Travis CI](https://travis-ci.com) on successful build of the `develop` or `master` branch.\n\nAdd the `HUGO_VERSION` key with a value of `0.68.3` to the [Travis CI Environment Variables](https://travis-ci.com/github/StudioLE/Boilerplate/settings) for your repo.\n\n#### [GitHub Pages](https://pages.github.com) from `develop` branch\n\nSet the domain for GitHub Pages to use using the `fqdn` variable in `.travis.yml`.\n\nCreate a `CNAME` record pointing from the domain to `\u003cuser\u003e.github.io`.\n\nCreate an empty `gh-pages` branch on GitHub.\n\n```\ngit checkout --orphan gh-pages\ngit reset --hard\ngit commit --allow-empty -m \"Initializing\"\ngit push origin gh-pages\ngit checkout master\n```\nCreate a [GitHub Personal Access Token](https://github.com/settings/tokens) and add it to the `GITHUB_TOKEN` key in the [Travis CI Environment Variables](https://travis-ci.com/github/StudioLE/Boilerplate/settings) for your repo.\n\nFor more details refer to:\n[Hugo Documentation](https://gohugo.io/hosting-and-deployment/hosting-on-github/#deployment-of-project-pages-from-your-gh-pages-branch)\n[GitHub Pages Documentation](https://help.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain)\n\n#### [Amazon S3](https://aws.amazon.com/s3) and [CloudFront](https://aws.amazon.com/cloudfront) from `master` branch\n\nCreate an S3 Bucket for the site.\n\nEnable static website hosting on the bucket with `index.html` as the index document.\n\nAdd a Bucket Policy.\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"PublicReadGetObject\",\n            \"Effect\": \"Allow\",\n            \"Principal\": \"*\",\n            \"Action\": \"s3:GetObject\",\n            \"Resource\": \"arn:aws:s3:::yourbucketname/*\"\n        }\n    ]\n}\n```\n\nCreate a new CloudFront distribution.\n\nSet the origin domain name to point to the S3 static website - not the S3 bucket itself.\n\n```\nhttp://yourbucketname.s3-website-eu-west-1.amazonaws.com\n```\n\nAdd the CloudFront Distribution ID to `invalidate` in `package.json`.\n\nAdd the Bucket Name to deployment targets `URL` and the CloudFront Distribution ID to `cloudFrontDistributionID` in `config.yml`.\n\nSet the `CNAME` for your domain to point to the CloudFront Distribution Domain.\n\nCreate an IAM policy.\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"VisualEditor0\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"s3:ListBucket\",\n            \"Resource\": \"arn:aws:s3:::yourbucketname\"\n        },\n        {\n            \"Sid\": \"VisualEditor1\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"s3:*Object\",\n            \"Resource\": \"arn:aws:s3:::yourbucketname/*\"\n        }\n    ]\n}\n```\n\nAttach the policy to an IAM user for Travis to use.\n\nAdd the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_REGION` keys to the [Travis CI Environment Variables](https://travis-ci.com/github/StudioLE/Boilerplate/settings) for your repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudiole%2Fboilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstudiole%2Fboilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudiole%2Fboilerplate/lists"}