An interesting way to use Jekyll

I wanted to share the way I am using Jekyll on a new project. I wanted to allow people to have edit access to pages and posts of the jekyll site without having access to the theme files, configure, scripts, etc that are part of the overall site. What I’ve done is create 3 repos for the Jekyll site. One repo is just the Jekyll theme, css, layout, webpack config, javascript, etc. that make up the site.

Another repo is just for the pages that make up the site, so index.html, about.html, etc. I can give users github access to that repo without them having access to the main site repo.

Another repo is just for the posts that make up the site.

When I want to build the site, a small script pulls the 3 repos, combines them into a build directory and then has jekyll build the entire process into that. After, the _site folder is synced to an AWS s3 bucket.

I have javascript that lets users edit posts and pages inline, which then uses AWS Lambdas to push the change into the repo using their access. This keeps thing separate and secure.

I also have ability to only build portions of the site by not combining the pages or posts into the build. I actually have another repo for generated content that goes into a collection folder which works similarly.