Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msysh/aws-sample-cdk-hugo-pipeline
This is a CDK project to build a static web site using Hugo and its delivery pipeline.
https://github.com/msysh/aws-sample-cdk-hugo-pipeline
cdk cloudfront codepipeline hugo
Last synced: 6 days ago
JSON representation
This is a CDK project to build a static web site using Hugo and its delivery pipeline.
- Host: GitHub
- URL: https://github.com/msysh/aws-sample-cdk-hugo-pipeline
- Owner: msysh
- License: mit
- Created: 2021-10-29T22:20:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-08T01:13:48.000Z (over 3 years ago)
- Last Synced: 2024-12-12T14:07:42.564Z (2 months ago)
- Topics: cdk, cloudfront, codepipeline, hugo
- Language: TypeScript
- Homepage:
- Size: 268 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hugo pipeline
This is a CDK project to build a static web site using Hugo and its delivery pipeline.
## Architecture
![Architecture](doc/architecture.svg)
## How to use
### Deploy CDK
Deploy this CDK project.
* `npm run build` compile typescript to js
* `cdk deploy --all` deploy this stack to your default AWS account/region### Delivery contents
When complete to `cdk deploy`, you can get a **CodeCommit repository URL** from CDK Outputs.
So...* `hugo new site hugo-pipeline-source`
* `cd hugo-pipeline-source`
* `git init`
* `git remote add origin `### Add a Hugo theme
* `git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke`
* `echo theme = \"ananke\" >> config.toml`See also : [Hugo: Quick Start](https://gohugo.io/getting-started/quick-start/)
### Add some content* `hugo new posts/my-first-post.md`
* So edit the file and save.
```
---
title: "My First Post"
date: 2019-03-26T08:47:11+09:00
draft: false
---Hello World!!
```### Push the content
* `git add .`
* `git commit -m "Initialize commit"`
* `git push origin main`Then the pipeline is started. Please wait for the pipeline completion.
### Access the site
When complete `cdk deploy`, you can get a **Site URL of CloudFront** from CDK Outputs.
Let's access the URL via your browser!!## CDK context paramter
at `cdk.json`
* `prefix`: prefix for resource logical id and resource name (ex. CodeCommit repository name).
Default is `hugo-pipeline`
* `hugoVersion`: Hugo version. Currently it's set `0.88.1`.