npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mavogel/projen-cdk-hugo-pipeline

v0.0.385

Published

A external projen component to create a Hugo pipeline with AWS CDK.

Downloads

2,435

Readme

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