monkcms/meta 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

monkcms/meta

Composer 安装命令:

composer require monkcms/meta

包简介

A collection of classes to generate module meta information for the MonkCMS API

README 文档

README

Latest Stable Version Codecov StyleCI

A collection of classes to generate module meta information for the MonkCMS API

Overview

Install

  • Download the site you are working on to your local environment
  • If composer is not installed on your machine globall install it by following the directions here Composer - https://getcomposer.org/download
  • In your terminal go to the directoy where the site was downloaded
  • If there is not a composer.json file in the directory follow the indented steps below. If the file exists, head to the next step
    • Run composer init and select the defaults for all of the main questions. You can select N for defining dependencies and dev dependencies
  • After a composer.json file exists, run the following in the terminal composer require monkcms/meta
  • You will then upload the newly created vendor directory as well as the composer.json and composer.lock files.
  • Follow the How to use section below to implement it on the templates of your choosing.

How to use

Within a template you would initialize the class for the module you are working with. In this example we will assume the pages module.

//Load these in a config.php file
require_once($_SERVER['DOCUMENT_ROOT'] . '/monkcms.php');
require_once($_SERVER['DOCUMENT_ROOT'] . '/vendor/autoload.php');
$currentUrl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

//This would go in the page template after config.php is included
$meta = new \Meta\Module\PageMeta(
    $_GET['nav'],
    getSiteName(),
    'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']
);

Then, in head.php (or anywhere you wish) you can do the following

<title><?= $meta->title() ?></title>
<?= $meta->createMetaTag('description', $meta->description()) ?>
<?= $meta->createMetaTag('keywords', $meta->keywords()) ?>
<?= $meta->socialTags() ?>

The following would be generated

<title>Example Page Title | Test Site Name</title>
<meta name="description" content="Example Page Description" >
<meta name="keywords" content="Example, Page, Keywords" >
<meta property="og:site_name" content="Test Site Name" >
<meta property="og:type" content="article" >
<meta property="og:title" content="Example Page Title | Test Site Name" >
<meta property="og:url" content="http://example.com" >
<meta property="og:image" content="http://www.placecage.com/1200/630" >
<meta property="og:image:width" content="1200" >
<meta property="og:image:height" content="630" >
<meta name="twitter:card" content="summary_large_image" >

Included modules

  • Pages
  • Sermons
  • Articles
  • Blogs
  • Events

Further documentation can be found by looking at the tests.

Contributing

Thank you for considering contributing to the the MonkCMS Meta Package! Please open an issue or a PR with your request! For any new functionality, be sure to write a test.

Security Vulnerabilities

If you discover a security vulnerability within this package, please send an e-mail to Skyler Katz at skylerkatz@hey.com. All security vulnerabilities will be promptly addressed.

License

This package is open-sourced software licensed under the MIT license.

monkcms/meta 适用场景与选型建议

monkcms/meta 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 68 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 09 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cms」 「monk」 「monkdev」 「monkcms」 「ekklesia」 「ekklesia360」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 monkcms/meta 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 monkcms/meta 我们能提供哪些服务?
定制开发 / 二次开发

基于 monkcms/meta 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-05