mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-11 03:12:56 +00:00
starters: standardise starters dir name to templates
This commit is contained in:
1 parent
20a6f8202e
commit
5f2290d590
280 files changed
+4473
-231
No files matched your search
@@ -9,7 +9,7 @@ on:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "modules/**"
|
||||
- "starters/**"
|
||||
- "templates/**"
|
||||
- "test/**"
|
||||
- "scripts/**"
|
||||
- "package.json"
|
||||
@@ -25,7 +25,7 @@ on:
|
||||
- ready_for_review
|
||||
paths:
|
||||
- "modules/**"
|
||||
- "starters/**"
|
||||
- "templates/**"
|
||||
- "test/**"
|
||||
- "scripts/**"
|
||||
- "package.json"
|
||||
@@ -38,23 +38,23 @@ permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: starters-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
group: templates-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
NODE_VERSION: "22"
|
||||
|
||||
jobs:
|
||||
build-starters:
|
||||
build-templates:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
starter:
|
||||
- name: academic-cv
|
||||
path: starters/academic-cv
|
||||
path: templates/academic-cv
|
||||
- name: landing-page
|
||||
path: starters/landing-page
|
||||
path: templates/landing-page
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -93,13 +93,13 @@ jobs:
|
||||
- name: Activate pnpm from root package.json
|
||||
run: pnpm --version
|
||||
|
||||
- name: Install starter dependencies
|
||||
- name: Install template dependencies
|
||||
working-directory: ${{ matrix.starter.path }}
|
||||
# Don't use --frozen-lockfile as starters have auto-generated package.json with simple deps (Tailwind CLI)
|
||||
# and may not have lock files checked into the repo
|
||||
run: pnpm install
|
||||
|
||||
- name: Read Hugo version from starter
|
||||
- name: Read Hugo version from template
|
||||
id: hugo
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -186,15 +186,15 @@ jobs:
|
||||
node-version: "${{ env.NODE_VERSION }}"
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install starter dependencies
|
||||
working-directory: starters/academic-cv
|
||||
- name: Install template dependencies
|
||||
working-directory: templates/academic-cv
|
||||
run: pnpm install
|
||||
|
||||
- name: Cache Hugo resources (starter)
|
||||
- name: Cache Hugo resources (template)
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: starters/academic-cv/resources/
|
||||
key: ${{ runner.os }}-hugo-resources-academic-latest-${{ hashFiles('starters/academic-cv/assets/**/*', 'starters/academic-cv/config/**/*', 'starters/academic-cv/hugoblox.yaml', 'starters/academic-cv/package.json') }}
|
||||
path: templates/academic-cv/resources/
|
||||
key: ${{ runner.os }}-hugo-resources-academic-latest-${{ hashFiles('templates/academic-cv/assets/**/*', 'templates/academic-cv/config/**/*', 'templates/academic-cv/hugoblox.yaml', 'templates/academic-cv/package.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hugo-resources-academic-latest-
|
||||
|
||||
@@ -205,7 +205,7 @@ jobs:
|
||||
extended: true
|
||||
|
||||
- name: Build academic-cv (latest)
|
||||
working-directory: starters/academic-cv
|
||||
working-directory: templates/academic-cv
|
||||
run: hugo --minify --panicOnWarning
|
||||
|
||||
smoke-test-min:
|
||||
|
||||
@@ -2,81 +2,81 @@ name: Release - HugoBlox Modules
|
||||
run-name: ${{ github.workflow }} - ${{ github.ref_name }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dry_run:
|
||||
description: "Run without committing/tagging"
|
||||
type: boolean
|
||||
default: true
|
||||
propagate:
|
||||
description: "Propagate dependency bumps to dependents"
|
||||
type: boolean
|
||||
default: true
|
||||
update_starters_to_commits:
|
||||
description: "Update starters to use latest module commits instead of tagged versions"
|
||||
type: boolean
|
||||
default: false
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dry_run:
|
||||
description: "Run without committing/tagging"
|
||||
type: boolean
|
||||
default: true
|
||||
propagate:
|
||||
description: "Propagate dependency bumps to dependents"
|
||||
type: boolean
|
||||
default: true
|
||||
update_templates_to_commits:
|
||||
description: "Update templates to use latest module commits instead of tagged versions"
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: release-modules
|
||||
cancel-in-progress: false
|
||||
group: release-modules
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LOG_LEVEL: INFO
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LOG_LEVEL: INFO
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.8.3
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.8.3
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry --version
|
||||
poetry install --no-interaction --no-ansi
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry --version
|
||||
poetry install --no-interaction --no-ansi
|
||||
|
||||
- name: Configure Git identity
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
- name: Configure Git identity
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
# Skip plan display when updating starters to commits as it's not relevant for that operation
|
||||
- name: Show plan (dry run)
|
||||
if: ${{ inputs.dry_run && !inputs.update_starters_to_commits }}
|
||||
run: |
|
||||
poetry run python scripts/release_modules.py --print-plan --log-level $LOG_LEVEL
|
||||
# Skip plan display when updating templates to commits as it's not relevant for that operation
|
||||
- name: Show plan (dry run)
|
||||
if: ${{ inputs.dry_run && !inputs.update_templates_to_commits }}
|
||||
run: |
|
||||
poetry run python scripts/release_modules.py --print-plan --log-level $LOG_LEVEL
|
||||
|
||||
# Dedicated step for updating starters to use latest commits instead of tagged versions
|
||||
# Only runs when specifically requested and not in dry run mode
|
||||
- name: Update starters to commits
|
||||
if: ${{ inputs.update_starters_to_commits && !inputs.dry_run }}
|
||||
run: |
|
||||
poetry run python scripts/release_modules.py --yes --update-starters-to-commits --log-level $LOG_LEVEL
|
||||
# Dedicated step for updating templates to use latest commits instead of tagged versions
|
||||
# Only runs when specifically requested and not in dry run mode
|
||||
- name: Update templates to commits
|
||||
if: ${{ inputs.update_templates_to_commits && !inputs.dry_run }}
|
||||
run: |
|
||||
poetry run python scripts/release_modules.py --yes --update-starters-to-commits --log-level $LOG_LEVEL
|
||||
|
||||
# Standard release process - only runs when not in dry run mode and not updating starters to commits
|
||||
# These operations are mutually exclusive - we either do a normal release or update starters to commits
|
||||
- name: Release (commit, tag, push)
|
||||
if: ${{ !inputs.dry_run && !inputs.update_starters_to_commits }}
|
||||
run: |
|
||||
if [ "${{ inputs.propagate }}" = "true" ]; then
|
||||
poetry run python scripts/release_modules.py --yes --propagate --log-level $LOG_LEVEL
|
||||
else
|
||||
poetry run python scripts/release_modules.py --yes --no-propagate --log-level $LOG_LEVEL
|
||||
fi
|
||||
# Standard release process - only runs when not in dry run mode and not updating templates to commits
|
||||
# These operations are mutually exclusive - we either do a normal release or update starters to commits
|
||||
- name: Release (commit, tag, push)
|
||||
if: ${{ !inputs.dry_run && !inputs.update_templates_to_commits }}
|
||||
run: |
|
||||
if [ "${{ inputs.propagate }}" = "true" ]; then
|
||||
poetry run python scripts/release_modules.py --yes --propagate --log-level $LOG_LEVEL
|
||||
else
|
||||
poetry run python scripts/release_modules.py --yes --no-propagate --log-level $LOG_LEVEL
|
||||
fi
|
||||
@@ -2,145 +2,145 @@ name: "Release - Package Splitter"
|
||||
run-name: ${{ github.workflow }} - ${{ github.ref_name }}
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
# IMPORTANT: workflows below must match the upstream workflow's `name:` exactly
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Release - HugoBlox Modules
|
||||
types:
|
||||
- completed
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
# IMPORTANT: workflows below must match the upstream workflow's `name:` exactly
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Release - HugoBlox Modules
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
jobs:
|
||||
determine_changed:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
has_changes: ${{ steps.set-matrix.outputs.has_changes }}
|
||||
determine_changed:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
has_changes: ${{ steps.set-matrix.outputs.has_changes }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- id: changed
|
||||
# Only run change detection for push events
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: tj-actions/changed-files@v47
|
||||
with:
|
||||
files: |
|
||||
starters/academic-cv/**
|
||||
starters/resume/**
|
||||
starters/blog/**
|
||||
starters/documentation/**
|
||||
starters/link-in-bio/**
|
||||
starters/landing-page/**
|
||||
dir_names: true
|
||||
dir_names_max_depth: 2
|
||||
dir_names_exclude_current_dir: true
|
||||
- id: changed
|
||||
# Only run change detection for push events
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: tj-actions/changed-files@v47
|
||||
with:
|
||||
files: |
|
||||
templates/academic-cv/**
|
||||
templates/resume/**
|
||||
templates/blog/**
|
||||
templates/documentation/**
|
||||
templates/link-in-bio/**
|
||||
templates/landing-page/**
|
||||
dir_names: true
|
||||
dir_names_max_depth: 2
|
||||
dir_names_exclude_current_dir: true
|
||||
|
||||
# Build dynamic matrix
|
||||
- name: Build dynamic matrix
|
||||
id: set-matrix
|
||||
env:
|
||||
CHANGED_DIRS: ${{ steps.changed.outputs.dir_names || '' }}
|
||||
run: |
|
||||
# Define the full mapping
|
||||
declare -A STARTER_MAP=(
|
||||
["starters/academic-cv"]="theme-academic-cv"
|
||||
["starters/resume"]="theme-resume"
|
||||
["starters/blog"]="theme-blog"
|
||||
["starters/documentation"]="theme-documentation"
|
||||
["starters/link-in-bio"]="theme-link-in-bio"
|
||||
["starters/landing-page"]="theme-landing-page"
|
||||
)
|
||||
# Build dynamic matrix
|
||||
- name: Build dynamic matrix
|
||||
id: set-matrix
|
||||
env:
|
||||
CHANGED_DIRS: ${{ steps.changed.outputs.dir_names || '' }}
|
||||
run: |
|
||||
# Define the full mapping
|
||||
declare -A STARTER_MAP=(
|
||||
["templates/academic-cv"]="theme-academic-cv"
|
||||
["templates/resume"]="theme-resume"
|
||||
["templates/blog"]="theme-blog"
|
||||
["templates/documentation"]="theme-documentation"
|
||||
["templates/link-in-bio"]="theme-link-in-bio"
|
||||
["templates/landing-page"]="theme-landing-page"
|
||||
)
|
||||
|
||||
# For non-push events, always use full matrix
|
||||
if [ "${{ github.event_name }}" != "push" ]; then
|
||||
echo "Using full matrix for ${{ github.event_name }} event"
|
||||
echo "matrix=[{\"local_path\":\"starters/academic-cv\",\"split_repository\":\"theme-academic-cv\"},{\"local_path\":\"starters/resume\",\"split_repository\":\"theme-resume\"},{\"local_path\":\"starters/blog\",\"split_repository\":\"theme-blog\"},{\"local_path\":\"starters/documentation\",\"split_repository\":\"theme-documentation\"},{\"local_path\":\"starters/link-in-bio\",\"split_repository\":\"theme-link-in-bio\"},{\"local_path\":\"starters/landing-page\",\"split_repository\":\"theme-landing-page\"}]" >> "$GITHUB_OUTPUT"
|
||||
echo "has_changes=true" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
# For non-push events, always use full matrix
|
||||
if [ "${{ github.event_name }}" != "push" ]; then
|
||||
echo "Using full matrix for ${{ github.event_name }} event"
|
||||
echo "matrix=[{\"local_path\":\"templates/academic-cv\",\"split_repository\":\"theme-academic-cv\"},{\"local_path\":\"templates/resume\",\"split_repository\":\"theme-resume\"},{\"local_path\":\"templates/blog\",\"split_repository\":\"theme-blog\"},{\"local_path\":\"templates/documentation\",\"split_repository\":\"theme-documentation\"},{\"local_path\":\"templates/link-in-bio\",\"split_repository\":\"theme-link-in-bio\"},{\"local_path\":\"templates/landing-page\",\"split_repository\":\"theme-landing-page\"}]" >> "$GITHUB_OUTPUT"
|
||||
echo "has_changes=true" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Detected starter directories: $CHANGED_DIRS"
|
||||
echo "Detected template directories: $CHANGED_DIRS"
|
||||
|
||||
# If no changes, set empty matrix
|
||||
if [ -z "$CHANGED_DIRS" ]; then
|
||||
echo "No starters changed"
|
||||
echo "matrix=[]" >> "$GITHUB_OUTPUT"
|
||||
echo "has_changes=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
# If no changes, set empty matrix
|
||||
if [ -z "$CHANGED_DIRS" ]; then
|
||||
echo "No templates changed"
|
||||
echo "matrix=[]" >> "$GITHUB_OUTPUT"
|
||||
echo "has_changes=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Build JSON array for changed starters
|
||||
JSON="["
|
||||
FIRST=true
|
||||
# tj-actions outputs space-separated list
|
||||
for DIR in $CHANGED_DIRS; do
|
||||
# Normalize potential trailing slash
|
||||
DIR="${DIR%/}"
|
||||
# Build JSON array for changed templates
|
||||
JSON="["
|
||||
FIRST=true
|
||||
# tj-actions outputs space-separated list
|
||||
for DIR in $CHANGED_DIRS; do
|
||||
# Normalize potential trailing slash
|
||||
DIR="${DIR%/}"
|
||||
|
||||
# Collapse to the starter root (first two path segments), e.g. starters/landing-page
|
||||
IFS='/' read -r SEG1 SEG2 _ <<< "$DIR"
|
||||
if [[ -n "$SEG1" && -n "$SEG2" ]]; then
|
||||
ROOT="$SEG1/$SEG2"
|
||||
else
|
||||
ROOT="$DIR"
|
||||
fi
|
||||
# Collapse to the template root (first two path segments), e.g. templates/landing-page
|
||||
IFS='/' read -r SEG1 SEG2 _ <<< "$DIR"
|
||||
if [[ -n "$SEG1" && -n "$SEG2" ]]; then
|
||||
ROOT="$SEG1/$SEG2"
|
||||
else
|
||||
ROOT="$DIR"
|
||||
fi
|
||||
|
||||
# Only process if it's a known starter
|
||||
if [[ -n "${STARTER_MAP[$ROOT]}" ]]; then
|
||||
if [ "$FIRST" = true ]; then
|
||||
FIRST=false
|
||||
else
|
||||
JSON+=","
|
||||
fi
|
||||
JSON+="{\"local_path\":\"$ROOT\",\"split_repository\":\"${STARTER_MAP[$ROOT]}\"}"
|
||||
fi
|
||||
done
|
||||
JSON+="]"
|
||||
# Only process if it's a known starter
|
||||
if [[ -n "${STARTER_MAP[$ROOT]}" ]]; then
|
||||
if [ "$FIRST" = true ]; then
|
||||
FIRST=false
|
||||
else
|
||||
JSON+=","
|
||||
fi
|
||||
JSON+="{\"local_path\":\"$ROOT\",\"split_repository\":\"${STARTER_MAP[$ROOT]}\"}"
|
||||
fi
|
||||
done
|
||||
JSON+="]"
|
||||
|
||||
# Check if we actually added any starters
|
||||
if [ "$JSON" = "[]" ]; then
|
||||
echo "No valid starters found in changed directories"
|
||||
echo "matrix=[]" >> "$GITHUB_OUTPUT"
|
||||
echo "has_changes=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "matrix=$JSON" >> "$GITHUB_OUTPUT"
|
||||
echo "has_changes=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
# Check if we actually added any starters
|
||||
if [ "$JSON" = "[]" ]; then
|
||||
echo "No valid starters found in changed directories"
|
||||
echo "matrix=[]" >> "$GITHUB_OUTPUT"
|
||||
echo "has_changes=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "matrix=$JSON" >> "$GITHUB_OUTPUT"
|
||||
echo "has_changes=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
packages_split:
|
||||
needs: determine_changed
|
||||
# Run when:
|
||||
# โข Event is not workflow_run OR upstream workflow succeeded.
|
||||
# โข Event is not push OR at least one starter changed.
|
||||
if: ${{ (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') && needs.determine_changed.outputs.has_changes == 'true' }}
|
||||
packages_split:
|
||||
needs: determine_changed
|
||||
# Run when:
|
||||
# โข Event is not workflow_run OR upstream workflow succeeded.
|
||||
# โข Event is not push OR at least one starter changed.
|
||||
if: ${{ (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') && needs.determine_changed.outputs.has_changes == 'true' }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: ${{ fromJson(needs.determine_changed.outputs.matrix) }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: ${{ fromJson(needs.determine_changed.outputs.matrix) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# step if no tag is pushed
|
||||
- if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: "symplify/monorepo-split-github-action@v2.4.0"
|
||||
with:
|
||||
package_directory: "${{ matrix.package.local_path }}"
|
||||
repository_organization: "HugoBlox"
|
||||
repository_name: "${{ matrix.package.split_repository }}"
|
||||
user_name: "Splitter Bot"
|
||||
user_email: "no.reply@hugoblox.com"
|
||||
# step if no tag is pushed
|
||||
- if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: "symplify/monorepo-split-github-action@v2.4.0"
|
||||
with:
|
||||
package_directory: "${{ matrix.package.local_path }}"
|
||||
repository_organization: "HugoBlox"
|
||||
repository_name: "${{ matrix.package.split_repository }}"
|
||||
user_name: "Splitter Bot"
|
||||
user_email: "no.reply@hugoblox.com"
|
||||
+3
-3
@@ -146,14 +146,14 @@ hugo-blox-builder/
|
||||
โ โโโ layouts/ # HTML templates (easy to edit!)
|
||||
โ โโโ assets/css/ # Tailwind CSS v4 styles
|
||||
โ โโโ i18n/ # Translations (help translate!)
|
||||
โโโ starters/
|
||||
โโโ templates/
|
||||
โ โโโ academic-cv/ # CV/Resume template
|
||||
โ โโโ blog/ # Blog template
|
||||
โ โโโ documentation/ # Docs template
|
||||
โโโ scripts/ # Helper scripts
|
||||
```
|
||||
|
||||
**Note**: To contribute an improvement to a starter template, make your changes to the relevant template within the `starters/` folder. **Do not submit PRs to the dedicated template repositories as they are read-only (changes are automatically propagated there from this mono-repository).**
|
||||
**Note**: To contribute an improvement to a template, make your changes to the relevant template within the `templates/` folder. **Do not submit PRs to the dedicated template repositories as they are read-only (changes are automatically propagated there from this mono-repository).**
|
||||
|
||||
#### What are some good issues to contribute to?
|
||||
|
||||
@@ -185,7 +185,7 @@ To contribute a **new language pack** or an improvement to a language pack, refe
|
||||
|
||||
### Contribute a template
|
||||
|
||||
Consider duplicating a bare-bones template, such as the [Link In Bio](https://github.com/HugoBlox/hugo-blox-builder/tree/main/starters/link-in-bio) folder, and building up your own template using the Hugo Blox. Reach out on the **Contributing** channel in Discord to submit your template.
|
||||
Consider duplicating a bare-bones template, such as the [Link In Bio](https://github.com/HugoBlox/hugo-blox-builder/tree/main/templates/link-in-bio) folder, and building up your own template using the Hugo Blox. Reach out on the **Contributing** channel in Discord to submit your template.
|
||||
|
||||
### Contribute to the Publication importer
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
"**/hugo_stats.json",
|
||||
"**/*.code-workspace",
|
||||
"modules/blox-tailwind/data/icons/devicon.json",
|
||||
"starters/**",
|
||||
"templates/**",
|
||||
"test/**",
|
||||
"modules/**/package.json",
|
||||
"**/assets/jsconfig.json",
|
||||
|
||||
@@ -47,8 +47,8 @@ If you're upgrading from Tailwind v3:
|
||||
|
||||
1. Install the new dependencies: `pnpm install`
|
||||
2. Remove any `assets/dist/wc.min.css` files
|
||||
3. Add the `package.json` file from the latest starter templates
|
||||
4. Update your deployment scripts to install it with `pnpm install` (refer to the latest `.github` folder in the starters)
|
||||
3. Add the `package.json` file from the latest templates
|
||||
4. Update your deployment scripts to install it with `pnpm install` (refer to the latest `.github` folder in the templates)
|
||||
5. The old `tailwind.config.js` and `postcss.config.js` files are no longer needed
|
||||
|
||||
## Development
|
||||
|
||||
+13
-13
@@ -4,12 +4,12 @@
|
||||
Release management for HugoBlox modules.
|
||||
|
||||
Features:
|
||||
- Detects changes per module since last path-prefixed tag (e.g., modules/blox-tailwind/v0.4.3)
|
||||
- Determines next semantic version per module (conventional commits heuristics, default to patch)
|
||||
- Updates special module metadata (blox-tailwind data/hugoblox.yaml version)
|
||||
- Updates dependent modules' go.mod "require" versions when a dependency is released
|
||||
- Tags changed modules with annotated tags and pushes tags
|
||||
- Updates starter templates' go.mod to latest released module versions and bumps Hugo version in CI/Netlify config
|
||||
- Detects changes per module since last path-prefixed tag (e.g., modules/blox-tailwind/v0.4.3)
|
||||
- Determines next semantic version per module (conventional commits heuristics, default to patch)
|
||||
- Updates special module metadata (blox-tailwind data/hugoblox.yaml version)
|
||||
- Updates dependent modules' go.mod "require" versions when a dependency is released
|
||||
- Tags changed modules with annotated tags and pushes tags
|
||||
- Updates templates' go.mod to latest released module versions and bumps Hugo version in CI/Netlify config
|
||||
|
||||
Usage examples:
|
||||
poetry run python scripts/release_modules.py --dry-run --log-level INFO
|
||||
@@ -43,7 +43,7 @@ from ruamel.yaml.scalarstring import SingleQuotedScalarString
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
MODULES_DIR = REPO_ROOT / "modules"
|
||||
STARTERS_DIR = REPO_ROOT / "starters"
|
||||
STARTERS_DIR = REPO_ROOT / "templates"
|
||||
EXCLUDED_MODULE_DIRS = {"blox-bootstrap"}
|
||||
|
||||
|
||||
@@ -493,7 +493,7 @@ def update_starters(modules: Dict[str, Module], commit: bool, push: bool) -> Non
|
||||
logging.info("starter %s: deploy.yml WC_HUGO_VERSION -> %s", starter_dir.name, latest_hugo)
|
||||
|
||||
if updated_paths:
|
||||
stage_and_maybe_commit(updated_paths, "chore(starters): bump modules and Hugo", commit, push)
|
||||
stage_and_maybe_commit(updated_paths, "chore(templates): bump modules and Hugo", commit, push)
|
||||
|
||||
|
||||
def update_starters_to_commits(modules: Dict[str, Module], commit: bool, push: bool) -> None:
|
||||
@@ -572,8 +572,8 @@ def update_starters_to_commits(modules: Dict[str, Module], commit: bool, push: b
|
||||
logging.info("starter %s: deploy.yml WC_HUGO_VERSION -> %s", starter_dir.name, latest_hugo)
|
||||
|
||||
if updated_paths:
|
||||
stage_and_maybe_commit(updated_paths, "chore(starters): update modules to latest commits", commit, push)
|
||||
logging.info("Updated %d starter files to use latest module commits", len(updated_paths))
|
||||
stage_and_maybe_commit(updated_paths, "chore(templates): update modules to latest commits", commit, push)
|
||||
logging.info("Updated %d template files to use latest module commits", len(updated_paths))
|
||||
|
||||
|
||||
def ensure_clean_worktree() -> None:
|
||||
@@ -611,9 +611,9 @@ def main() -> None:
|
||||
if args.update_starters_to_commits:
|
||||
if yes:
|
||||
ensure_clean_worktree()
|
||||
logging.info("Updating starters to use latest module commits...")
|
||||
logging.info("Updating templates to use latest module commits...")
|
||||
update_starters_to_commits(modules, commit=yes, push=yes)
|
||||
logging.info("Starter update to commits complete")
|
||||
logging.info("Template update to commits complete")
|
||||
return
|
||||
|
||||
if yes:
|
||||
@@ -715,7 +715,7 @@ def main() -> None:
|
||||
if not res.stdout.strip():
|
||||
create_and_push_tag(m, next_version, yes=True)
|
||||
|
||||
# 3) Update Starters (excluding starters-bootstrap)
|
||||
# 3) Update Templates
|
||||
update_starters(modules, commit=True, push=True)
|
||||
|
||||
logging.info("release complete")
|
||||
|
||||
@@ -54,7 +54,7 @@ done
|
||||
|
||||
|
||||
# Run Hugo from the site dir so Tailwind CLI is discoverable
|
||||
cd "starters/$STARTER"
|
||||
cd "templates/$STARTER"
|
||||
|
||||
# Ensure Tailwind CLI exists in starter (required for Hugo css.TailwindCSS)
|
||||
if [ -f "package.json" ] && [ ! -x "node_modules/.bin/tailwindcss" ]; then
|
||||
|
||||
@@ -25,7 +25,7 @@ STARTER="${1:-academic-cv}" # Default to academic-cv if no argument provided
|
||||
INITIAL_DIR=$(pwd)
|
||||
|
||||
# Run Hugo from the starter directory so Tailwind v4 CLI is discoverable by Hugo
|
||||
cd "starters/$STARTER"
|
||||
cd "templates/$STARTER"
|
||||
|
||||
# Ensure Tailwind CLI is available for Hugo
|
||||
if [ -f "package.json" ]; then
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
|
500 Internal Server Error
An error occurred: An error occurred Gitea Version: 28.1.0 |