0.0.167 • Published 2 days ago

@mavogel/projen-cdk-hugo-pipeline v0.0.167

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 days ago

projen-cdk-hugo-pipeline

This is a projen project template to manage the mavogel/cdk-hugo-pipeline repository. Please see the API for documentation.

Setup the boilerplate for a hugo blog with a CDK pipeline to deploy it to AWS :tada:

Usage

Quickly run the generator :tada:

General

which uses the blist in v2.1.0 by default:

# 1. create a new project directory
mkdir my-website &&  cd my-website

# 2. set up the project using the projen new command
npx projen new \
    --from @mavogel/projen-cdk-hugo-pipeline@~0 \
    --domain='example.com' \
    --projenrc-ts \
    --no-git

# 3. install dependencies for the theme (blist by default)
npm --prefix blog install

# 4. run the hugo development server
npm run dev

# 5. see if it builds correctly
npm run build-dev
npm run build # for production

Now open your browser and go to http://localhost:1313 to see the the website :tada:

See the API.md for more details and all possible configuration options.

If you want to deploy it follow the steps here in the cdk-hugo-pipeline repo.

For the AWS UG theme

from Kadir as a template for all AWS UGs. See here for the repo

# 1. create a new project directory
mkdir awsug-your-town &&  cd awsug-your-town

# 2. set up the project using the projen new command
npx projen new \
    --from @mavogel/projen-cdk-hugo-pipeline@~0 \
    --domain='your-domain.com' \
    --hugoThemeGitRepo='https://github.com/kkeles/awsug-hugo.git' \
    --hugoThemeGitRepoBranch='v1.2.0' \
    --hugoThemeSubmoduleStructure='themes/awsug' \
    --hugoThemeConfigFile='hugo.toml' \
    --projenrc-ts \
    --no-git

# 3. run the hugo development server
npm run dev

# 4. see if it builds correctly
npm run build-dev
npm run build-prod # for production

# 5. build it locally via
npm run build
# 6. deploy the repository and the pipeline once via
npm run deploy
## will create the codecommit repository and the codepipeline. 
## The pipeline will fail first, so now commit the code

# 7. add the remote, e.g. via GRPC http
git remote add origin codecommit::<aws-region>://your-blog
# 8. push the code and let the pipeline run
git push origin master
# 9. go to your 
## url dev.your-comain.com, 
## enter the basic auth credentials (default: john:doe)

Configuring the themes

You can have multiple themes, and use only one. Configure the hugo.toml or config.toml accordingly. See the setup andc configuring instructions here.

Adding

Add a theme by adding a gitmodule. See the stackoverflow post for details.

git submodule add https://github.com/apvarun/blist-hugo-theme.git blog/themes/blist
git submodule set-branch --branch v2.1.0 blog/themes/blist

Updating

You can also update a theme by updating the gitmodule and setting the branch or tag.

git submodule update blog/themes/blist
# set to new tag or branch
git submodule set-branch --branch v2.1.0 blog/themes/blist

Removing

Remove a theme by removing the gitmodule and the respective content .git folder.

export PATH_TO_THEME=blog/themes/blist
git submodule deinit -f $PATH_TO_THEME && rm -rf .git/modules/$PATH_TO_THEME && git rm -f $PATH_TO_THEME

How to contribute to Projen CDK Hugo Pipeline

Did you find a bug?

  • Ensure the bug was not already reported by searching on GitHub under Issues.

  • If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.

Did you write a patch that fixes a bug?

  • Open a new GitHub pull request with the patch.

  • Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.

Did you fix whitespace, format code, or make a purely cosmetic patch?

Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability will normally not be accepted. Please file an issue and we will add it together with the next feature or fix.

Do you intend to add a new feature or change an existing one?

  • Suggest your change under Issues.

  • Do not open a pull request on GitHub until you have collected positive feedback about the change.

Do you want to contribute to the CDK Serverless documentation?

  • Just file a PR with your recommended changes

Authors

Coded for you by MV Consulting

0.0.167

2 days ago

0.0.166

3 days ago

0.0.165

4 days ago

0.0.164

5 days ago

0.0.163

6 days ago

0.0.162

7 days ago

0.0.161

8 days ago

0.0.160

9 days ago

0.0.159

10 days ago

0.0.158

11 days ago

0.0.157

12 days ago

