PHPackages                             zantolov/zoogle-cms - 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. zantolov/zoogle-cms

ActiveLibrary

zantolov/zoogle-cms
===================

v2.x-dev(3y ago)191[3 PRs](https://github.com/zantolov/zoogle-cms/pulls)PHPPHP &gt;=8.0CI failing

Since Jun 21Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/zantolov/zoogle-cms)[ Packagist](https://packagist.org/packages/zantolov/zoogle-cms)[ RSS](/packages/zantolov-zoogle-cms/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (20)Versions (4)Used By (0)

Zoogle CMS - Zoran's Google Docs CMS
====================================

[](#zoogle-cms---zorans-google-docs-cms)

This project allows you to use Google Docs and its folders and docs to manage blog and/or content portal.

The project provides models and services needed to:

- Authorize application for usage with Google Drive
- Query Google Drive for folders (categories) and docs (articles)
- Fetch and process Google Docs and convert them to HTML
- Content processing (extracting meta data, removing extra HTML tags and attributes, ...)

Setup
=====

[](#setup)

1. Require Composer package
---------------------------

[](#1-require-composer-package)

`composer require zantolov/zoogle-cms`

2. Enable Symfony bundle
------------------------

[](#2-enable-symfony-bundle)

Edit `config/bundles.php` and add:

```
Zantolov\ZoogleCms\Infrastructure\Symfony\ZoogleCmsBundle::class => ['all' => true]

```

3. Obtaing Google API credentials
---------------------------------

[](#3-obtaing-google-api-credentials)

- Go to
- Create project or select existing one
- Click on `Create service account`
- Add permission to this service account as `Owner`
- Create JSON key for the service account and download it to `var/` (it will be needed later)
- Enable Google Drive API
- Enable Google Docs API

4. Set-up required environment variables
----------------------------------------

[](#4-set-up-required-environment-variables)

Create local, untracked `.env` instance (e.g. `.env.dev.local`) and fill in the variables:

```
GOOGLE_DRIVE_API_CLIENT_ID=YOUR CLIENT ID
GOOGLE_DRIVE_API_AUTH_FILE_PATH=/var/auth.json
GOOGLE_DRIVE_ROOT_DIRECTORY_ID=YOUR ROOT DIRECTORY ID
ZOOGLE_CACHE=1

```

- `GOOGLE_DRIVE_API_CLIENT_ID` The `client_id` value from the authorization JSON file you have downloaded
- `GOOGLE_DRIVE_API_AUTH_FILE_PATH` - path to the JSON credentials file downloaded while creating the service account
- `GOOGLE_DRIVE_ROOT_DIRECTORY_ID` - ID of the Google Drive folder that will be root for the CMS
- `ZOOGLE_CACHE` - Configuration flag telling Zoogle to cache results or not

### Caching

[](#caching)

Fetching and processing documents on every request is tedious job. Zoogle CMS provides cached client that will fetch and process content only once, storing it locally for future access and faster loading time.

@todo cache invalidation

### How to get the root directory ID?

[](#how-to-get-the-root-directory-id)

- Create a folder on your Google Drive and open it with the browser
- See your URL in the following format: `https://drive.google.com/drive/u/0/folders/1123456AbCDeFGhIjKlMnB12233`
- The last URL component is the folder ID, `https://drive.google.com/drive/u/0/folders/{id}`

5. Grant access on the Google Drive root folder to the service account email
----------------------------------------------------------------------------

[](#5-grant-access-on-the-google-drive-root-folder-to-the-service-account-email)

- Right click on the root folder in your Google drive and select "Share"
- Add the email contained in the JSON credentials file under the `client_email` key to the list of users the folder is shared with. View permission is enough

Usage
-----

[](#usage)

Once you've successfully shared Google Drive folder with the account associated to your Google project, Zoogle CMS will have access to folders and documents under the selected root directory.

### Simple usage within Twig

[](#simple-usage-within-twig)

```
{% set document = zoogle_document('https://docs.google.com/document/d/{some id}/edit') %}

{{ document.title }}

    {{ document.firstImage|zoogle_element_html }}

{{ document.withoutFirstImage|zoogle_document_html }}

```

### Usage within PHP

[](#usage-within-php)

#### Listing subfolders

[](#listing-subfolders)

#### Listing documents

[](#listing-documents)

#### Fetching document

[](#fetching-document)

##### Converting Google document to model object

[](#converting-google-document-to-model-object)

##### Converting document model object to HTML

[](#converting-document-model-object-to-html)

Configurartion
--------------

[](#configurartion)

### Images persistence

[](#images-persistence)

By default images exposed by Google Docs API will expire. To make sure images will keep rendering on your website, we need to persist them.

Zoogle comes with the local persistence adapter powered by Symfony Cache component

To enable it, add the following route definition to your `app/config/routes.yaml`

```
zoogle_cms_image:
    path: /z/image/{filename}
    controller: Zantolov\ZoogleCms\Infrastructure\Controller\ImageController
```

#### Amazon S3 images persistence

[](#amazon-s3-images-persistence)

@todo

#### Custom persistence

[](#custom-persistence)

@todo

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance44

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

1259d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/90e83d0bb865305c1c9fbfd71341971c3dd204788eccf4dfda410fdb8b7de8d2?d=identicon)[zoka123](/maintainers/zoka123)

---

Top Contributors

[![zoka123](https://avatars.githubusercontent.com/u/3052111?v=4)](https://github.com/zoka123 "zoka123 (15 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/zantolov-zoogle-cms/health.svg)

```
[![Health](https://phpackages.com/badges/zantolov-zoogle-cms/health.svg)](https://phpackages.com/packages/zantolov-zoogle-cms)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M309](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M192](/packages/simplesamlphp-simplesamlphp)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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