定制 casmo/backstage-static-site-generator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

casmo/backstage-static-site-generator

最新稳定版本:v0.0.2

Composer 安装命令:

composer require casmo/backstage-static-site-generator

包简介

Static site generator for the Backstage CMS.

README 文档

README

Latest Version on Packagist Total Downloads

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.

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-19