0.0.156

13 days ago

0.0.155

14 days ago

0.0.154

15 days ago

0.0.153

16 days ago

0.0.152

17 days ago

0.0.151

18 days ago

0.0.150

19 days ago

0.0.149

20 days ago

0.0.148

21 days ago

0.0.147

22 days ago

0.0.146

23 days ago

0.0.145

24 days ago

0.0.144

25 days ago

0.0.143

26 days ago

0.0.142

27 days ago

0.0.141

28 days ago

0.0.140

1 month ago

0.0.139

1 month ago

0.0.138

1 month ago

0.0.137

1 month ago

0.0.136

1 month ago

0.0.135

1 month ago

0.0.134

1 month ago

0.0.133

1 month ago

0.0.132

1 month ago

0.0.131

1 month ago

0.0.130

1 month ago

0.0.129

1 month ago

0.0.128

1 month ago

0.0.127

1 month ago

0.0.126

1 month ago

0.0.125

2 months ago

0.0.124

2 months ago

0.0.123

2 months ago

0.0.122

2 months ago

0.0.121

2 months ago

0.0.119

2 months ago

0.0.120

2 months ago

0.0.118

2 months ago

0.0.117

2 months ago

0.0.116

2 months ago

0.0.115

2 months ago

0.0.114

2 months ago

0.0.113

2 months ago

0.0.112

2 months ago

0.0.111

2 months ago

0.0.110

2 months ago

0.0.109

2 months ago

0.0.108

2 months ago

0.0.107

2 months ago

0.0.106

2 months ago

0.0.105

2 months ago

0.0.104

2 months ago

0.0.103

2 months ago

0.0.102

2 months ago

0.0.101

2 months ago

0.0.100

2 months ago

0.0.96

2 months ago

0.0.97

2 months ago

0.0.98

2 months ago

0.0.99

2 months ago

0.0.95

3 months ago

0.0.90

3 months ago

0.0.89

3 months ago

0.0.88

3 months ago

0.0.87

3 months ago

0.0.85

3 months ago

0.0.86

3 months ago

0.0.84

3 months ago

0.0.83

3 months ago

0.0.81

3 months ago

0.0.82

3 months ago

0.0.80

3 months ago

0.0.78

3 months ago

0.0.79

3 months ago

0.0.76

3 months ago

0.0.77

3 months ago

0.0.73

3 months ago

0.0.74

3 months ago

0.0.75

3 months ago

0.0.71

3 months ago

0.0.72

3 months ago

0.0.70

3 months ago

0.0.66

3 months ago

0.0.67

3 months ago

0.0.68

3 months ago

0.0.69

3 months ago

0.0.65

4 months ago

0.0.64

5 months ago

0.0.63

5 months ago

0.0.62

5 months ago

0.0.61

5 months ago

0.0.60

5 months ago

0.0.59

5 months ago

0.0.58

5 months ago

0.0.57

5 months ago

0.0.55

5 months ago

0.0.56

5 months ago

0.0.53

5 months ago

0.0.54

5 months ago

0.0.52

5 months ago

0.0.51

5 months ago

0.0.50

5 months ago

0.0.49

5 months ago

0.0.48

5 months ago

0.0.47

5 months ago

0.0.46

5 months ago

0.0.45

5 months ago

0.0.44

5 months ago

0.0.43

5 months ago

0.0.42

5 months ago

0.0.41

6 months ago

0.0.40

6 months ago

0.0.39

6 months ago

0.0.38

6 months ago

0.0.37

6 months ago

0.0.36

6 months ago

0.0.35

6 months ago

0.0.34

6 months ago

0.0.33

6 months ago

0.0.32

6 months ago

0.0.31

6 months ago

0.0.30

6 months ago

0.0.29

6 months ago

0.0.28

6 months ago

0.0.27

6 months ago

0.0.26

6 months ago

0.0.25

6 months ago

0.0.24

6 months ago

0.0.23

6 months ago

0.0.22

6 months ago

0.0.21

6 months ago

0.0.20

6 months ago

0.0.19

6 months ago

0.0.18

6 months ago

0.0.17

6 months ago

0.0.16

6 months ago

0.0.15

6 months ago

0.0.14

6 months ago

0.0.13

6 months ago

0.0.12

7 months ago

0.0.11

7 months ago

0.0.10

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago