承接 antymoro/twigflow 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

antymoro/twigflow

最新稳定版本:v1.1.0

Composer 安装命令:

composer require antymoro/twigflow

包简介

A PHP application with customizable modules and templates, supporting Payload and Sanity CMSes.

README 文档

README

TwigFlow is a web application built with the Slim Framework and Twig templating engine. It fetches content from various CMS APIs (e.g., Payload CMS) and renders it using Twig templates. The application also includes a caching mechanism to reduce the number of API requests and improve performance.

Features

  • Fetches content from CMS APIs using slugs
  • Renders content using Twig templates
  • Caching mechanism to reduce API requests
  • Supports multiple CMS services (e.g., Payload CMS, Sanity)
  • Works on module-based logic with optional feature to process the module in PHP with additional info from CMSes (e.g., sending another request to fetch featured news in the news module) supporting async requests

Requirements

  • PHP 8.2 or higher
  • Composer
  • MAMP (or any other local development environment)

Installation

  1. Clone the TwigFlow boilerplate repository:

    git clone https://github.com/antymoro/twigflow-boilerplate.git
    cd twigflow-boilerplate
  2. Install the TwigFlow package via Composer:

    composer require antymoro/twigflow:dev-main --prefer-stable
  3. Set up environment variables:

    Create a .env file in the root directory and add the necessary environment variables:

    API_URL=https://id.api.sanity.io/v2022-03-07
    CMS_CLIENT=sanity
    APP_ENV=development
    CACHE_EXPIRE_TIME=0
    TWIG_CACHE=false
    HOMEPAGE_SLUG=homepage
    
  4. Set up the web server:

    If you are using MAMP, set the document root to the root folder of the project.

Usage

Start the web server

If you are using MAMP, start the Apache and MySQL servers.

Access the application

Open your web browser and navigate to:

http://localhost:[port]

Replace [port] with the port number configured in MAMP.

Clear cache

To clear the cache, send a POST request to:

http://localhost:[port]/clear-cache
```# huncwot-payload

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固