This is a CDK project to build a static web site using Hugo and its delivery pipeline.
Deploy this CDK project.
npm run build
compile typescript to jscdk deploy --all
deploy this stack to your default AWS account/region
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 <the repository URL>
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo theme = \"ananke\" >> config.toml
See also : Hugo: Quick Start
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!!
git add .
git commit -m "Initialize commit"
git push origin main
Then the pipeline is started. Please wait for the pipeline completion.
When complete cdk deploy
, you can get a Site URL of CloudFront from CDK Outputs.
Let's access the URL via your browser!!
at cdk.json
prefix
: prefix for resource logical id and resource name (ex. CodeCommit repository name). Default ishugo-pipeline
hugoVersion
: Hugo version. Currently it's set0.88.1
.