mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 22:15:11 +00:00
feat: refactor block system
Refactored from legacy layouts/partials/blox/* system to:
- blox/<block-id>/block.html source structure
- Hugo module mounts to layouts/partials/hbx/blocks/<block-id>/block.html
- Resolver-based lookup
- Support for data-driven pages and client islands
This commit is contained in:
1 parent
acb0eb7b8a
commit
93585c868d
69 files changed
+229
-122
No files matched your search
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
# Generate preprocessed resources for demo site whilst also removing disused resources.
|
||||
# Run this script from the root Hugo Blox dir.
|
||||
HUGO_THEME=hugo-blox-builder hugo --source exampleSite --themesDir ../../ --gc
|
||||
File renamed without changes.
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
cd "starters/$1"
|
||||
hugo mod get -u ./...
|
||||
cd ../..
|
||||
@@ -10,8 +10,15 @@ cleanup() {
|
||||
trap cleanup EXIT INT TERM
|
||||
|
||||
usage() {
|
||||
echo "View a starter template with local development modules and debug features."
|
||||
echo ""
|
||||
echo "Usage: ./scripts/view-starter-dev.sh <starter-name> [--debug] [--no-pagefind]"
|
||||
echo "Example: ./scripts/view-starter-dev.sh blog --debug"
|
||||
echo ""
|
||||
echo "This script uses:"
|
||||
echo " • Local development modules (via HUGO_MODULE_REPLACEMENTS)"
|
||||
echo " • Development environment with demo/debug flags enabled"
|
||||
echo " • Optional Pagefind search indexing and enhanced debugging"
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
|
||||
@@ -8,9 +8,20 @@ exitfn () {
|
||||
|
||||
trap "exitfn" INT
|
||||
|
||||
usage() {
|
||||
echo "View a starter template with published production modules."
|
||||
echo ""
|
||||
echo "Usage: ./scripts/view-starter-prod.sh <starter-name>"
|
||||
echo "Example: ./scripts/view-starter-prod.sh blog"
|
||||
echo ""
|
||||
echo "This script uses:"
|
||||
echo " • Published/released modules (no local overrides)"
|
||||
echo " • Production environment (simulates end-user experience)"
|
||||
echo " • Minimal configuration for testing published versions"
|
||||
}
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: ./scripts/view-starter.sh <starter-name>"
|
||||
echo "Example: ./scripts/view-starter.sh blog"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -31,8 +42,8 @@ if [ -f "package.json" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
HUGO_ENVIRONMENT=development \
|
||||
HUGOxPARAMSxDECAP_CMSxLOCAL_BACKEND=true \
|
||||
# Use production environment with published modules (no local module replacements)
|
||||
HUGO_ENVIRONMENT=production \
|
||||
hugo server --panicOnWarning --renderStaticToDisk -F --port 8081 --bind 0.0.0.0
|
||||
|
||||
trap SIGINT
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
# View the demo site on any local devices by binding the local IP on port 1315.
|
||||
# Run this script from the root Hugo Blox dir.
|
||||
HUGO_THEME=hugo-blox-builder hugo \
|
||||
--source exampleSite --themesDir ../../ \
|
||||
--bind=0.0.0.0 -p 1315 --baseURL=http://0.0.0.0:1315 \
|
||||
--i18n-warnings --minify -e "development" \
|
||||
server
|
||||
|
||||
#HUGO_THEME=hugo-blox-builder hugo convert toYAML --unsafe --themesDir ../../
|
||||
Reference in new issue
Block a user