Something went wrong. Try again.
my website built using Rust (stdweb) → .wasm ricky.codes
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132#!/usr/bin/env bashset -euo pipefail
partials_dir="${1:-src/partials}"output_path="${2:-static/index.html}"projects_dir="${3:-${partials_dir}/projects}"
if ! command -v html-minifier-next >/dev/null 2>&1; then echo "error: html-minifier-next is not installed or not in PATH." exit 1fi
echo "Cat & minify HTML in ${partials_dir}..."{ cat "${partials_dir}/doctype.html" \ "${partials_dir}/header.html" \ "${partials_dir}/about.html" \ "${partials_dir}/cv.html" \ "${partials_dir}/copyright.html" \ "${projects_dir}"/* \ "${partials_dir}/footer.html" | html-minifier-next \ --collapse-whitespace \ --remove-comments \ --remove-optional-tags \ --remove-redundant-attributes \ --remove-script-type-attributes \ --use-short-doctype \ --minify-css} > "${output_path}"
echo "HTML deployed to ${output_path}"