PHPackages                             mve-it-solutions/yii2-google-code-prettify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. mve-it-solutions/yii2-google-code-prettify

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

mve-it-solutions/yii2-google-code-prettify
==========================================

Yii2 Code syntax highlighter using Google Code Prettify

0.0.1(10y ago)0105.0k↑15.6%MITCSS

Since Nov 29Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mve-it-solutions/yii2-google-code-prettify)[ Packagist](https://packagist.org/packages/mve-it-solutions/yii2-google-code-prettify)[ Docs](https://github.com/mve-it-solutions/yii2-google-code-prettify)[ RSS](/packages/mve-it-solutions-yii2-google-code-prettify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Yii2 Google Code Prettify
=========================

[](#yii2-google-code-prettify)

Yii2 Code syntax highlighter using **[Google Code Prettify](https://github.com/google/code-prettify)**

Installation
------------

[](#installation)

### Composer

[](#composer)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist mve-it-solutions/yii2-google-code-prettify "*"

```

or add

```
"mve-it-solutions/yii2-google-code-prettify": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

To use this extension add below to your main layout:

```
\mveitsolutions\googlecodeprettify\GoogleCodePrettifyAsset::register($this, ['style' => 'simple', 'lineNums' => true, 'autoAddPreClasses' => true]);
```

- This will use the style defined by simple.css
- This will add linenumbers on every line in the pre (code) block
- This will auto add the classes prettyprint and linenums to every pre tag

AssetBundle Register Options
----------------------------

[](#assetbundle-register-options)

**style**Google Code Prettify Skin *Options: desert, doxy, prettify, sons-of-obsidian, sunburst or simple*

**lineNums**Put line numbers on every line *Options: true or false*

**autoAddPreClasses**Automatically add classes to every pre tag *Options: true or false*

License
-------

[](#license)

yii2-google-code-prettify is released under the MIT License. See [LICENSE.md](https://github.com/mve-it-solutions/yii2-google-code-prettify/blob/master/LICENSE) file for details.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3824d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3631510?v=4)[Michel van Es](/maintainers/mve-it-solutions)[@mve-it-solutions](https://github.com/mve-it-solutions)

---

Top Contributors

[![mve-it-solutions](https://avatars.githubusercontent.com/u/3631510?v=4)](https://github.com/mve-it-solutions "mve-it-solutions (3 commits)")

---

Tags

yii2code syntax highlighter google code prettify

### Embed Badge

![Health badge](/badges/mve-it-solutions-yii2-google-code-prettify/health.svg)

```
[![Health](https://phpackages.com/badges/mve-it-solutions-yii2-google-code-prettify/health.svg)](https://phpackages.com/packages/mve-it-solutions-yii2-google-code-prettify)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[ogheo/yii2-htmlcompress

Compress HTML output into a single line

20184.4k1](/packages/ogheo-yii2-htmlcompress)[marqu3s/yii2-summernote

Yii2 Summernote widget. Super simple WYSIWYG editor on Bootstrap

1691.6k8](/packages/marqu3s-yii2-summernote)[zxbodya/yii2-tinymce

Yii2 extension to use TinyMce with Compressor and FileManager

1732.1k3](/packages/zxbodya-yii2-tinymce)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
