Ready-to-use workflow for quickly starting with Jekyll, Sass and esbuild. It includes configurations for development, local network access, build, and deployment project.
git clone https://github.com/wdmcourses/jekyll-workflow . && rm -rf trunk .git readme.md && chmod +x run.sh
- Traditional folders: Workfwow has traditional dev forler structure with
srcanddist. - Optimized configurations: Separate configurations for development (
_config_dev.yml) and production (_config.yml) help set up dependencies and exclude the build of heavy assets during development. - Bundling: Bundling and minification JavaScript files and Sass styles in real time.
- Deployment: Deployment from
distto server usingrsync. - Backup: Backup project.
- Docker: Has a
docker-compose.ymlfile with jekyll image. - path: Simple include of real relative path level
{% include path.html -%}->{{ path }}.
docker compose up -d && docker compose exec jekyll bash
# ./run.sh argument
./run.sh dev: Run development serverhttp://127.0.0.1:4000with rebuilding and LiveReload (tech:0.0.0.0)../run.sh build: Builds the project for production../run.sh deploy: Deploys the project to the server usingrsync../run.sh backup: Backup the project. Format:foldername-dd-mm-yyyy.7z.distandnode_modulesexcluded../run.sh preview: Run external server addresshttp://192.168.1.126:3000../run.sh watch: Just watch and rebuild without server up../run.sh clean:jekyll clean.
Usage: ./run.sh { ... | up | down | bash | prune }
-
Make sure you have the following installed:
-
Install Jekyll and Bundler:
sudo gem i jekyll bundler- Install esbuild:
sudo npm i -g esbuild
# for mac
brew install esbuild
- Install 7z for backup:
sudo apt install p7zip-full
# for mac
brew install p7zip
# for git bash
mkdir -p ~/bin && curl -o ~/bin/7z.exe https://raw.githubusercontent.com/wdmcourses/7zr/main/7zr.exe
- Install rsync for Git Bash (deploy)
mkdir -p ~/bin && curl -o ~/bin/rsync.exe https://raw.githubusercontent.com/wdmcourses/rsync-windows/main/rsync.exe
For macOS, Linux, etc., no installation is required.
chmod -R 777 .
linux: sed -i 's/\r$//' run.sh
macos: sed -i '' 's/\r$//' run.sh
Note: Disable ad blocker to improve performance.