nielsnicola/kirby-hide-html-comments 问题修复 & 功能扩展

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

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

nielsnicola/kirby-hide-html-comments

最新稳定版本:1.0.0

Composer 安装命令:

composer require nielsnicola/kirby-hide-html-comments

包简介

Hide HTML comments in Kirby output

README 文档

README

Hide or show HTML comments in your Kirby templates using a simple helper function: comment().

Installation

Composer

composer require nielsnicola/kirby-hide-html-comments

Git submodule

git submodule add https://github.com/nielsnicola/kirby-hide-html-comments.git site/plugins/kirby-hide-html-comments

Manual installation

Download this repository and place it in:

site/plugins/kirby-hide-html-comments

Options

Add one config option to control the output of HTML comments:

Option Default Description
nielsnicola.hide-html-comments.enabled true true hides all comments; false shows comments in the DOM

Usage

Once installed, you can use the global comment() helper in any template:

<?php comment('Hero section starts'); ?> // 
<div class="hero">
  ...
</div>
<?php comment('Hero section ends'); ?>

Config example

// site/config/config.php
return [
    'nielsnicola.hide-html-comments.enabled' => true, // Set to false to show HTML comments
];
  • When enabled is true, comment() outputs nothing
  • When enabled is false, comment() outputs standard HTML comments in the DOM.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2025-11-25