casmo / backstage-static-site-generator
Static site generator for the Backstage CMS.
Fund package maintenance!
Casmo
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/casmo/backstage-static-site-generator
Requires
- php: ^8.3
- gumlet/php-image-resize: *
- illuminate/contracts: ^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
- voku/html-min: ^4.5
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-ray: ^1.35
This package is auto-updated.
Last update: 2025-11-24 05:34:41 UTC
README
Generate static versions of your Backstage CMS websites.
Installation
You can install the package via composer:
composer require casmo/backstage-static-site-generator
You can generate the static site by running the following command:
backstage:generate-static-site {--output=public/static/} {--optimize-images=true} {--minify-html=true}
Optimize images will resize images to max 1024 and quality to 60. Minify html will minify the html.
Github Pages
Use the following workflow to publish the static site on Github pages.
# Simple workflow for deploying static content to GitHub Pages name: Deploy static content to Pages on: # Runs on pushes targeting the default branch push: branches: ["gh-pages"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: "pages" cancel-in-progress: false jobs: # Single deploy job since we're just deploying deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: ref: 'gh-pages' - name: Setup Pages uses: actions/configure-pages@v5 - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: './public/static/example.com/' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4
Replace example.com with your domain.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.